cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_QSPI_TxCpltCallback function is not being called for HAL_QSPI_Transmit function

Ehill.16
Senior

But yet it is called for HAL_QSPI_Transmit_DMA function? Do I need to configure the autopolling with the QSPI_AutoPollingTypeDef structure for the callback to be called with the HAL_QSPI_Transmit function?

3 REPLIES 3
TDK
Guru

It's not called in blocking mode, since the transmit is complete when the function returns. In interrupt/DMA mode, this isn't the case.

Instructions for the HAL functions are at the top of the source file:

      (#) For the indirect write mode, use HAL_QSPI_Transmit(), HAL_QSPI_Transmit_DMA() or
          HAL_QSPI_Transmit_IT() after the command configuration :
         (++) In polling mode, the output of the function is done when the transfer is complete.
         (++) In interrupt mode, HAL_QSPI_FifoThresholdCallback() will be called when the fifo threshold
             is reached and HAL_QSPI_TxCpltCallback() will be called when the transfer is complete.
         (++) In DMA mode, HAL_QSPI_TxHalfCpltCallback() will be called at the half transfer and
             HAL_QSPI_TxCpltCallback() will be called when the transfer is complete.

If you feel a post has answered your question, please click "Accept as Solution".
Ehill.16
Senior

Thank you. I'll look at this a little later. Is it the same for the HAL_QSPI_Receive function?

Ehill.16
Senior

Never mind, I see that it applies to the HAL_QSPI_Receive as well. Thanks for your help.