2019-02-20 12:19 AM
Hello,
I would like to know if it's possible to write from RAM to FLASH using a DMA.
I tried to configure a DMA as memtomem, using the HAL_DMA_Start function but it doesn't work.
Is it doable ?
Thank you.
François
Solved! Go to Solution.
2019-02-20 12:56 AM
It adds complication without any benefits or advantages, and is not a use case that is likely to work.
Check the error/status thrown by the DMA controller. It is likely not an error that can be resolved by hitting it harder.
2019-02-20 12:27 AM
Sounds like a bad plan.
2019-02-20 12:39 AM
What do you mean ?
2019-02-20 12:56 AM
It adds complication without any benefits or advantages, and is not a use case that is likely to work.
Check the error/status thrown by the DMA controller. It is likely not an error that can be resolved by hitting it harder.
2019-02-20 01:05 AM
Okay thanks for your explanation.
For those who wants to know more, I found another post which talks about this topic.
https://stackoverflow.com/questions/52773949/dma-to-flash-for-stm32
It explains in detail what you said.
2019-02-20 11:07 PM
I don't think DMA is able to wait long enough for a write to be finished. Flash doesn't make requests, so you need to do memtomem, and DMA writes as fast as it can. One write to flash takes microseconds. Flash operations stall the uC, but I don't think they stall DMA.