Programming flash with DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
DMA
-
STM32Cube MCU Packages
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-20 12:27 AM
Sounds like a bad plan.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-20 12:39 AM
What do you mean ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-20 1: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
