cancel
Showing results for 
Search instead for 
Did you mean: 

Bug of HAL_SPI_Transmit_DMA for 1 byte

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
1 REPLY 1

@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
Up vote any posts that you find helpful, it shows what's working..