Internal RTC for K3 Controller

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

Internal RTC for K3 Controller

667 Views
Prasanth_C
Contributor II

Hello @VaneB @nxp , I am working on the internal RTC in the K322 controller, but I am unable to see the date and time values increasing. Could you kindly give any example code for the K3 RTC? I have seen that there isn't RTC for the K3.

Prasanth_C_0-1715601396698.png

 

while get time and date, i got same value which i have configured through RTC. configured value not got incremented.(ex. seconds i set as 10S but while reading seconds value was not incrementing).

0 Kudos
Reply
3 Replies

616 Views
Prasanth_C
Contributor II

Hey, @VaneB Thank you for your response. I've figured out how to address this. In simple terms, I didn't modify the RTC clock source in your RTC API, it was set to 0 by default. I changed this clock source to 1 by altering the Init structure, and now that it's working, could you kindly fix the RTC channel clock source issue.

 

Prasanth_C_0-1715833803421.png

i have attached image for your reference.

0 Kudos
Reply

608 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Prasanth_C 

The Rtc Channel Clock Source can be changed in the clock tool by modifying the RTC MUX.

VaneB_0-1715900993821.png

0 Kudos
Reply

628 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Prasanth_C 

Could you share your configurations? Which RTD version are you using?

Also, reviewing your code I saw that you do not call IntCtrl_Ip_EnableIrq(RTC_IRQn) to set the RTC 0 interrupt, try calling Rtc_Ip_EnableInterrupt() before starting the timer, and instead of using Rtc_Ip_StartTimer() use Rtc_Ip_StartCounter().

 

B.R.

VaneB

0 Kudos
Reply