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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,590 次查看
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 项奖励
回复
1 解答
1,563 次查看
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 项奖励
回复
2 回复数
1,550 次查看
pciampanelli
Contributor I

Thanks Raul,

this solves the issue

best regards,

Paolo

0 项奖励
回复
1,564 次查看
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 项奖励
回复