This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP432P401R
Hi,
My customer is using MSP432P401R RTC with an external 32.768kHz crystal (LFXT).
Customer observes -30sec to +18sec variation in 4hours operation among several devices.
- The external 32.768kHz crystal has enough accuracy.
- The variation is seen regardless BCLK source (either REFOCLK or LFXTCLK).
- Customer uses below code to switch REFOCLK and LFXTCLK.
When .SELB = CS_LFXTCLK_SELECT is enabled, customer confirms the external crystal start-up as expected.
PowerMSP432_PerfLevel myPerfLevels[] = {{ .activeState = PCM_AM_DCDC_VCORE1, .VCORE = 1, .DCORESEL = CS_DCO_FREQUENCY_24, .SELM = CS_HFXTCLK_SELECT, .SELS = CS_HFXTCLK_SELECT, // .SELM = CS_DCOCLK_SELECT, // .SELS = CS_DCOCLK_SELECT, .DIVM = CS_CLOCK_DIVIDER_1, .DIVHS = CS_CLOCK_DIVIDER_1, .DIVS = CS_CLOCK_DIVIDER_1, .SELB = CS_LFXTCLK_SELECT, .SELA = CS_LFXTCLK_SELECT, // .SELB = CS_REFOCLK_SELECT, // .SELA = CS_REFOCLK_SELECT, .DIVA = CS_CLOCK_DIVIDER_1, .flashWaitStates = 0, .enableFlashBuffer = true, .MCLK = 24000000, .HSMCLK = 240000000, .SMCLK = 24000000, .BCLK = 32768, .ACLK = 32768, }};
Questions:
Q1) Are these differences expected?
Customer uses an external crystal to get RTC accuracy, so if the RTC accuracy does not change, they wants to use REFOCLK instead.
Q2) The code switching the BCLK source is correct?
Is there anything customer should check?
Thanks and regards,
Koichiro Tashiro
Hi Eason,
Do you mean the RTC should not show such variation as far as customer uses accurate crystal?
Thanks and regards,
Koichiro Tashiro
Yes, that is what I mean! To ask customer to output the ACLK is to check the frequency error.
Hi Eason,
Customer found LFXTIFG bit is set in CSIFG register.
According to TRM, the default value of this bit is 1 and if this bit is set, BCLK source is automatically switched to REFO.
TRM section 5.2.10 Clock System Fail-Safe Operation.
We guessed this is the root cause of the issue as REFO does not have enough accuracy.
Customer added the code to clear LFXTIFG bit just after start-up.
After that modification, RTC accuracy is within +/-1sec for 4hours.
This item is now closed. Thanks for your support on this.
Thanks and regards,
Koichiro Tashiro
**Attention** This is a public forum