2021-02-08 08:37 AM
Hello,
I'm working with a STM32F446 and I configured the SPI as slave.
In my process I receive x bytes of data in interruption. But during the process, this size of data changes to y. But the function HAL_SPI_TransmitReceive_IT(x) has already been called with the value x.
I tried resetting the SPI interface to be able to receive those y bytes (HAL_SPI_TransmitReceive_IT(y)). But it is not working, I still receive the data with a shift, due to the previous size.
What is the proper way to fix this?
Thanks in advance
Solved! Go to Solution.
2021-02-08 12:22 PM
Hello
HAL_SPI_Abort_IT is the way to abort an IT or DMA SPI operation. Note that HAL_SPI_AbortCpltCallback called on abortion end. (defined by user)
IMO a byte by byte reception and evaluation inside IRQHandler, is far faster than execute all this HAL functions
2021-02-08 12:22 PM
Hello
HAL_SPI_Abort_IT is the way to abort an IT or DMA SPI operation. Note that HAL_SPI_AbortCpltCallback called on abortion end. (defined by user)
IMO a byte by byte reception and evaluation inside IRQHandler, is far faster than execute all this HAL functions