How to check rtc oscillator is running?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to check rtc oscillator is running?

253 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by tkggitfk24 on Thu May 12 19:55:38 MST 2016
Hello Everyone,

I'm getting crazy about RTC, if the rtc oscillator is not populated or broken, my whole system will be corrupted. This is not acceptable for us.

and I know write the rtc and Alarm timer registers without the 32 kHz clock can stall the CPU from the LPC4357 User Manual. So the key point is how to check rtc oscillator is running?

The User Manual says that,


Quote:

To confirm that the 32 kHz clock is running, read the Alarm timer counter register (DOWNCOUNTER, see Table 866), which counts down from a preset value using the 1024 Hz signal derived from the 32 kHz oscillator.



I think it is NOT feasibility.The  DOWNCOUNTER and PRESET  are zero after reset.

The following is what I tested:

1.
void Chip_Clock_RTCEnable(void)
{
LPC43XX_CREG->CREG0 &= ~((1 << 3) | (1 << 2));/* Reset 32Khz oscillator */
LPC43XX_CREG->CREG0 |= (1 << 1) | (1 << 0);/* Enable 32 kHz & 1 kHz on osc32k and release reset */
}

after invoking this function, the system corrupted without RTC oscillator

2. Writing DOWNCOUNTER and PRESET registers of Alarm timer, just one time, the system corrupted




Does anyone have any idea or suggestion? I would really appreciate it.


Thank you!
Leo
Labels (1)
0 Kudos
4 Replies

22 Views
NXP Employee
NXP Employee
bump
0 Kudos

22 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Mon May 23 02:32:32 MST 2016
Well, if you have a simple oscilloscope you can see the 32.768kHz on the CLKOUT pin.
If you want to make a functional test in production you could connect CLKOUT to another input like a timer capture and get the feedback.

This RTC oscillator circuit has been designed for very low power, so it is sensitive with regards to board design and any impact from the outside (crosstalk etc).
You need to find a setup (crystal selection + board design) which works 100%  under your environment conditions, especially temperature.

Regards,
NXP Support Team
0 Kudos

22 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by tkggitfk24 on Mon May 16 18:32:23 MST 2016

Quote: mc
Hi Leo,
You can send 32KHZ RTC clock to CLKOUT pin and check the frequency. Check Table 147 in the below UM
http://www.nxp.com/documents/user_manual/UM10503.pdf




You mean connect the CKOUT to a timer capture input and check the frequency.
0 Kudos

22 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Mon May 16 09:29:00 MST 2016
Hi Leo,
You can send 32KHZ RTC oscillator clock to CLKOUT pin and check the frequency. Check Table 147 in the below UM
http://www.nxp.com/documents/user_manual/UM10503.pdf
0 Kudos