cancel
Showing results for 
Search instead for 
Did you mean: 

jump to a function instead of call her

dhutchison1945
Associate II
Posted on May 26, 2010 at 09:18

jump to a function instead of call her

3 REPLIES 3
fggnrc2
Associate II
Posted on May 17, 2011 at 15:08

Ciao Spectre.

There is no difference between calling and jumping into a function (as long it's used for a software reset).

The reason is obvious: that function will never return!

EtaPhi

dhutchison1945
Associate II
Posted on May 17, 2011 at 15:08

Ciao EtaPhi,

yes,I agree with you,but what if the sw_reset fails ? :)

thanks for the replies :)

bye bye

Spectre

fggnrc2
Associate II
Posted on May 17, 2011 at 15:08

If the sw reset fail, there is the watchdog ditch...

Insert an infinite loop at the end of your function and wait watchdog reset.

Thanks to the safety devices in STM8, this isn't either the last ditch.

You can also insert an illegal opcode to force a sw reset.

Ciao

EtaPhi