Home > other >  [for] about RW - the DATA is written in the ROM flash operation problems
[for] about RW - the DATA is written in the ROM flash operation problems

Time:10-04

When using keil development STM32 application, click on the Build in the Build after the Output window will often have the following information:

Several parameters in figure representing
The size of the Code: the Code
RO: constants of space
RW: has been initialized variables in the program of space
ZI: an uninitialized static and global variables and stack space of the
The above parameters and chip Flash as well as the corresponding relationship of SRAM is
Flash footprint size=Code + RO + RW
SRAM footprint size=RW + ZI
RW parameter at the same time to participate in a Flash and SRAM footprint calculation, this is because the Flash is Read - Only part of the attribute, and although SRAM is Read - Write data don't fall in electricity saving, so Only have initialized values stored in ROM, electricity and then copy to the SRAM to Read and Write operations, the two parts need to be set aside RW variable space occupied,
As shown in figure:

In accordance with the process of the start of the STM32 above said (the Cortex - the M4, architecture (M3 kernel chip basic it is this process) : after power on the first 0 x00000000 (mapping x08000000 0, here only consider from the internal Flash) obtained the interrupt to scale, and then in grade 2 before running the user code will have a boot code is responsible for the presence of initializes the variable's value in the Flash Copy to the corresponding variables in the SRAM position (grade 3), after all the ZI area reset (grade 4), before the official start of the run user code (grade 5),
So RW - DATA on the DATA of electricity after the operation will be the Copy in RAM,
Question:
If in the process of the program is running, I write flash operation, and is in the original RW - DATA on the memory address of the new DATA, it is not the original RW - DATA, DATA will be cleared, electric start on the next program, whether the program will start failure? (I actually wrote in the process of the program is run without problems, even if electricity to run, so confused this problem, hope someone help me answer the question.)

CodePudding user response:

reference
electric start on the next program, whether the program will start failure?

Light see this address allocation, start there will be no problem, but some variable initial value may be changed

CodePudding user response:

reference 1st floor dceacho response:
reference
electric start on the next program, whether the program will start failure?

Light see this address allocation, start there will be no problem, but some variable initial value may be changed

But to run for a period of time, often operating flash, now haven't found out the problem,
  • Related