How to abort SPI Slave when Master requests for less bytes?
Hi,
I have my master and slave applications running on NUCLEO-H563ZI Boards both of which normally receive/transmit 10 bytes of data in each SPI transfer. I use SPI in DMA mode.
However, in one test case, master starts a SPI transaction for only 4 bytes i.e it calls HAL_SPI_TransmitReceive_DMA with Size as 4. So, my master sends clock for only 4 bytes even though the slave has 10 bytes of data. At this point, the Master receives 4 bytes but the HAL_SPI_TxRxCpltCallback on Slave is not called.
I am doing a GPIO Pin toggle in the callback to denote completion of the SPI transfer which is necessary for my slave application. How do I abort the SPI communication in this scenario?
I see there's a HAL_SPI_Abort_IT. Not sure how to use it. Appreciate if you would provide some insight on this.
