2023-04-27 01:52 AM
I'm new to STM32 and I just got my first Nucleo board. There is a program on board that blinks the red LED quickly. If I press the user button it will switch to the blue LED blinking at medium speed and then the green LED at slow speed then back to red.
I want to be able to restore back the the original state of the Nucleo so I am looking for the source code project. I did search online. I came across a document that referred me to the STM32Cube MCU Package which I downloaded. But the program in there for blinking the LEDs does not have the same functionality.
I could also use this project as a starting point for adding additional features so I can learn the STM32. (I did the same thing when I started with Arduino.)
If the project is not available, then would it work if I used the STMCubeProgrammer to save the non-blank flash memory (looks like addresses 0x08000000 - 0x08008c27) to a bin or hex or srec file and then later restore the program from that file?
Thanks...
2023-04-27 02:33 AM
You can download from nucleo to your pc whole flash memory and restore it later through programming :)
2023-04-27 02:41 AM
Hello,
Simply use Cube programmer tool and save the content of the Flash, then restore back it if needed.
2023-04-27 08:14 AM
Yes saving original content is usually a solid way of getting back to where you started..
STM32Cube_FW_F4_V1.27.0\Projects\STM32F413ZH-Nucleo\Demonstrations\Src
STM32Cube_FW_F4_V1.27.0\Projects\STM32F413ZH-Nucleo\Examples\GPIO\GPIO_IOToggle
2023-04-27 06:59 PM
Thanks everyone for confirming about restoring the flash.
I did look at GPIO_IOToggle but it's not identical to the program on the board. The program on the board blinks three LEDs but only one at a time and at different speeds. The GPIO program looks like it blinks two LEDs at the same time. I hadn't looked at the Demonstration program before. I got thrown off by it containing files for disk I/O and FAT file system. But looking at what it does with the LEDs, it only blinks one of the LEDs but at three different speeds.
So I guess the actual program source is not available?
Not a big problem though. I'll just use the GPIO program and experiment with it and I can always restore back to the original.
Thanks...