Part Number: MSP430F5359
Other Parts Discussed in Thread: MSP430F5436,
I'm having an issue that I can't seem to get past: Once the external crystal is enabled, I burn about 230mW (about 70mA at 3.3V) in LPM4 mode. I've got a similar processor (MSP430F5436) on the same board and it draws around 2mW in LPM4.
Here are the details:
1) The board only has a handful of bypass caps, the two CPUs, and two 7.37MHz crystals (one for each).
2) The code for the processors are basically the same:
int main(void) {
volatile unsigned int i;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
Use_XT2();
__bis_SR_register(LPM4_bits ); // Enter LPM4, interrupts disabled ............Temp!!!!!!!!
...however the "Use_XT2" routines are different as they are specific to each processor type.
For the MSP430F5359 (the one that is drawing excessive power) the "Use_XT2" code is:
void Use_XT2 (void)
{
volatile unsigned int i;
PDSEL_L = 0x0C;
// setup clock using 7.3728mhz xtal on xt2
UCSCTL0 = 0x0000; // DCO set by hardware when using FLL
UCSCTL1 = 0x0060; // DCORSEL = 6 with Selects DCO freq range 4.6 - 10.7 MHz
UCSCTL2 = 0x0001; // FLLD = 0, FLLN = 1,
UCSCTL3 = 0x0050; // FLLREFCLK = 5 (select XT2CLK)
// FLLREFDIV = 0 (Ref /1)
UCSCTL4 = 0x0555; // ACLK = MCLK = SMCLK = XT2CLK
UCSCTL5 = 0x00; // ACLK, MCLK, SMCLK all div by 1 for now
// __bis_SR_register(LPM4_bits ); // Enter LPM4, interrupts disabled ............Temp!!!!!!!!
UCSCTL6 = 0x002D; // XT2DRIVE = 0, 4 to 8mhz
// XT2BYPASS = 0, for xt2 operation
// XT2OFF = 0, XT2 is ON
// XT1DRIVE = 0
// XTS = 1, hi freq caps not used
// XT1BYPASS = 0
// XCAP = 3, smallest value
// SMCLKOFF = 0, SMCLK is on
// XT1OFF = 1, xt1 is off
__bis_SR_register(LPM4_bits ); // Enter LPM4, interrupts disabled ............Temp!!!!!!!!
} // USe_XT2()
Note the LPM4 mode statements. In the current configuration, the power draw is 240mW. If I remove the comments from the one above where UCSCTL6 get set, then the power drops to 2mW. Basically I'm stopping the CPU right before the XT2 crystal is enabled.
3) I've looked at the crystal pins for both CPUs and they look identical.
What am I missing?
Thanks in advance!!