Hi,

> > #define mc_RESET (*(void(**)(void))(0xfffe))()
> > // alternate version:
> > // #define mc_RESET { WDTCTL = 0xDEAD }
> >
> 
> Your first version of mc_RESET is a very bad idea - it will not cause a
> reset, so all peripherals in the device will still be set as they were when
> the "reset" function/interrupt was called.  Using the watchdog to force a
> real reset is much better.

it's ok because i do initialize all peripherals at the start of main.
That's why i want to initialize the IRV section with 0xfffe.
And at 0xfffe there is the IRV for Power-up, External Reset, Watchdog and Flash 
memory so
the both versions are equivalent. Maybe the first version is a little faster, 
because it's a direct
reset.

Regards,

Rolf



Reply via email to