Skip to content
Georg Icking-Konert edited this page Jun 20, 2015 · 21 revisions

Welcome to the STM8_serial_flasher Wiki!

License / Disclaimer

  • STM8_serial_flasher and it's source code is distributed under the Apache License Version 2.0 (see License)

  • exception is some RAM code, which is required for flash programming. This code was copied from the free Flash Loader Demonstrator by STM. All rights to this RAM code remain with STM.

Overview

STM8_serial_flasher is an application for programming the STM8 microcontroller using the built-in ROM bootloader (BSL) via RS232/USB, or UART interface. It is compatible with Windows, MacOS X and all flavours of Linux, including Raspbian. For a list of tested configurations see supported platforms.

Tools with similar functionality are:

Notes:

  • the popular STM8 Discovery Board connects to the PC via SWIM (=debug) interface, so an additional USB<->UART adapter is required, e.g. UM232R, which is connected to the CNx pins (see page xxx)

  • exception is the Raspberry Pi or similar “embedded PCs“ with direct access to UART pins at the GPIO connector. For hardware setup see page xxx

  • the STM8 ROM bootloader (=BSL) must be enables for uploading new code

    • for virgin devices (i.e. flash erased) the BSL is automatically enabled

    • for other devices the BSL can be re-enabled via the free ST Visual Programmer application (Windows only) by STM

    • STM8_serial_flasher by default activates the BSL after upload (see page usage)

  • the BSL can be entered only within 1s after reset. Reset can be triggered manually (reset button), via DTR (requires connection of DTR to STM8 RST pin), or via Raspberry Pi pin GPIO18 (see setup on xxx)

  • the BSL is supported by all STM8 UARTs. However, some are configured for "reply mode", which assumes a single-wire (e.g. LIN) interface with a "Rx echo" for each sent byte.

    • in case of dual wires (as in xxx), STM8_serial_flasher has to echo each received byte individually, which leads to a much reduces upload speed. For options see page usage

    • for an overview of STM8 devices and UART modes see the BSL reference

  • for a full BSL documentation see UM0560 by STM. The STM32 uses a very similar communication protocol, so adapting the flasher tool for STM32 should be straightforward. However, I have no board available, but please feel free to go ahead...

See other Wiki pages for instructions on building, hardware setup, and using the software. Have fun! :-)

Clone this wiki locally