I'm using SPI with DMA for both Tx and Rx. So I call the relevant HAL API : "HAL_SPI_TransmitReceive_DMA()". And I only want to response to the Rx complete event. I find two possible places to filter the event:
- In "DMAx_StreamX_IRQHandler()", but I need filter other events, such error, half complete, etc
- In "HAL_SPI_TxRxCpltCallback()", but this function only receive a SPI handle. I don't get a way to know if it's a Rx complete event.
I think method 2 is more suitable, if I can know whether it's a Rx complete event or not. Any good suggestion?