cancel
Showing results for 
Search instead for 
Did you mean: 

Restart Microprocessor

simonbanks9
Associate
Posted on June 10, 2009 at 08:57

Restart Microprocessor

4 REPLIES 4
simonbanks9
Associate
Posted on May 17, 2011 at 15:03

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.

mozra27
Associate II
Posted on May 17, 2011 at 15:03

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

mozra

bassinux
Associate II
Posted on May 17, 2011 at 15:03

just to keep it simple,

Apply a low level voltage in NRST pin then High level voltage your micro will reset, and enjoy it

sramsauer9
Associate II
Posted on May 17, 2011 at 15:03

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