ST32H7 SPI DMA Callback not called in non-circular Mode
Hi,
I have seen this some time ago in another thread:
I am kind of repeating the questions in that last thread, because I did not see any final answer.
Still in FW H7 v1.9.0 the problem persists. In stm32h7xx_hal_spi.c using the DMA the TxCpltCallback is never called if not in circular mode.
static void SPI_DMATransmitCplt(DMA_HandleTypeDef *hdma)
{
SPI_HandleTypeDef *hspi = (SPI_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
if (hspi->State != HAL_SPI_STATE_ABORT)
{
if (hspi->hdmatx->Init.Mode == DMA_CIRCULAR)
{
#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1UL)
hspi->TxCpltCallback(hspi);
#else
HAL_SPI_TxCpltCallback(hspi);
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
}
else
{
/* Enable EOT interrupt */
__HAL_SPI_ENABLE_IT(hspi, SPI_IT_EOT);
}
}
}What is the reason for hiding that TxCpltCallback?
