Hello,
I am new to freescale.
I start on FRDM-KL25Z evaluation board. I am using cw 10.3 with PE. I added a RTC components using PE. I would like to measure the current consumed by RTC module. what I need to do is just run RTC keep time counting on. I set the time, and using the RTC_GetTime(RTC1_DeviceData, rtc) function which suppose to get the second, minute, hour, date, day, month, year values and stores into rtc object. however, when I run this in debug mode(using OpenSDA USB), I checked the rtc object. the value is just same as initial value. I dont know what is wrong. I did automatic initialize rtc device, and call rtc_enable() function as well.
Can anyone give me a hint?
Thanks in advance.
Dear Peng Liang
I have to generate an hourly interrupt and wake up the KL05 from VLLSx mode. It's mentioned using 32k crystal instead of 8M crystal for RTC. I guess it means the processor ll run at 32kHz clock. I would like to know how RTC could use this clock. Could anything be done for preventing RTC registers from getting reset due to VLLSx wakeup interrupt?
I know this thread is a couple of months old, but I have found a way to get the RTC working properly without needing to swap crystals, etc. By default, there is no link between the internal 32K reference and the RTC clock input HOWEVER it is possible to route the internal 32K out to PTC3 and bring it back in on the RTC clock input on PTC1.
You can configure the required settings in Codewarrior/Processor Expert on the CPU component (in expert mode) as follows:
On the RTC, set the "Clock Source" to "ERCLK32K".
And don't forget to put a wire link between PTC1 and PTC3 :smileyhappy:
Low and behold, you have an internally-sourced 32K signal to run the RTC on the Freedom board without needing any external devices or needing to change any crystals.
Hi Graeme Bragg,
i tried to do above but failed,
have you done any Projects which involves RTC if you could share it would be very helpfull !!
Just for information
The new FRDM-KL05Z freedom board for Kinetis-L KL05 MCUs will have an external 32KHz crystal on board.
I figured out~~
Thanks for replys
Hello Peng Liang,
It seems that I am facing the same problem,
what solution did you find?
And by the way can I ask you what is the consumption you measure for RTC running?
Thank you and regards.
Antoine
I guess you need to install 32k crystal instead of 8M.
Hi there!
Have you tried to get started with our FRDM-KL25Z Sample Code Package?
It has a Sample Code Guide with step-by-step instructions to download tools, load projects, configure the hardware, run the code, and use the OpenSDA mass-storage flash programmer to program pre-compiled binaries onto your board... and some other goodies you can find useful.
Let me know if works for you!
Too bad they seem to have forgotten the code warrior projects that are supposed to be there in the cw directory.
I tried some the samples. There is no one related to RTC setting. and I notice, RTC requires external crystal 32k, the evaluation board has a 8MHz external crystal populated. How can this achieve RTC running?
Hi,
In the Sample Code Package for FRDM-KL25 in drivers folder you can find and example, there is the source and its header file for RTC configuration:
Kinetis L Sample Code\kl25_sc\kl25-sc-baremetal\src\drivers
It is all commented so you can follow step by step the code.
Hope this helps.
Does anyone know about how to get RTC running properly?