This document introduces the in-application programming (IAP) technology of the STM32F0xx microcontroller, and provides an example of reprogramming using the USART communication protocol. This technology allows firmware updates in the end product.
The document describes how to implement firmware updates for STM32F0xx devices by programming an IAP driver into Flash memory via the Serial Wire Debug (SWD) interface. The IAP driver utilizes the Universal Synchronous Asynchronous Receiver Transmitter (USART) peripheral to communicate with a host PC running HyperTerminal or a compatible terminal program.
| Baud Rate Example | 115200 bps |
|---|---|
| Data Bits | 8 |
| Parity | None |
| Stop Bits | 1 |
| Flow Control | None |
The YMODEM protocol is used to receive/send data from/to the HyperTerminal application.
The user can press a push-button connected to a specific pin at reset; not pressing it switches to the user application.
The system displays a 'Verification failed' error message if there is any discrepancy between RAM and Flash contents.