2021-03-25 04:24 AM
Using STM32f3xxx series & using SPI2.
I wanted to transmit 32 bits data at atime, but in API
HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
pData is fo r uint8_t.
how to transmit uint32?
2021-03-25 10:37 AM
hello
uint32_t myData;
if SPI initialized as 8 bit , HAL_SPI_Transmit(&hspi, (uint8_t*)&myData, 4,Timeout) ;
if SPI initialized as 16 bit , HAL_SPI_Transmit(&hspi, (uint8_t*)&myData, 2, Timeout) ;
2021-03-28 09:18 PM
Thanks for the reply.