Hi.
I'm working on MSP430F5510 (48 pin).
I'd like to use the SVM high side in order to trigger an interrupt when the battery voltage falls below a certain threshold. I do not need SVS (high and low) nor SVM low side so i disabled them.
Everything works ok except for the fact that if i vary SVSHRVL, the voltage threshold remains the same.
That's my code:
PMMCTL0_H = PMMPW_H; // PMM Password (enable write)
SVSMHCTL &= ~SVSHE; // Disable High side SVS
SVSMHCTL |= SVSHRVL_3; // if i vary SVSHRVL_X, the voltage threshold remains the same
SVSMLCTL &= ~(SVMLE+SVSLE); // Disable Low side SVS/SVM
PMMIFG &= ~SVMHIFG;
PMMRIE = SVMHIE; // SVM high-side interrupt enabled.
PMMCTL0_H = 0x00; // Wrong PMM Password (disable write)
#pragma vector=SYSNMI_VECTOR
__interrupt void SYSNMI_ISR(void)
{
switch(__even_in_range(SYSSNIV,0x12))
{
case SYSSNIV_SVMLIFG:
__no_operation();
break;
case SYSSNIV_SVMHIFG:
__no_operation();
PMMCTL0_H = PMMPW_H;
PMMIFG &= ~SVMHIFG;
PMMRIE = SVMHIE;
PMMCTL0_H = 0;
break;
default:
__no_operation();
break;
}
}
What's the problem?
Thanks!
Regards,
Carloalberto