MCG settings considering RTC or slow internal clock for a K60FN1M in a 144 LQFP (K60F120 TWR board)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCG settings considering RTC or slow internal clock for a K60FN1M in a 144 LQFP (K60F120 TWR board)

383 Views
mkrug
Contributor II

Hello all,

I tried to setup most of the MCG modes with PE to present this within a lecture. While doing this I discovered a behavior related to the external RTC and slow internal clock that is unclear to me and maybe someone can explain it.

  1. In any MCG mode in which I tried to use the RTC (XTAL32) oscillator as the external input frequency the change of the clock configuration using Cpu_SetClockConfiguration() failed. I read some articles here concerning to make sure that the RTC module and the RTC clock output is enabled. As far as I can see the PE code that is generated according to my settings is already considering this - however, the clock configuration change does not work so far and stalls during writing to the MCG_Cx registers.
  2. If I try to use the slow internal clock for modes like BLPI or FBI the change of the clock configuration does not work either. Again, the code execution stalls during writing to the MCG_Cx registers.

Interestingly the slow internal clock on the K60FN1M is running also on 32kHz like the external RTC clock. So that might be a hint about the source of the problem or about how to avoid or workaround it. 

Anyone successfully running a K60FN1M from the external RTC or from the slow internal clock?

Best Regards

Markus

0 Kudos
1 Reply

287 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Markus,

Sorry for the late reply!

Please refer the attached RTC_LDD example. I have test it on TWR-K60F120M board with CodeWarrior10.7.

RTC_LDD TWR-K60F120M.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos