cancel
Showing results for 
Search instead for 
Did you mean: 

Startup and Reset interrupt.

luter
Associate II
Posted on December 05, 2005 at 05:12

Startup and Reset interrupt.

4 REPLIES 4
luter
Associate II
Posted on December 02, 2005 at 05:13

Hi, All.

I have to use Reset interrupt, but something goes wrong.

At the startup Reset ISR is processed and after it mc fails. It does not jump to startup routine (crtsx.st7).

According to my understanding of startup process, jump to startup routine should go automatically without any obvious calls. Or i am not right? if I am not, should be any call of startup routine in Reset ISR or not?

luca239955_st
Associate III
Posted on December 02, 2005 at 10:59

what the micro will do at startup is defined in your interrupt vectors.

A typical interrupt table will look like the following:

void (* const _vectab[])() = {

NULL, /* unused */

NULL, /* SPI */

NULL, /* LITE TIMER RTC */

NULL, /* LITE TIMER Input Compare */

it_tovf, /* AT TIMER Overflow */

it_tcmp, /* AT TIMER Output Compare */

....

_stext, /* RESET */

};

the last line ''tells'' the micro to jump to _stext, which is a label that is defined at the beginning of crtsx.st7.

If you want the micro to do something else upon reset, change the _stext with your own label. If, after your routine, you want to execute the startup, end it with a jump to the _stext.

Regards,

Luca (Cosmic)

luter
Associate II
Posted on December 05, 2005 at 03:30

Tnx for an answer.

And one more question: Should i define my startup routine as interrupt or not?

luca239955_st
Associate III
Posted on December 05, 2005 at 05:12

no need to define the startup routine as an interrupt.

Regards,

Luca