Zephyr RTC Alarm versus k_timer_start

Dear Customer Support,

Wanted to open a case to follow up on this old one Case ID: 335484  

 nRF52840 with Zephyr RTOS: How to use RTC with struct rtc_time? 

I initially looked at the counter alarm under

https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/counter/alarm/src

using rtc0 and counter_set_channel_alarm

Test environment nRF52840, but this seems to be pretty generic to any other nRF platform

I have few high level questions:

1-what would be the pros and cons of using the Zephyr counter alarm feature versus using the plain Zephyr k_timer_start with a registered callback?

2-with the counter alarm feature, there is an upper limitation on the alarm duration around 8 second, as obtained by

counter_get_top_value or counter_get_max_top_value

how to increase that maximum tick value to configure a higher duration value?

3-if we force the device into a power off state using sys_poweroff(), is there a possibility to wake up the device through an RTC callback

There is an available sample that shows how to wake up using a button press, so the idea is to replace the button by a RTC wake up

Thank you

Jamal

PS

I will have more follow up questions later...

Parents Reply
  • Re: Only nRF54L can have the GRTC running in systemoff and wake up on GRTC.

    This is important information!

    Reviewing the product specification document nRF52840_PS_v1.11.pdf / Sectin 5.2.1.1 Sleep

    There is a mention of "System ON, no RAM retention, wake on RTC (running from LFRC clock)"

    But no mention of "wake on RTC" when in System OFF state

    However, there is a mention of "System OFF, no RAM retention, wake on LPCOMP"

    What is LPCOMP?

    I understand that a button press configuration would allow a wake up from System OFF state. There is a sample demonstrating that.

    Jamal

Children
No Data
Related