AnsweredAssumed Answered

Software reset (cold reboot)

Question asked by youssefi.shahbaz on Nov 15, 2013
Latest reply on Dec 11, 2013 by youssefi.shahbaz
Hi,

I'm looking for the proper (standard?) way for cold rebooting an STM8. I see that the first interrupt handler in the interrupt vector is what is called on startup. With my COSMIC compiler, the name of that function is _stext.

My thought was that the _stext function would initialize the stack pointer and various other registers, so calling it as a function from inside the program would result in a cold reboot, but testing it, apparently this is not true. In the very least, it seems like it doesn't reset the peripherals.

I saw another post that suggested a hack where the watchdog was enabled and then the program waited until it expired and reset the microcontroller. I'm looking for a more appropriate solution though. Does the micro support any way for being reset by software?

Shahbaz

Outcomes