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

how to enter "power down" mode in nrf52832

Hello,

I was using the nrf24LE1 where i used hal_nrf_set_power_mode() to set the radios' power down mode. Options are power-up and power-down. This is when i was using the HAL_NRF library.

Now I am migrating functionality to the nrf52832 in ESB mode (not using soft device) and I want to perform the same power down function. What function do I use?

Also, is there a way to correlate the functions in HAL_NRF to NRF_ESB when migrating

  • Hi Ed

    The nRF24LE1 radio power mode (inherited from the nRF24L01+) doesn't really exist in the nRF5x series. Instead you have two global power modes (system on and system off), and individual enable/disable states on the different peripherals.

    Only system on sleep allows peripherals like the radio and timers to run (for examples of doing power management without a SoftDevice, refer to this example).

    If you enter system on sleep the base current is only around 2uA, but any peripheral that is running will add to the total. The ESB library should be relatively low power in TX mode, but if you have the receiver enabled it will increase the current consumption significantly.

    There is no proper migration guide from the HAL_NRF library to the new ESB library, but the ESB user guide on the info center is obligatory reading if you are using nrf_esb.

    You can also compare the examples in the nRF5 SDK to the ones in the nRF24LE1 SDK, since they are designed to be compatible.

    Best regards
    Torbjørn

  • Thank you for answering my question. Regarding the system on and system off modes in the referenced example:

    1. question 1 on terminology... Is NRF_POWER->SYSTEMOFF = 1; used to disable the radio peripheral and/or enter system off mode. Are these two the same thing but only in the case of the radio peripheral? In other words, does disabling the radio peripheral put you in system off mode?

    2. question 2 on how the system exits system off mode... NRF_POWER->SYSTEMOFF = 1; is used to enter system off mode/disable radio peripheral, and by configuring BUTTON_2 with "sense enabled" NRF_GPIO_PIN_SENSE_LOW, whenever this pin senses a low condition, will the processor exit system off mode and reset and start code execution from the top?

  • Hi Ed

    1. NRF_POWER->SYSTEMOFF = 1; is used to enter system off mode, and has nothing to do with the radio on a systems level. The radio will stop working if you enter system off, but that is just because the regulators and clocks are shut off.
      Disabling peripherals doesn't alter the global sleep state.

    2. Correct. Pin wakeup is one of the few wakeup sources available in system off mode. A system off wakeup will always cause a reset of the code, and execution will start from the top. Memory might still be retained, depending on the memory retention settings.

    Best regards

  • thank you - this answers all my questions on this topic

Related