cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX DMA SPI Transmit and RX

chuck2399
Associate II
Posted on March 25, 2015 at 20:45

Hello,

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);

  HAL_DMA_IRQHandler(&hdma_spi2_rx);

Is this the suggested implementation?

#cubemx #dma #spi #irq
1 REPLY 1
hajianik
Associate II
Posted on May 08, 2015 at 20:51

I'm having the identical issue .it runs fine for a period of time(20-30 minutes)and then it breaks meaning the DMA streams ISR are never hit any longer.I contacted ST technical support but they are totaly mute about it.

Does anyone knows the soluton or the root cause of this?

Thanks,

Koorosh Hajiani