-
Notifications
You must be signed in to change notification settings - Fork 49
Flash the firmware on Bafang 850C LCD
WARNING: There is no way to backup the original firmware. Once you erase the original firmware you will never be able to go back.
Download the firmware binary file from here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases
Our OpenSource firmware repository: https://github.com/OpenSource-EBike-firmware/Color_LCD/tree/master/Bafang_LCD_850C/Bafang_LCD_850C_firmware
- use something thin to force open the front cover, by making force on the sides of the case
- remove the hard plastic layer that is on top of the LCD
- remove the 2 little screws that fix the LCD and the board to the case
The JTAG SWD pins are available on the board, on the pads as seen on next picture, with the following JTAG pins:
Pad number (from left to right) |
JTAG name |
1 | GND |
2 | NRST |
3 | SWCLK |
4 | SWDIO |
5 |
VCC 3.3V (no need to connect if LCD is already powered on) |
To flash the firmware, use the software tool that works on your operation system to flash the STM32F103 microcontrollers.
On the very first time, you will need to first erase and/or unlock the microcontroller.
Use stm32flash or OpenOCD.
OpenOCD is usefull if you want to develop and do debug otherwise the stm32flash is the most indicated.
Use the STM32 ST-LINK Utility. Here the main steps:
- Target Chip erase
- Load bin file (load the firmware bin file)
- Target program