paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] SPI with 16bit on LPC2148(YAPA)


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] SPI with 16bit on LPC2148(YAPA)
Date: Wed, 20 Feb 2013 18:40:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

Hi,

The uint8_t* is just a pointer to the beginning of the buffer. If you do 16 bits transfers, 2 bytes are placed in the mcu register at each time (in the master branch).
See https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/lpc21/mcu_periph/spi_arch.c#L192

In the stable branches (v4.0 and v4.2), the "generic" spi driver is barely not used except for some peripherals using 8 bits transfer. The peripherals using 16 bits are actually "manually" configuring and using the spi.

Gautier


Le 20/02/2013 17:34, Mauro Garcia Acero a écrit :

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,
Mauro.



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]