AnsweredAssumed Answered

Possible bug in STCubeMX HAL DMA code for F4

Question asked by woolston.jared on Aug 13, 2014
Latest reply on Sep 8, 2014 by Montassar BEN ROMDHANE
I do not know enough about the internal workings of the processor to be sure, but I believe there is a bug in the HAL DMA drivers for the F4xx series. Specifically, it seems the De-init method puts the DMA peripheral in a state that the Init method does not properly reset. This was evidenced in a problem I had posted [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/SPI&currentviews=20]here. Essentially, if I made a call to de-init prior to initializing, the DMA transfer never incremented the destination address. Removing the de-init call results in working behavior. I was able to confirm by changing the length of the transfer that the peripheral being served by the DMA transfer was in fact receiving the correct data, but that each byte transferred to memory by the DMA was going to the same location rather than auto-incrementing.

Outcomes