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

nRF52832 System OFF with Wake on Reset

The latest rev of the product spec (1.1 when this was posted) includes a table on page 77 that indicates that the System OFF draw depends on a wakeup source (e.g. GPIO, NFC, reset, etc). Links to Product Specs including this rev: Product Specs in pdf format

Support for going into System OFF does not seem to include specifying a wakeup source. Specifically, calling sd_power_system_off() or setting NRF_POWER->SYSTEMOFF = 1.

Is there another way to specify and limit the source of wakeup to reset to get a lower power draw when in System OFF?

  • Hi,

    This is done by calling different functions before going to system off.

    When in System OFF mode, the device can be woken up through one of the following signals:

    • The DETECT signal, optionally generated by the GPIO peripheral
    • The ANADETECT signal, optionally generated by the LPCOMP module
    • The SENSE signal, optionally generated by the NFC module to “wake-on-field”
    • A reset

    GPIO, no RAM retention (1.2µA)

    This is your basic press button to wake up.

    nrf_gpio_cfg_sense_input(YOUR_PIN_NUMBER, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
    sd_power_system_off():
    

    LPCOMP, no RAM retention (1.9µA)

    The LPCOMP can wake up the system from System OFF by asserting the ANADETECT signal. The ANADETECT signal can be derived from any of the event sources that generate the UP, DOWN and CROSS events. In case of wakeup from System OFF, no events will be generated, only the ANADETECT signal.

    /** Configures and enables the LPCOMP
     */
    void LPCOMP_init(void)
    {	
    	/* Enable interrupt on LPCOMP CROSS event */		
    	NRF_LPCOMP->INTENSET = LPCOMP_INTENSET_CROSS_Msk;
    	NVIC_EnableIRQ(LPCOMP_IRQn);	
    	
    	/* Configure LPCOMP - set input source to AVDD*4/8 */
    	NRF_LPCOMP->REFSEL |= (LPCOMP_REFSEL_REFSEL_Ref4_8Vdd << LPCOMP_REFSEL_REFSEL_Pos);
    	/* Configure LPCOMP - set reference input source to AIN pin 6, i.e. P0.5 */
    	NRF_LPCOMP->PSEL |= (LPCOMP_PSEL_PSEL_AnalogInput6 << LPCOMP_PSEL_PSEL_Pos);
    	
    	/* Enable and start the low power comparator */
    	NRF_LPCOMP->ENABLE = LPCOMP_ENABLE_ENABLE_Enabled;	
    	NRF_LPCOMP->TASKS_START = 1;
    }
    

    NFC field, no RAM retention (0.7 µA)

    When using NFCT you will likely use the library anyway, I believe it is automatically put in sense mode, or you may be able to configure it (I'm not that familiar with the library).

    Wake-on-field is supported in SENSE mode while the device is either in System OFF or System ON mode. When the antenna enters an NFC field, an event will be triggered notifying the system to activate the NFC functionality for incoming frames.

    In system OFF, the NFC Low Power Field Detect function can wake the system up through a reset. The NFC bit in register RESETREAS will be set as cause of the wake-up.

    Wake on reset, no RAM retention (0.7µA)

    No applicable code, debug reset.

    Wake on reset, full RAM retention (1.0 µA)

    No applicable code, debug reset.

    Full RAM retention is only specified for one case, an estimate for the other cases can be seen from the ΔI.

    Best regards,

    Øyvind

  • Hi Øyvind,

    How do I determine the wake up source after going into low power?

    Thank you Riyad

  • There is register for it (applies if you boot from any situation, not only power off).

Related