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

Maximum Reload time for WDT

Hi Guys, 

We have a need to send data every 4 hours. 

In order to do this, we sleep 1 hour at a time (1-hour timer - single shot) and increment counter, and when the count is 4 we send the data. This is working well. 

Due to unknown reasons the device sometimes can get hung when trying to send the data. 

Our plan was to set the WDT_CONFIG_RELOAD_VALUE to 120000000, to make sure we reset the device after 1 hour if it got stuck. 

But we are unable to provide values more than 600000 (which triggers at 100 seconds). 

Can u suggest a way to configure such a large interval? 

regards

Shankar

Parents Reply
  • Hi Kenneth,

    Yes, but 0.97uA in that link sounds better than 1.5uA Slight smile

    - System ON, no RAM retention, wake on any event  =>  0.97uA

    In my design, battery has to last 10 years, hence nanoamps count. And my device spends 90% of time sleeping.


    Thing is that with no RAM retention only reset wakeup will work, where WDT comes handy.
    You didn't answer my question, is it feasible what I propose?

    Regards

    Kerim

Children
  • The WDT needs the LF clock to be running. LFRC consumes 0.3uA in ULP mode (LFXO is at 0.25uA, but requires much longer startup time)

    0.97uA (sys on, no RAM) + 0.3uA = 1.27 uA. (typical value)

    I did some measurements here and I actually got a bit lower; 972 nA in sleep:

    In my test the WDT is resetting every 10 seconds.

    The wakeup charge is 5.9uC:

    This gives an additional average current of 5.9uC / 3600 sec = 1.6 nA if the WDT is resetting the chip every 1 hour. Which is of course negligible, but with more advanced initialization code, this should maybe be taken into consideration. Here is my test code:

    int main(void)
    {
        NRF_CLOCK->LFCLKSRC = 0; // LFRC
        NRF_CLOCK->LFRCMODE = 1; // ULP mode
        NRF_CLOCK->TASKS_LFCLKSTART = 1; // Start LF clock
        while(!NRF_CLOCK->EVENTS_LFCLKSTARTED){
        }
        NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
        NRF_WDT->CRV = 327680; // WDT wakeup every 10 sec
        NRF_WDT->TASKS_START = 1; // start WDT
        for(int i = 0; i < 8; i++){
            NRF_POWER->RAM[i].POWERCLR = 0x3; // Turn off RAM block 0-7
        }
        NRF_POWER->RAM[8].POWERCLR = 0x3F; // Turn off RAM block 8
        
        for(;;){
            __WFE();
        }
    }

  • That sounds so good, thank you so much for having a look at this. I will test this as soon as possible and report results.

    regards

    Kerim

  • Hi Stian,

    I am actually using nRF52833 which doesn't have ULP mode. Best result is 1.4uA when I select LFXO. As you can see I use 1000 second WDT reload timeout, to enable longer startup time for LFXO. But I don't see variation if I wait for longer. With RC oscillator I am measuring 1.9uA.

    I use NRF Power Profiler for measurement, VDD is 3V. 

    Is this the best I can get with 52833? Or maybe my consumption is higher because of process variation?

    1.4uA is still an improvement compared to 2.3uA sleep current measured in the past when I simply use timer to wakeup and with full RAM retention

        NRF_CLOCK->LFCLKSRC = 1; // LFXO
        //NRF_CLOCK->LFRCMODE = 1; // ULP mode
        //NRF_CLOCK->LFCLKSRC            = (CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos);
    
        NRF_CLOCK->TASKS_LFCLKSTART = 1; // Start LF clock
        while(!NRF_CLOCK->EVENTS_LFCLKSTARTED){
        }
        NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
        NRF_WDT->CRV = 32768000; // WDT wakeup every 100 sec
        NRF_WDT->TASKS_START = 1; // start WDT
        for(int i = 0; i < 8; i++){
            NRF_POWER->RAM[i].POWERCLR = 0x3; // Turn off RAM block 0-7
        }
        NRF_POWER->RAM[8].POWERCLR = 0x3F; // Turn off RAM block 8
        
        for(;;){
            __WFE();
        }

  • Hi, the base current is a little bit higher on 833.

    ION_RAMOFF_EVENT

    System ON, no RAM retention, wake on any event

    1.1

    µA

    So 1.1 + .23 = 1.33 uA, which is the expected typical current. And yes, if you get higher (or lower) current it's because of process variation.

Related