Reprogramming
Last updated
Last updated
Even though Evolve comes pre-programmed, reprogramming it with custom firmware is possible. This document describes reprogramming the microcontroller in three steps.
If the user overwrites the flash memory, the only way to restore it is by sending the device to an authorized service center.
ST-Link V2 or V3 Programmer
STM32 Cube Programmer Application
A custom 5-pin programming cable
STM32CubeProgrammer is software for flashing STM32 microcontrollers with ST-Link. Use the following link to download and install STM32CubeProgrammer from ST's website. The application supports Linux, Mac, and Windows operating systems.
Then connect the programmer to your computer to automatically install device drivers.
Evolve exposes SWD programming pins for programmer and debugger connectivity. The following table reveals the connectivity between ST-Link and Evolve.
Reset (Active-low)
15
1 (Marked on the rear)
SWDIO
7
2
SWCLK
9
3
GND
20
4
VDD
19
5 (Do not connect if board is powered)
Please note that Evolve's programming pads are 2mm pitched. You may use a single-row 5-pin PCB clamp to connect with the debugger.
Connect the ST-Link with Evolve and start the STM32CubeProgrammer application to begin flashing. From the STM32CubeProgrammer,
Select the connected ST-Link device from the serial number drop-down.
Set the port to SWD.
Set the frequency to auto.
Set mode to under reset.
Set the access port to 0.
Set reset mode to hardware reset.
Set speed to reliable.
Set shared to disabled.
Tick debug on low power mode.
Use the connect button to establish a link and the open file button to load the firmware file (.elf).
If the device is readout protected, you must full-chip erase before downloading a new image to the microcontroller. After zeroing all the memory content, a full-chip erase will also clear the memory protection feature.
To enable flash readout protection, go to the OB tab, open the readout protection section, set RDP to BB or CC, then save the settings.
Selecting level 2 protection (CC) is permanent as it freezes the option bytes.
Finally, use the download button to flash the microcontroller. To disconnect from the microcontroller, use the disconnect button.