AnsweredAssumed Answered

CubeMX DMA SPI Transmit and RX

Question asked by horkin.charles on Mar 25, 2015
Latest reply on May 8, 2015 by hajiani.koorosh
I'm using an STM32F415 and CubeMx.  I've got the HAL_SPI_TxRxCpltCallback() working in that it gets called after the proper number of bytes have been clocked out of the SPI Slave, however, when I prep for another transfer using HAL_SPI_TransmitReceive_DMA inside that first callback, it breaks.

I've traced the issue down to the SPI2 TX DMA stream being "locked" in the HAL.

I think I have a workaround where I call both HAL_DMA IRQ handlers for DMA1_Stream3_IRQHandler() and DMA1_Stream4_IRQHandler().  Eg:   HAL_DMA_IRQHandler(&hdma_spi2_tx);

Is this the suggested implementation?