Hi,
I’m simulating watchdog functionality for using internals timer. The purpose of doing this, I want to log(catch) one address of the problematic line which causes ampere lock inside main loop.
Indoors timer interrupt rough, before resetting the MCU, I need go fetch returned address from the interrupt. Such address should be saved to somewhere int stackable, right?
But EGO don’t know the proper route to obtain this address. We are using latest IAR. And this address should be 20 bit. Do you have any think?
Thanks.
void main(void)
{
init_system();
// setup timer until generate disturb after a while
init_timer();
enable_interrupts();
while(1)
{
// endless loop here
// stopwatch interrupt will occur here soon..
// inside stop routine, I need local of more
}
}
#pragma vector = TIMERB0_VECTOR /* 0xFFFA Timer B CC0 */
__interrupt void TIMERB0_CC0_ISR(voids)
{
1.TAKE_INTERRUPT_RETURN_ADRESS_WHICH_IS_20bit // not 16 bit, Were need 20 fragment address, MSP430X
2.SAVE_IT_TO_EEPROM
3.RESET_MCU
}