If you find the way to upload your new firmware on Stm32 CPU by using your smartphone then you may pay attention on StmDfuBlue application.
StmDfuBlue is android application for loading firmware on Stm32 CPU via bluetooth interface.
For updating firmware you need have smartphone with Android OS and Blutooth-to-Serial module i.e HC-06
Realization of the application is based on next documents from company STMicroelectronics.
1. AN2606 STM32 microcontroller system memory boot mode
2. AN3155 USART protocol used in the STM32 bootloader
Using application
PREPARATION
1. Set correct serial configuration in Bluetooth-to-Serial module. It should be 8 bits, even parity and 1 Stop bit and baud rate from 1200 to 115200. How to change configuration of serial communication for your Bluetooth module you can find in datasheet for your module.
2. Connect Bluetooth-to-Serial module to your Stm32 board.
In general Stm32 uses next pines for serial bootloader
PA10 (USART RX) and PA9 (USART_TX)
3. Activate bootloader mode for Stm32. How to do this read in AN2606. In general you should set pins BOOT0 and BOOT1 in correct combination according to model of your CPU and make reset.
PROGRAMMING
1. Turn on bluetooth in you phone and connect to Bluetooth-to-Serial module
2. Select file with firmware you want to write. It should be in Intel hex format.
3. Set writing options you need. You can select next options
- Erase only necessary pages
- Unset readout protection if need
- Set readout protection after writing
- Go CPU after programming
4. Press button "Load file to flash" and wait for finish of operation.
More information
Bluetooth Low Energy support.
Starting from release 1.15 the support of Bluetooth low energy (BLE) has been added in the application.
Only BLE serial modules on microcontroller cc254x is supported now. Checking of this functionality has been made with module HM-10.
Download APK
If you by some reason can not install my the application from GooglePlay market. Here is link on downloading APK.