Reg the sleep modes and its configuration or library requirements (#includes) for nRF52833

Hi, 

We are working on the nRF52833 in one of our Gateway applications. We want to keep our Gateway in deep sleep (System OFF) mode if it is not configured or On-boarded. And should be in wakeup sleep mode after the On-boarding. We need 2 wakeup mechanisms in our firmware as below.

1. Before Onboarding - Should be in deep sleep mode and should allow only the GPIO interrupt.

2. After Onboarding - Device should be in sleep mode and should be able wakeup with the timer interrupt or GPIO interrupt.

Development Environment: VS Code (NCS v2.5.1)

I found there are many tickets raised in this regard, but unable to understand that the explanations or solutions are not the same in the discussions.

I want to understand the function calls, project config and header files (#include) requirements for the sleep modes. Because I am unable to access the functions which were share in the other tickets.

Please help me with the sleep functions and its library requirements to use in my code to achieve the best sleep mode currents for the longer battery life.

  • How do you measure the current? Do you have a PPK2?

    It's not that easy to follow from your code, but when you are seeing ~22µA, what is turned on then? I believe you have turned off your UART, but what about other peripherals? Are they turned on? And are you running the RTC at this point in time? What is your LFCLK source? LFXTAL or RC Oscillator? What hardware are you running on? an nRF52833 DK or custom HW?

    How about the GPIOs that you set as output? Are they still output pins when you go to sleep?

    BR,
    Edvin

Related