Skip to content

U85 module programming

iliasam edited this page Nov 7, 2021 · 23 revisions

This module can be programmed in two different ways: with programming or by UART.

Using programmer

Connect "PWRON" line to VBAT line - to power on module.
You need to connect SWDIO, SWCLK, NRST, GND to your programmer (ST-Link for example).
Notice that NRST must be connected!
You need to select "Connect under Reset" and Reset mode: "Hardware Reset" in options of your programmer software.

Using UART bootloader

This STM32 have integrated UART bootloader (DFU), that is stored in ROM (it is not possible to erase it).
This bootloader can be used for loading firmware to MCU without programmer. Only USB-UART converter is needed.
You need to connect BOOT0 line to VBAT and reset module to enter to bootloader.
Use "STM32CubeProgrammer" utility for working with bootloader. Select "UART" mode near "Connect" button.

Original firmware of the module is locked, so you will have such message after connection:
drawing
So you need to set "Read Unprotect" switch (it is at right) and try to connect again. If everything is OK you should be able to load new firmware to MCU.
You can find build firmware here (*.hex files): https://github.com/iliasam/Laser_tape_reverse_engineering/tree/master/Code/CortexM0
If you don't need to have debugging functions by SWD, it is preffered to use "_boot.hex" files.
Program hex file to MCU and connect "BOOT0" pin to GND (or leave it floating) to disable bootloader.
Reset module power at the end.

Pinout for UART programming:
drawing

Clone this wiki locally