|
From: | Mauro Garcia Acero |
Subject: | Re: [Paparazzi-devel] SPI with 16bit on LPC2148(YAPA) |
Date: | Wed, 20 Feb 2013 23:31:56 +0100 |
Thanks Hienrich and Gauthier for your
comments, There is any module that currently uses
the lpc21/mcu_periph/spi_arch for taking a look? I had the v4.2 branch, that's
why I didn't notice of the new code. I have just updated to the master branch. Seems to me, that the SPI interface that
is pinned in the YAPA2 board is the SPI1 (P0.17, P0.18, P0.19, P0.20, ...),
could you confirm? In the spi_arch.c, line 359, it makes reference to a document (UM10120_1.pdf page 76) Actually that document correspond to
other microprocessor and not the LPC2148, so the document I'm using is the
UM10139.pdf from NXP and the pinout for the SPI1 is in page 61. SPI1 description
is in the chapter 13, page 192. I see that using airborne/mcu_periph/spi[.c|.h]
may be much easier than using the first spi_arch, with struct spi_transaction
and struct spi_periph. It is quite similar to linux/spidev.h (good work). Should
I declare the SPI_MASTER and USE_SPI1 definition in the xml module file or
directly in .c file for the device? Which is the typical paparazzi approach? I'm
a newbie in paparazzi as you can see. Thank you guys, I will keep you
informed. BR Mauro. From: address@hidden
[mailto:address@hidden On Behalf Of Gautier Hattenberger Hi, Dear all, The spi.h from mcu_periph is referred to
transactions of 8bits words. For example: extern uint8_t* spi_buffer_input; The same for spi_arch.h from
../lpc21/mcu_periph/, but I have read that the LPC2148 can deal with 8 to 16
bits per transfer. As long as I see in other modules, read
registers from SPI devices are made as follows: spi_buffer_input = (uint8_t*)
....; spi_buffer_output = (uint8_t*)
....; SpiSetCPHA(); SpiStart(); I don't thing that spliting every
command into 2 bytes and sending them independently would work. Any ideas? Best regards,
_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel |
[Prev in Thread] | Current Thread | [Next in Thread] |