2015-05-11 05:12 AM
Hi,
we are trying to program a STM8S-Discovery, fitted with a STM8S105x6
microcontroller, using the native bootloader (via USART1 pins). We
disconnetted the onboard ST-Link by removing R13-R14 resistor.
We are using a USB-TTL (5 Volt) converter, from wich we took the RX,
TX, GND and VCC signals and connected them to the CN1 connector of the
Discovery board. We are using the Flash Loader Demo software PC, but
we are still not able to communicate and program the STM8S on the
board. We also wrote the proper option byte to enable the bootloader
(via STVP software, please see the attached image), but without any success.
Has the board to stay in reset state after the pressing of the ''next''
button of the software PC? Could you tell us please the right
procedure to follow to program via USART (using ROM bootloader)?
Thank you in advance,best regards.
Note: in the attached image from STVP (read option byte), I noticed that the bootloader option byte value il 0x55 instead of 0x55AA as written in the datasheet.. is it correct anyway? #bootloader #option-bytes #stm82015-05-21 04:19 AM
Hi Andrea,
as I don’t know exactly about your configuration, this description will follow the way I did it.
Hardware: First I brought a pullup resistor (47k) to the Tx pin of the µC. That is to pull the Rx port of the interface (USB-converter) to idle state (high) when acting the reset at µC. Otherwise the pin is floating, it may fall to low state and send wrong information to the Flash Loader.
1. Connect the interface to the µC and start the Flash Loader software.
2. In the window, where you can select the COM interface, you take the one of your USB-converter.
For parity and echo I selected Parity None and Echo Mode although the User Manual of the Flash Loader Demonstrator (UM0462) shows other values. Find out the best way.
3. Reset the µC.
!!! From now on it is strictly recommended to following the timing:
4. AFTER you release the Reset on µC, you will have no more than ONE SECOND time to press the ‘
N
ext’ button of the Flash Loader window on your PC. This will start the link procedure between Flash Loader (PC) and bootloader (µC).Notice: After the very second the µC will enter the normal reset procedure and start the normal program from the flash memory. Henceforth the bootloader is deactivated and you can’t initiate the link procedure again - until you reset the µC.
Hopefully you get now the window Target: Select target.
If yes - you succeeded :
o
), if no - :o( try anything else.5. You follow the UM0462 and select the target STM8_32k for your STM8S105x6.
6. and so on …
Hope, this could help you.
Best Regards,
WoRo