2021-06-07 10:48 AM
How to remember in STM32F746G-Disco uint32_t? Save after power off and recall when power is restored?
Andrzej
Solved! Go to Solution.
2021-06-10 11:08 AM
See CubeMX examples for how to properly call HAL_FLASHEx_Erase and HAL_FLASH_Program.
2021-06-11 04:03 AM
Need:
1.after turning on the power, read the saved value from FLASH (uint32_t)
2.Unlock FLASH 2. delete the FLASH sector
3.Set the power drop interrupt in StartTask02
4. write one byte in the interrupt (uint32_t)
5.Lock FLASH
Will it work?
Andrzej
2021-06-11 09:05 AM
This YouTube tutorial should help you: STM32 FLASH Programming || SECTOR TYPE || M4, M7
2021-06-12 02:11 AM
Thank you. I will write back.
Andrzej
2021-06-12 09:16 AM
https://controllerstech.com/flash-programming-in-stm32/
I'm sorry, but this is at the same level that HAL/Cube code is - unusable APIs, broken logic, full of bugs, inefficient, lack of basic C knowledge and generally stupid code. Such an incompetent people should not teach anyone. And also generally such type of videos do not teach anything. "Copy this, click that..." doesn't explain HOW and WHY.
2021-06-12 09:17 AM
Read the FLASH section in a reference manual and also the whole AN3969. Many current and future questions will be answered by that...
2021-06-12 09:48 AM
No, problem. I suggested an application note, earlier. I prefer good written documentation to most video tutorials.
2021-06-12 09:54 AM
I fixed the link to the AN in my earlier message.
I also found this library: EmuEEPROM. Based on AN3969, it's actively maintained.
2021-06-14 02:29 AM
For me it is not nonsense as you suggest.
Andrzej
2021-06-14 08:36 AM