cancel
Showing results for 
Search instead for 
Did you mean: 

How to send 32 bit data on HAL_SPI_Transmit

RMull.2
Associate

I want to send

uint32_t spiData1 = 0x48240000;

using HAL_SPI_Transmit func but I'm unable to send this data.

How can I do the following thing.

2 REPLIES 2
TDK
Guru

Include your STM32 chip number in your post.

In general, you send it as 4 separate bytes using any of the HAL_SPI_Transmit functions.

HAL_SPI_Transmit(&hspi1, (uint8_t *) &spiData1, 4, 0xFFFF);

If you feel a post has answered your question, please click "Accept as Solution".
S.Ma
Principal

newer spi ips have 32bit fifo so the 16 bit data register will accept 2 x 16 bit writes as fast as you can. go under the hal hood to see what it does.