RTC Alarm flag Issue in LPC54113

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTC Alarm flag Issue in LPC54113

1,227件の閲覧回数
AD11
Contributor I

We're using RTC with 2 timers
1 Khz to wakeup from low power modes
1 hz for alarm events
So what we noticed is sometimes alarm doesn't fire!
digging down we found that when we reset Wakeup Rtc timer "Turn it off then oN" it clears Alarm flag if it's set while it shouldn't as per datasheet 1 khz timer shouldn't affect 1hz timer
Can you please verify as it's causing a big issue to us and advice how to solve!

0 件の賞賛
返信
10 返答(返信)

778件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

Thank you for your patience.

I ran your code on an LPCxpresso54114 board, but it didn’t work well. Maybe you used your own board. Therefore, I modified the RTC demo under the SDK according to your requirements. The original RTC demo focused on alarms, so I added a wake-up interrupt. During debugging, both the alarm and wake-up interrupt triggered successfully.

Due to our company policy, we cannot send code to customers, so I have taken a screenshot of the added code. I highly recommend that you first evaluate based on the SDK RTC demo.

 

Alice_Yang_0-1751255002626.png

Alice_Yang_1-1751255116550.png

 

Thank you.

 

BR

Alice

 

 

0 件の賞賛
返信

891件の閲覧回数
AD11
Contributor I

Any updates??

0 件の賞賛
返信

792件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

Sorry, I just got back from a business trip. I will reply to you today. Thank you.

 

BR

Alice

0 件の賞賛
返信

1,171件の閲覧回数
AD11
Contributor I
Any Updates here?!!
This is causing us a big problem in one of our important products. Please help as we're using a massive number of this MCU!
0 件の賞賛
返信

1,122件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

 Please tell me which low power mode? 

 

BR

Alice

0 件の賞賛
返信

1,108件の閲覧回数
AD11
Contributor I

Hello,
Using 2 modes: Normal sleep and deep sleep.
But it even happens without going to sleep at all. I tried it on a super loop application with no sleep modes

0 件の賞賛
返信

1,085件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @AD11 

Please send your test project code without sleep to me, I help to check on my side. 

Thank you. 

 

BR

Alice

0 件の賞賛
返信

993件の閲覧回数
AD11
Contributor I

Hello,
Can i do in a pesudo code?

/*Main function*/

main(void)
{

 read rtc time();

set RTC alarm after 1 second();

set wakeup interrupt after 2 seconds();

while(1)

{

}

}

/*Handler*/

RTC_Handler()

{

 status = read rtc status();

if(alarm)

{

 print("OK");

}

else if(wakeup)

{

 print("Done);

RTC_EnableWakeupTimer(RTC, false);
RTC_EnableWakeupTimer(RTC, true);

}

}

}

/***************************************************/
You'll see logs till wakeup interrupt is generated.
As you can see i am not clearing any flag just to make sure interrupt is always pending

0 件の賞賛
返信

965件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

From the pesudo code, there is no logic issue.

Please check whether you cleared the flag by mistake.
I still recommend that you share a simple project code that can reproduce the issue.
 
BR
Alice
0 件の賞賛
返信

931件の閲覧回数
AD11
Contributor I

Please find attached an example
Alarm after 1 second
Wakeup interrupt after
Logs will keep printing till wakeup interrupt is fired and wakeup timer is reset then both Alarm and wakeup flags will be cleared which should only be wakeup flag

0 件の賞賛
返信