This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 RTC Update Issue

Hi,

I'm using nrf52832 to interface RTC using nrf_calendar.c file.

I have start the RTC at 8:59:00, it will reaches 9:00:00. After that automatically it will resets and again start from 8:59:00 upto 9:00:00.

It repeats same operation.

Intialize the RTC time only once in the main().

Kindly give the solution as soon as possible.

Thanks & Regards

Senthilkumar

  • Hi,

    Thanks for your reply.

    i'm using E73-2G4M04S1B module .

    it's have built-in 32.768 Khz clock crystal oscillator. 

    in my project initially, i have advertise then to communicate with android. After that enter into sleep.

    i want to keep RTC in sleep mode. particular time period based on RTC device need to wakeup.

    Here, app_timer is used for advertising sequence. RTC2 used for date & time function.

    RTC2 will operate in sleep mode ? how to wake up from sleep  using RTC?

    By default,RTC 0 is used for softdevice.

    Give better solution. If you have RTC with wakeup related examplemeans kindly share with us.

    Regards,

    Senthilkumar

  • Hi Senthilkumar

    The RTC timers will run fine in the standard system on idle sleep mode, triggered by calling sd_app_event_wait(). 

    Essentially any RTC interrupt will then wake you up from sleep. 

    This works the same for app_timers, so if you schedule an app_timer callback you can go to sleep, and the MCU will be woken up to run the app_timer callback. 

    You should be able to modify the calendar example to go to sleep in between events, you just have to add code to enter sleep in the for loop in main, 

    When not using the SoftDevice you can use the following code to enter system on idle sleep:

    __WFE();
    __SEV();
    __WFE();

    Best regards
    Torbjørn

  • Hi,

    I have read date & time using nrf_calendar(RTC2)  function.

    i have enable the app_timer interrupt functions below mentioned,

    app_timer_create(&awesome_timer, APP_TIMER_MODE_REPEATED, awesome_timeout_handler);
    app_timer_start(awesome_timer,APP_TIMER_TICKS(10000),NULL);

    after initialize, it will enter to idle_state_handle();

    Based on this timer, Every 10 sec once it will generate interrupt then i will start advertising after 10 sec stops the advertising.

    So, the Calendar functions also going well.

    After 1 hour this function will automatically reset and start from beginning.

    Here, i need date & Time continuously also need low power concept.

    give any other solutions.

    Regards,

    Senthilkumar

  • Hi,

    I suspect an assert is causing the fault handler to execute a system reset. That is really the only way for the chip to reset. So please enable DEBUG and check fault handler so you may find the file name, line number and error code causing the assert.

    Best regards,
    Kenneth

Related