2009-06-09 11:57 PM
Restart Microprocessor
2011-05-17 06:03 AM
Hi.
I am using the STVP programming toolkit API with the Raisonance Rlink and the SWIM interface (an STM8/128 Eval board). Is there a reliable way to set the controller to run after programming, without disconnecting the SWIM connection or power cycling the unit? Thanks.2011-05-17 06:03 AM
Hi Simon,
Yes, you can do this by apply an external reset through the NRST pin. In this way you don't have access to use the SWIM pin as I/O without disconnecting the SWIM connection. Once SWIM was activated/connected, writing to SWD in the register CFG_GCR doesn't disable the SWIM anymore. The only ways to disable the SWIM once active are: - POR (supply disconnect) - SRST (system reset) command send from Host to Target then check the flag SWIMF in the register RST_SR. (refer to ''UM0470: STM8 SWIM communication protocol and debug module'' for more details about this feature) Regards mozra2011-05-17 06:03 AM
just to keep it simple,
Apply a low level voltage in NRST pin then High level voltage your micro will reset, and enjoy it2011-05-17 06:03 AM
See solution at
https://my.st.com/public/STe2ecommunities/mcu/Lists/STM8/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM8/How to reset MCU through SWIM and command line
Regards, Stefan