Question
STM32 HAL_SPI_Transmit/Receive limitation
Posted on July 07, 2016 at 23:41
version F4, 1.12
I am interfacing SPI to flash. calling HAL_SPI_Transmit or Receive alone disables SPI_DIRECTION_2LINES. I have to re-initialize it after each call. When using HAL_SPI_TransmitReceive. I have to specify ONE SIZE for both tx&rx. Thus, I have to provide two equal tx & rx buffers (wasting memory). Suggestion : (1) HAL_SPI_Transmit/Receive restores original init.Direction when done. OR (2) allow HAL_SPI_TransmitReceive to accept separate tx & rx sizes. Note : RXNE/TXE can be served (dummy) data to prevent error. This scenario when sending command and receiving data. Thanks. #!stm32 #bug #hal