Hi All
I have been experimenting with the RTC in the KL parts; for example, on a KL46 board - but the behaviour seems the same on all KLs.
I also checked out this tutorial:Using RTC module on FRDM-KL25Z
There are two of things that are weird:
1. According to the KL46 user's manual the 32kHz crystal oscillator can be enabled by SW - OSCE in RCT_CR, however if this is tried the device fails and can't select the normal crystal clock input to start until a power cycle occurs. Presumably this is an error in the user's manual since the devices don't support a 32kHz crystal oscillator (?)
2. According to the user's manual the default clock is OSC32KCLK however the RTC only counts when the LPO 1kHz input is selected or a clock is applied to RTC_CLKIN and this is selected as input (OSC32KSEL in SIM_SOPT1). It is as if there is either no OSC32KCLK available or it can't be enabled?). This seems to be backed up to some degree by the turorial linked above since it generates a 32KHz clock on RTC_OUT and physically wires it back to RTC_CLKIN, which seems a lot of effort to go to if the RTC has a default 32kHz clock from the OSC as the user's manual suggests.
Is the OSC32KCLK available??
Regards
Mark
Hi, Mark
KL series has three RTC clock source. They are LPO, RTC_CLKIN and OSC32KCLK.
Only LPO is from internal clock source and other two are external clock source.
OSC32KCLK is from EXTAL0 and XTAL0. You can also input oscillator 32KHz to pin RTC_CLKIN.
For detail, you can find Figure 5-1 clocking diagram on page116 in reference manual "KL23P80M48SF0RM".
Hope my reply can help you.
Best Regards
Paul
Hi Paul
What is not clear from the diagram is that it shows XTAL_CLK and OSC32KCLK being supplied from the OSC logic, but it seems that OSC32KCLK is not available when a high frequency crystal is used.
If I understand correctly, if the high frequency crystal is replaced by a 32kHz crystal the OSC32KCLK would then be available.Could you confirm this?
Regards
Mark
Hello Mark,
You are correct in that the diagram is not clear. If the high frequency crystal is replaced by a 32kHz crystal, then OSC32KCLK would then be available. However, in the definition of the OSC32KCLK in section 5.4, the definition should include the following description:
"The OSC32KCLK is available only when the oscillator is configured for very low power mode (VLP), which is RANGE = 0 and HGO = 0."
as found in the following RM:
I will make a request with our Tech Docs Team to get this updated.
Our apologies for the confusion here. I hope that this helps.
Best Regards,
Carlos