Hello everyone
I have some problems using XT2 Clock. According to datasheet, it should consume 100uA when RF-Core is sleeping (which it should be doing after reset). However I get 1130 uA in LPM3 with XT2 running. (without XT2 its only 1-2 uA as it should be).
I'm executing this code on an EM430F6137RF900 Boad Rev 3,2:
void main(void) {
WDTCTL = WDTPW + WDTHOLD;
UCSCTL6 &= ~XT2OFF;
UCSCTL3 |= SELREF_2;
do {
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
SFRIFG1 &= ~OFIFG;
}while (SFRIFG1&OFIFG);
UCSCTL4 = SELM__VLOCLK + SELS__VLOCLK + SELA__VLOCLK;
P1OUT = 0x00; P2OUT = 0x00; P3OUT = 0x00; P4OUT = 0x00; P5OUT = 0x00;
P1DIR = 0xFF; P2DIR = 0xFF; P3DIR = 0xFF; P4DIR = 0xFF; P5DIR = 0xFF;
PJOUT = 0x00;
PJDIR = 0xFF;
// Turn off SVSH, SVSM
PMMCTL0_H = 0xA5;
SVSMHCTL = 0;
SVSMLCTL = 0;
PMMCTL0_H = 0x00;
__bis_SR_register(LPM3_bits);
__no_operation();
while(1); // should never reach this line
}
Can anybody see what I'm doing wrong?
Regards
Bjoern