LPC541xx: SPI DMA with byte array

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC541xx: SPI DMA with byte array

763件の閲覧回数
pge
Contributor I

Dear all,

I am using a Flexcomm in SPI mode to send data to a peripheral. I don't care about received data.

I want to use DMA to send a large array of byte through this SPI. 

I used the fsl_spi_dma example from SDK and it works only with array of uint32_t so if I want to send this large array of byte I had to first allocate an array of uint32_t with the same number of elements, then copy all the byte to this new buffer and finally start the DMA. This of course not efficient at all and would like to send directly the byte array.

I have tried to change the fsl_spi_dma code to set DMA channel in byte mode but it doesn't work as expected. I also noticed that the SPI FIFO need 32bits word with only 16bits used as data others 16bits are used as config. Also the RXIGNORE is only configurable through this FIFO 16bits configuration. So again I can't directly use the DMA directly to transfer byte to SPI.

Is there any special mode or tricks to use DMA with SPI for 8bytes data without any additional copy ?

Thanks in advance for any help

ラベル(1)
タグ(2)
0 件の賞賛
2 返答(返信)

520件の閲覧回数
pge
Contributor I

Hello Carlos,

I am using SDK 2.2.1 with a custom board based on LPCXpresso 54114

Thanks

Patrick

0 件の賞賛

520件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee


Hi pge,

Could you tell us which board and MCUXpresso SDK version are you using?

Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 件の賞賛