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

nRF52832 slow pulse low power counting

Hello,

we are currently in the development of a low power, battery powered device that needs to count slow pulses (period between ~10ms and several seconds).

At the moment, we are using a competitor's MCU, but we are considering nRF52832.

Our current MCU in the system consumes ~0.5uA and utilizes a low power counter that handles the pulse counting.

We identified the nRF52832 power consumption in the desired low-power mode with the desired peripherals and it seems ok (but without any counter peripheral enabled) - around 0.4uA. However, we are not happy with the FW handling of pulse counting. So we are considering a COUNTER in low power counter mode. 

We've tried to estimate a power consumption with low power counter, however PS does not provide any useful info regarding this.

We've found some old threads:

https://devzone.nordicsemi.com/f/nordic-q-a/8979/nrf52-very-low-power-counter

https://devzone.nordicsemi.com/f/nordic-q-a/40665/count-slow-pulses-most-power-friendly-way/160440#160440

but they provide (hopefully) preliminary and devastating results (7 or 20 uA!) for low power counter!

Since these threads are done on older revisions of IC, are there any newer information regarding power consumption of counter available?

Thank you for the help in advance and best regards!
Tobias

Parents
  • Hello Tobias,

    I suggest you look into using PPI for this. Programmable Peripheral Interface is a way to set up your peripherals to do simple tasks, without involving the CPU. 

    I don't have an example doing exactly this, but I have an old examplle used for training purposes that sets up two PWM channels using a TIMER and GPIOTE with PPI to toggle pins in a PWM cycle (actually quite similar to what the pwm_library example from the SDK does, but this is a closer to metal approach). 

    You can read a bit about the PPI here:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=4_2_0_21#concept_sxf_21l_1s

    And here is the PWM PPI example I was talking about:

    ppi_double_channel_pwm.zip

    Please note that this was written for Keil in SDK14.0.0, but the main.c file should run in pretty much any SDK with any IDE, since it only uses the registers directly.

    What I was thinking was that you can use one PPI channel to detect (EEP) the HITOLO or LOTOHI events on a GPIO, and then use a TIMER in counter mode to perform the increments tasks (TEP). 

    Have a look at it. As mentioned, you can do this counting without including the CPU at all (after it is set up of course). 

    You can then manually read out the count value from your TIMER registers.

    Best regards,

    Edvin

Reply
  • Hello Tobias,

    I suggest you look into using PPI for this. Programmable Peripheral Interface is a way to set up your peripherals to do simple tasks, without involving the CPU. 

    I don't have an example doing exactly this, but I have an old examplle used for training purposes that sets up two PWM channels using a TIMER and GPIOTE with PPI to toggle pins in a PWM cycle (actually quite similar to what the pwm_library example from the SDK does, but this is a closer to metal approach). 

    You can read a bit about the PPI here:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=4_2_0_21#concept_sxf_21l_1s

    And here is the PWM PPI example I was talking about:

    ppi_double_channel_pwm.zip

    Please note that this was written for Keil in SDK14.0.0, but the main.c file should run in pretty much any SDK with any IDE, since it only uses the registers directly.

    What I was thinking was that you can use one PPI channel to detect (EEP) the HITOLO or LOTOHI events on a GPIO, and then use a TIMER in counter mode to perform the increments tasks (TEP). 

    Have a look at it. As mentioned, you can do this counting without including the CPU at all (after it is set up of course). 

    You can then manually read out the count value from your TIMER registers.

    Best regards,

    Edvin

Children
Related