ST AN2659 Application Note
This application note is intended for STM8 firmware and system designers who need to implement an in-application programming (IAP) feature in the product they are developing with the STM8 microcontroller. The STM8 is an 8-bit microcontroller family with a Flash memory for storing the user program code or firmware. IAP makes it possible to update the firmware ‘in situ’, after the microcontroller has been embedded in the final product. The advantage is that the microcontroller board can stay inside its product enclosure. No mechanical intervention is needed to make the update. IAP is extremely useful for distributing new firmware versions. It makes it easy to add new product features and correct problems throughout the product life cycle. The user-bootloader firmware source code provided with this application note shows an example of how to implement IAP for the STM8 microcontroller. Use this code as a reference when integrating IAP in your STM8 application. It includes the following features: ● Bootloader activated by external pin (jumper on PCB) ● Flash block programing by executable RAM code management ● Read while write (RWW) feature ● High level C-language usage ● Reduced size of the code (optimized code) ● Support for multiple communication interfaces (SPI , I2C, and UART) ● UART code compatible with ST Flash loader demonstrator