What is the recommended approach for aborting a SPI transaction via DMA or IT?
I have been using HAL_SPI_DMAStop to abort my SPI transactions and usually it works, but every once in a while I notice my SPI bus gets all jammed up or whatever and stops working. I noticed that the HAL_SPI_DMAStop function is not returning HAL_OK.
Should I be using a different approach when using DMA?
Also, How would I do this same thing if using IT (interrupts) instead of DMA? I tried using HAL_SPI_Abort_IT without any luck.
To add a bit more context, I need to be able to use the SPI receive command to always be listening to another device and this device is a slave to it. As data becomes available to transmit back to the master, I need to abort the receive transaction and start a TransmitReceive transaction. Also note that this is being performed within a callback function (ISR) because my timing requirements are extremely tight.
Thanks!
