I am studying document about Flash Programming Algorithms.
There is a sentence as below,
The following diagrams show how the functions of the Flash Programming Algorithms are executed by a development tool.
And the erase flow as below,
I have a little confused about 1st and 2nd steps of the erase flow, please help.
1. Load Flash Algorithm in RAM => Is it mean to load the flash algorithm into the RAM of chip?
2. Execute "Init" =>Who executes the "Init" function of flash algorithm? ARM-Mx? development tool ?
Thanks for your any help.
Hello Eddie,I try to answer your questions.
1.) Yes, the Flash Algorithms are copied, via the used debugger, to the RAM of the chip and are also executed there.
2)The Flash Algorithm consist of several functions. One of them is "Init".After the functions are copied to RAM the Debug Tool starts the function and waits until it is finished.Development tool would be e.g. Keil MDK (uVision).
Really appreciate your reply. Are the steps as below?
1. The functions are copied to RAM
2. Debug tool starts the functions , Is it mean the Debug tool control the ARM-Mx to execute the flash init function?
Why I said that, because the FLM is compile based on ARM-Mx, so I think the FLM is executed by ARM-Mx.
Also, during the download code step, the program function of FLM is also executed by ARM-Mx, am I right?
1. I use ARM-M0 controller.
Hi Eddie,yes, your assumptions are correct.
A description of Flash Programming algorithms can be found here: https://arm-software.github.io/CMSIS_5/Pack/html/flashAlgorithm.html
The Flash Programming Algorithms are intended to run within the RAM of the device to program. It is similar to 'In Application Programming'. The code must be compiled 'Position independent' and for the device (Cortex-Mx) you want to program.The 'Development Tool' acts as control instance. It does the download of the functions and the data, starts the functions, does address calculations and more.
A good idea is to take a look at the Flash Programming Algorithms provided with the various CMSIS Device packs. Most of the algorithms exist as uVision project including source code.
View all questions in Keil forum