Skip to main content
Ehill.16
Senior
October 21, 2020
Question

HAL_QSPI_TxCpltCallback function is not being called for HAL_QSPI_Transmit function

  • October 21, 2020
  • 3 replies
  • 948 views

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?

This topic has been closed for replies.

3 replies

TDK
Super User
October 21, 2020

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
Ehill.16Author
Senior
October 21, 2020

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

Ehill.16
Ehill.16Author
Senior
October 22, 2020

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