cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMx 4.17 Send data 16 over SPI using DMA

tinhlagi9947
Associate II
Posted on November 09, 2016 at 02:31

Hi,

I want to transfer data 16bit over SPI using DMA (data width: half word, Mode: normal), but in function HAL_SPI_Transmit_DMA(SPIx, (uint8_t *)data, uint16_t size) only transfer data 8bit. I want to fill color on ILI9341 LCD.

Many thanks.
2 REPLIES 2
Posted on November 09, 2016 at 03:07

Are you sure it is not just a pointer cast of convenience? What's the actual transfer being configured as?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tinhlagi9947
Associate II
Posted on November 09, 2016 at 03:53

I want to transfer such asx SPI_DMA_SendHalfWord(SPIx, uint16_t value, uint16_t count); 

Ex: SPI_DMA_SendHalfWord(SPIx, color, 0xFFFF);  // Send 65535 bytes, SPI MUST BE IN 16-bit MODE