-
Notifications
You must be signed in to change notification settings - Fork 0
All about Flash module
-
Lo primero, hay que tener en cuenta que la FLASH es bastante delicada, un fallo en la alimentación o que esta sea inestable durante un proceso de borrado, escritura o incluso cuando esta no esta realizando ninguna operación podría causar problemas.
-
First of all, it must be taken into account that the FLASH is quite delicate, a power failure or that it is unstable during a erasion or writing process or even when it is not performing any operation could cause problems.
-
When you want to program from the STM32Programmer it is very important to disable the Execute after programming option because this option for some reason that could not be determined causes the MCU to enter a hard fault.
- If the above happens (the MCU goes into hard fault every time we want to use a module function) the normal solution is to go to the STM32Programmer, select the Erasing&Programming window in the Erase flash memory section, we will select the sectors from 4 to 7 or those that we were modifying (we do not recommend modifying any lower ones to avoid writing above the program) and finally we will click on the Erase selected sectors button.
-
A common indicator that the FLASH has a problem is to look at it from the STM32Programmer and see patterns of 0x00000000 and 0xFFFFFFFF alternating every few bytes.
-
If you have done and verified the above and the board continues to go into hard fault, it is probably not caused by the FLASH memory.
-
It would be nice if the boards had some way to indicate that some operation on the FLASH is running to prevent operations that could corrupt the FLASH.
-
It is also important that when a board receives the order to jump to the bootloader, it first checks that no operation is being carried out in the FLASH and waits for it to finish if one is running before jumping.
Al escirbir en dos páginas distintas a la vez consume 256KB de ram en vez de los 128KB que consume al escribir solo una. Esta ineficiencia se puede corregir si fuese necesario, aunque para el uso esperado de esta libreria no deberia ser un problema.