Hi Team,
My customer have questions regarding the DCO freq of the device, please see details below.
Three questions both concerning control of DCO frequency as per TI-supplied code example msp430fr267x_CS_08.c, in the Software_Trim() function:
1. in the following 'do' loop in the function (near the top):
do { CSCTL7 &= ~DCOFFG; // Clear DCO fault flag }while (CSCTL7 & DCOFFG); // Test DCO fault flag
the DCOFFG flag is cleared and then immediately checked to see if it is clear or not. How long does it take for this flag to become set again, once cleared? The User Manual says DCOFFG is set if the DCO tap setting reaches 0 or 511, and the line immediately preceding the 'do' loop above sets DCO to 256, so won't it take some time for the tap to be automatically adjusted to 0 or 511 by the FLL, during which time DCOFFG will remain clear, causing immediate exit from the 'do' loop? I can't see the point of this 'do' loop, please explain.
2. Following the 'do' loop above, there is:
__delay_cycles((unsigned int)3000 * MCLK_FREQ_MHZ);// Wait FLL lock status (FLLUNLOCK) to be stable // Suggest to wait 24 cycles of divided FLL reference clock
Please can you explain how 24 cycles of divided FLL reference clock, times 1 (as this is the clock frequency in MHz), is equal to 3000? I think I may be missing something here. (The REFOCLK is nominally 32.768 kHz.)
3. How often does the FLL adjust the DCO tap under automatic control? (I.e. is it n counts of REFOCLK, in which case what is n, or how to calculate it?
Thank you.
Regards,
May
