NRF52 deep sleep, timer trigger

I want to create a ble application which shall work as a beacon, it will advertise its presence for some time, and then it must enter deep sleep. The device shall remain in the deep sleep for some time and after 5 seconds awake from sleep and perfom ble operations.

We are unable to find any reference for deep sleep with timer awake. We were able to find gpio awake and nfc awake but not timer awake.

Please let us know about any reference for the same.

Parents
  • Hi,

    As you want to wake up based on elapsed time, the nRF will stay in system ON low power mode with the RTC running, so it will be in the same "normal" sleep mode between advertising events and when you stop advertising for some time. So the only thing you need to do here is essentially to use some form of timer to stop and start advertising at the right intervals.

    Which SDK are you using? If you are using the nRF5 SDK, I would use the app timer for that. If you are using the nRF Connect SDK, you want to use the kernel timers in some way. Either with a thread using k_sleep, or for instance with delayable work in the system work queue. 

    And for stopping advertising, use bt_le_adv_stop() and then re-start it again using bt_le_adv_start() if using nRF Connect SDK. If the nRF5 SDK you stop advertising using sd_ble_gap_adv_stop() and start is using either sd_ble_gap_adv_start() or ble_advertising_start() (depending on if you use the SDK advertising module or not).

  • Thank you for the reply Einar Thorsrud.

    I tried with the logic explained above, but the current consumption is more than what is expected.

    I have attached the readings for the same

    .

    The current consumption is reaching 2.1 mA. 


    Please during this bench mark i have disabled the UART logging.

    Ideally the system on sleep should consume current in micro amps right?

  • Can you confirm if you are using nRF5 SDK or nRF Connect SDK?

    Hard to tell from your plots, but is the minimum current consumption 2.131mA and maximum 12.041mA? If current consumption goes up to 12 mA, this means that the radio is active transmitting/receiving packets.

    Abiots said:
    Please during this bench mark i have disabled the UART logging.

    Can you describe the steps you have done to disable UART? base current consumption of ~2mA could correspond with the run current of UART in RX mode if the DCDC regulator is not enabled.

    If you post your full project, it would be easier to help you find the root cause of the high current consumption.

Reply
  • Can you confirm if you are using nRF5 SDK or nRF Connect SDK?

    Hard to tell from your plots, but is the minimum current consumption 2.131mA and maximum 12.041mA? If current consumption goes up to 12 mA, this means that the radio is active transmitting/receiving packets.

    Abiots said:
    Please during this bench mark i have disabled the UART logging.

    Can you describe the steps you have done to disable UART? base current consumption of ~2mA could correspond with the run current of UART in RX mode if the DCDC regulator is not enabled.

    If you post your full project, it would be easier to help you find the root cause of the high current consumption.

Children
Related