cancel
Showing results for 
Search instead for 
Did you mean: 

SPI with DMA failing on second pass

VO
Associate III

I'm looking for some guidance on using DMA with SPI. I have the M4 core on an STM32H755 set up as a master in full duplex mode, and as long as I invoke the SPI transfer using interrupts, the program runs fine. When I try to migrate to DMA, however, I note that the program is successful on the first pass only, triggering the callback, etc., but on the second time through, I always get an error, apparently because the transmit is still busy (?) I have used SPI and DMA often before without incident, but I don't know what else to check in this case. Any insights are appreciated. See the screen shots of where the code is finally failing. Line 2508 is in the HAL SPI driver C file, the point at which the driver attempts to start the DMA with IT, and the second shot shows the result of this call in the HAL DMA file, line 695.

 

Thanks

 

 

0 REPLIES 0