This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What does nrf_saadc_config_t.low_power_mode member do?

Hi,

I see that the NRFX_SAADC_CONFIG_LP_MODE macro sets the default low_power_mode member for the nrf_saadc_config_t struct used to initialize the adc. What I cannot figure out is what exactly this members purpose is. Does it reduce the power consumption of the ADC in some way? Does it enable the ADC to operate under reduced power? 

Thanks.

Parents
  • Hi,

    The low power mode in the SAADC driver will lower the average current consumption of the SAADC in many use-cases, by delaying the starting of the SAADC peripheral until right before sampling.

    When the SAADC peripheral is STARTED (by triggering the START task), the peripheral will enable EasyDMA to store results from sampling in RAM. This operation have quite high current consumption (around 1-2mA, depending on chip and configuration). In normal driver operation, the START task is triggered when the buffers are configured (nrf_drv_saadc_buffer_convert), and the peripheral is ready for triggering of the SAMPLE task at any time. In the low power mode, the START task is not triggered until the sample function (nrf_drv_saadc_sample) is called, and the SAMPLE task is triggered in the interrupt handler, when the STARTED event is generated. This means that the low power mode have more interrupts and will require a bit more CPU time, but if you have a low sample interval, the average current consumption is reduced a lot.

    I have created an example in this GitHub repository that uses the low power mode in the SAADC driver, along with some example current consumption numbers.

    Best regards,
    Jørgen

Reply
  • Hi,

    The low power mode in the SAADC driver will lower the average current consumption of the SAADC in many use-cases, by delaying the starting of the SAADC peripheral until right before sampling.

    When the SAADC peripheral is STARTED (by triggering the START task), the peripheral will enable EasyDMA to store results from sampling in RAM. This operation have quite high current consumption (around 1-2mA, depending on chip and configuration). In normal driver operation, the START task is triggered when the buffers are configured (nrf_drv_saadc_buffer_convert), and the peripheral is ready for triggering of the SAMPLE task at any time. In the low power mode, the START task is not triggered until the sample function (nrf_drv_saadc_sample) is called, and the SAMPLE task is triggered in the interrupt handler, when the STARTED event is generated. This means that the low power mode have more interrupts and will require a bit more CPU time, but if you have a low sample interval, the average current consumption is reduced a lot.

    I have created an example in this GitHub repository that uses the low power mode in the SAADC driver, along with some example current consumption numbers.

    Best regards,
    Jørgen

Children
No Data
Related