Other Parts Discussed in Thread: MSP430FR5964
Hello, I am currently using a Msp430FR5962 controller. I put this in LPM3 mode (see code):
// Clock System Setup
CSCTL0_H = CSKEY_H; // Unlock CS registers
CSCTL1 = DCOFSEL_0; // Set DCO to 1 MHz
CSCTL2 = SELM__DCOCLK | SELS__DCOCLK | SELA__VLOCLK;
CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // Set all dividers to 1
CSCTL4 = LFXTOFF | HFXTOFF;
CSCTL0_H = 0; // Lock CS registers
__bis_SR_register (LPM3_bits | GIE);
I would like to switch the MSP to low power mode and count (measure) the time until the MSP leaves the low power mode. The VLOCLK runs with the above code, but it is very imprecise and not temperature-stable.
What options do I have to put the MSP into a very low power mode and still measure a time with an approximate accuracy of + -1ms. Also over the temperature range from -40 ... + 85 ° C.
Furthermore, this clock generator must also start to oscillate relatively quickly, in a maximum of 5 to 10 ms.
What are my options?