How make FRDMKL25Z RTC works

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

How make FRDMKL25Z RTC works

681 Views
perchsaucedo
Contributor I

I'm trying to use the RTC on the FRDMKL25Z, but it doesn´t work propertly, the only way can the RTC works is whit the 1kHz LPO clock, but the second regiter changes every 32.768 seconds whit this lines of code:

/* Enable the RTC 32KHz oscillator */
SIM->SOPT1 &= ~SIM_SOPT1_OSC32KSEL_MASK;
SIM->SOPT1 |= SIM_SOPT1_OSC32KSEL(2); // 1kHz LPO

I need the second regiter changes every second but I can't make it, does any one help me?

I'm using:

MCUXpresso IDE v10.1.1

KL25Z-SDK v2.2 

3 Replies

548 Views
marek-trmac
NXP Employee
NXP Employee

Hi Sergio,

there is clock configuration tool integrated in MCU IDE 10.1. The tool can help configurure initialization of input clock for the peripherals.

Just select "MCUXpresso Config Tools - Open Clocks" from project popup menu in Project Explorer. Clocks tool allows to configure clocks, display result in graphical way (diagram), perform validations and if the configuration is correct, the tool can regenerate "clock_config.c" in your application.

Regards

Marek

Regards,
Marek

548 Views
perchsaucedo
Contributor I

Hi Marek,

thanks for your answer.

I checked out the Clocks config tool, and made the config show in this figure because I want to use an external 32.768KHz clk. (ABS07-32.768KHZ-T)

The problem is that I want to send the actual date on the MCU, but the seconds never increment, so the date never actualize it.

pastedImage_1.png

is there any thing I'm doing wrong in the config?

Regards!

0 Kudos

548 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Sergio,

Does this problem solved ?  If no , you can share your configure project , I will check it on my side .


Have a great day,
TIC

--------

0 Kudos