Skip to main content
tinhlagi9947
Associate
November 9, 2016
Question

STM32CubeMx 4.17 Send data 16 over SPI using DMA

  • November 9, 2016
  • 2 replies
  • 582 views
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.
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    November 9, 2016
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    tinhlagi9947
    Associate
    November 9, 2016
    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