Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK

Is it possible to enable and disable the ADC peripheral of nRF52840 to save power in nRF connect SDK? In our application, we use ADC to get battery voltage samples after every 1 hour. I was thinking if it would be useful to enable and disable ADC peripherals during inactive use to save power. If Yes, how to do it in nRF connect SDK? I am not able to find any API. 

Parents
  • Hi,

    Are you using the Zephyr ADC APIs, or are you using the NRFX SAADC driver API? The Zephyr API does not have any functions to uninit the SAADC, but the NRFX driver does have a uninit function. Are you experiencing high current consumption? Optimally, the Zephyr driver should not have high current consumption between sampling, but this depends a bit on your configuration.

    Best regards,
    Jørgen

  • As far as I can see in the driver implementation, the Zephyr API will only sample the enabled channels once when the read function is called, which will make the SAADC peripheral go into the IDLE state once the sampling is completed. While in the IDLE state, the SAADC peripheral should consume relatively low current (few uA range). If you want to use more advanced features, the nrfx API can be used.

  • Hi  ,

    Thanks for sharing this info.

    Now I have below conclusion and I want you to review it.

    1. To have the full control of the hardware like sleep mode in peripherials and easyDMA, etc, we should use nrfx drivers.

    2. If the answer for 1. is yes, Zephyr RTOS APIs useful for resource controls like thread, semaphores, etc.

    3. Does Nordic have any plan to implment NRFX specific APIs for Zephyr underlayer implementation in the case of Zephyr RTOS decided to introduced lower power sleep mode apis for each peripherals.

    Thanks

Reply
  • Hi  ,

    Thanks for sharing this info.

    Now I have below conclusion and I want you to review it.

    1. To have the full control of the hardware like sleep mode in peripherials and easyDMA, etc, we should use nrfx drivers.

    2. If the answer for 1. is yes, Zephyr RTOS APIs useful for resource controls like thread, semaphores, etc.

    3. Does Nordic have any plan to implment NRFX specific APIs for Zephyr underlayer implementation in the case of Zephyr RTOS decided to introduced lower power sleep mode apis for each peripherals.

    Thanks

Children
No Data
Related