K32L2A41A How to select 1 kHz LPO as a clock source for RTC

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

K32L2A41A How to select 1 kHz LPO as a clock source for RTC

Jump to solution
809 Views
pciampanelli
Contributor I

Hi,

using MCUXpresso IDE I'm trying to configure RTC Clock source to be 1kHz LPO.

The peripheral tool says: "The clock configuration of the RTC peripheral is a part of the clock tool" where the clock for RTC should be selected, but I find no sign of such configuration in Clock tool.

Can anyone help please?

thanks

Paolo

0 Kudos
1 Solution
782 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello @pciampanelli,

It seems that you will have to configurate the RTC Clock Configuration by yourself. You could look at the SDK's examples or call the following function: RTC_SetClockSource(), between RTC_Init() and RTC_Stop().

There you could try to set the LPO as your clock source [in fsl_rtc.h], as follows:

static inline void RTC_SetClockSource(RTC_Type *base)
{
    //
    base->CR |= RTC_CR_LPOS_MASK;
    //
}

Best regards, Raul.

View solution in original post

0 Kudos
2 Replies
769 Views
pciampanelli
Contributor I

Thanks Raul,

this solves the issue

best regards,

Paolo

0 Kudos
783 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello @pciampanelli,

It seems that you will have to configurate the RTC Clock Configuration by yourself. You could look at the SDK's examples or call the following function: RTC_SetClockSource(), between RTC_Init() and RTC_Stop().

There you could try to set the LPO as your clock source [in fsl_rtc.h], as follows:

static inline void RTC_SetClockSource(RTC_Type *base)
{
    //
    base->CR |= RTC_CR_LPOS_MASK;
    //
}

Best regards, Raul.

0 Kudos