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

ソリューションへジャンプ
828件の閲覧回数
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 解決策
801件の閲覧回数
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 返答(返信)
788件の閲覧回数
pciampanelli
Contributor I

Thanks Raul,

this solves the issue

best regards,

Paolo

0 件の賞賛
802件の閲覧回数
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 件の賞賛