Skip to main content
Vitaliy Chernobay
Senior
June 28, 2018
Question

Bug of HAL_SPI_Transmit_DMA for 1 byte

  • June 28, 2018
  • 1 reply
  • 719 views
Posted on June 28, 2018 at 08:30

STM32L053R8T6 (Nucleo), STM32CubeMX 4.26

Here so two bytes are transferred perfectly

aTxBuffSPIECG[0] = 0x75;

aTxBuffSPIECG[1] = 0x55;

HAL_SPI_Transmit_DMA(&hspi2,(uint8_t*)aTxBuffSPIECG, 2);

But one byte is not transmitted

aTxBuffSPIECG[0] = 0x75;

//aTxBuffSPIECG[1] = 0x55;

HAL_SPI_Transmit_DMA(&hspi2,(uint8_t*)aTxBuffSPIECG, 1);

#transmit #spi #hal
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 10, 2018

@CubeMX would hope one could expedite single byte transfers with a simple data register write rather than bringing the circus to town.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..