S32K314 MCAL RTC config

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

S32K314 MCAL RTC config

369 Views
zhouhui
Contributor I

hi, I am using S32K314 MCAL to config RTC.

In the project,  RTC clock is 32.768Khz, so config "RTC_IP_CLOCK_SOURCE_0" as rtc clock source,  and enable DivBy512 & DivBy32, automatic calculate GptChannelTickFrequency  value is 2. 

But EB generate RTC code,  RTC_IP_TICKS_PER_SECOND value always is 0, so get time is wrong. So how can I change the value through mcal configuration?

 

0 Kudos
Reply
1 Reply

305 Views
NamLee
NXP Employee
NXP Employee

Hi zhouhui,

Please take a look at this.

Definition_of_RTC_IP_TICKS.png

Maybe the value 0 comes from the fact that you didn't enable RTC in GptHwIp, or RTC conditions are met but calculated value for in used clock still 0.

Please add RTC channel configuration

GpthwIp_RTC.png

After configure GptRtc, please enable channel by tick them in HwConfiguration part.

RTC_ChannelIsUsed.png

Please let me know if have further information.

Thank you,

Nam.

0 Kudos
Reply