2020-01-29 04:27 PM
Hi fellow programmers! I need assistance on where I would start in trying to flash/store live new data into an STM32 micro controller and then retrieving it to use again in the case that it resets or turns Off/On.
Any key words or directions would be greatly appreciated!
Solved! Go to Solution.
2020-01-30 03:44 AM
"I need assistance on where I would start"
For a start, you will need to be a competent 'C' programmer, with at least a working understanding of microcontroller architecture.
Assuming you have that, the first place to start with any new device is always to go to the manufacturer's Product Page - there you will find specifications, application notes, examples, tools, etc, etc, ...
https://www.avrfreaks.net/comment/2839426#comment-2839426
You haven't said which particular STM32F4 you're considering, so here's one at random:
https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html
On the 'Resources' Tab, choose 'Technical Literature' and then 'Application Notes'
Spend some time browsing those - there's loads of useful stuff!
Juts to be awkward, it seems that the App Note you require is not listed!
:persevering_face:
AN3969: EEPROM emulation in STM32F40x/STM32F41x microcontrollers
See also:
https://www.st.com/en/embedded-software/stsw-stm32066.html
https://community.st.com/s/question/0D50X00009XkhQn/stm32f4-eeprom-emulation-hal-library
2020-01-29 05:10 PM
Start with the Reference Manual, and the description of the FLASH subsystem and registers
Example, try this
STM32Cube_FW_F4_V1.24.1\Projects\STM32F413ZH-Nucleo\Examples\FLASH\FLASH_EraseProgram
2020-01-29 07:08 PM
To expand a little further, it is common to use the last page of flash to store program settings that you can read out and re-write during program execution. Note that flash isn't like RAM--you need to erase the entire page before you can write to any of it.
2020-01-30 03:44 AM
"I need assistance on where I would start"
For a start, you will need to be a competent 'C' programmer, with at least a working understanding of microcontroller architecture.
Assuming you have that, the first place to start with any new device is always to go to the manufacturer's Product Page - there you will find specifications, application notes, examples, tools, etc, etc, ...
https://www.avrfreaks.net/comment/2839426#comment-2839426
You haven't said which particular STM32F4 you're considering, so here's one at random:
https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html
On the 'Resources' Tab, choose 'Technical Literature' and then 'Application Notes'
Spend some time browsing those - there's loads of useful stuff!
Juts to be awkward, it seems that the App Note you require is not listed!
:persevering_face:
AN3969: EEPROM emulation in STM32F40x/STM32F41x microcontrollers
See also:
https://www.st.com/en/embedded-software/stsw-stm32066.html
https://community.st.com/s/question/0D50X00009XkhQn/stm32f4-eeprom-emulation-hal-library
2020-01-30 09:13 AM
Wow, amazing, thanks so much for the great advice and help! I'm using the Nucleo-F413ZH and programmed a CAN bus interface with a motor, in case of a power failure or general functionality, I'd want it to store its most recent position. I should be able to find the most optimal scenario if it'd be flashing the memory or using EEPROM for example.