Does STM32U585 support DMA writes to internal flash?
Hello,
I've been unable to determine if it's possible to use the DMA to write data from internal RAM to internal flash on an STM32U585 device.
I've consulted the following, but don't see a clear answer:
- https://www.st.com/resource/en/application_note/an5593-how-to-use-the-gpdma-for-stm32u575585-microcontrollers-stmicroelectronics.pdf
- https://www.st.com/resource/en/reference_manual/rm0456-stm32u575585-armbased-32bit-mcus-stmicroelectronics.pdf
I've also looked at the examples that can be imported into STM32CubeIDE. This includes a flash to RAM write using DMA example, and a flash erase/program example that does not involve the DMA.
If a DMA write from RAM to flash is possible, I'm also unclear on the limitations and benefits. The device has two flash banks, and some of the documentation above leads me to believe I should be able to write to one flash bank via the DMA, while continuing to execute code from the other flash bank while the DMA operation is in progress. If it is never possible to execute code from internal flash during a write to internal flash, then it doesn't seem like using the DMA would provide any benefit.
If a DMA write from RAM to flash is not possible, it looks like the next best thing is to do a flash write with an interrupt callback (using `HAL_FLASH_Program`). I am still unclear on the limitations and benefits of using this, and if code will continue to execute as long as it's in a separate bank, or if it's sufficient if it's in a separate page.
Any definitive answers and clearer guidance on what I should attempt would be greatly appreciated. Thank you!
