Hello,
I'm having a weird problem when entering LPM3 with the line __bis_SR_register(LPM3_bits+GIE); Once this line gets executed, it causes a reset. By reading out SYSRSTIV i figured out that the reset is caused by a "security violation" (SYSRSTIV=0x000A). According to information from this forum this happens when trying to acces protected areas of the flash (or in this case FRAM) ( see this thread ).
Now I'm wondering: how can this be caused by writing to the SR?
The stackpointer says 0x0023D4 is this close to an overflow? (Where can I find information on the maximum stack size?)
The ISR that is supposed to end the LPM3 is:
#pragma vector=TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR(void)
{
switch(__even_in_range(TA0IV,TA0IV_TAIFG))
{
case TA0IV_NONE: break;
case TA0IV_TA0CCR1: break;
case TA0IV_TA0CCR2: break;
case TA0IV_3: break;
case TA0IV_4: break;
case TA0IV_5: break;
case TA0IV_6: break;
case TA0IV_TAIFG:
{
_no_operation();
_low_power_mode_off_on_exit( );
break;
}
default: break;
}
}
Best Regards,
Andreas