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

1Sec App Timer Consumption

Hi, I am trying to do a GPIO operation every one second repeated in 51822. I am using app timer to get this work done. The current average consumption is 45uA/H. The handler is like this.

nrf_gpio_pin_set(21); 
nrf_delay_ms(10); 
nrf_gpio_pin_clear(21); 

is there any way to bring the consumption down further??. I am using S130.

  • Using nrf_delay_ms() or any of the other simple delay function gives the worst possible power consumption as it keeps the processor working constantly performing NOPs. It's also pretty inaccurate, more so the more the processor is doing.

    Use an app_timer or anything else based off the RTC which will allow you to sleep most of the time and only wake when interrupted.

  • Thanks u RK. Can you give me an example snippet to achieve this. My requirement is one square pulse for 5ms on one of the gpio pins without using Delay Function.

  • Hi, My doubt is not app timer. My app timer is working well. In the ISR I have a gpio blinky function using nrf_delay_ms. My objective is to create a single square pulse every 1 sec. The delay function is consuming power. Is there any other way to do this!?

  • Toggling a GPIO at 1 sec application timer interrupts should fulfill your needs.