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

app timer current consumption

Hello,

I would like to use app timer based on RTC1 in order to wake up the MCU every X sec. The app timer seems to work correctly when the MCU is working. I use the following code to initialize it :

void init_timer()
{
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
//APP_TIMER_TICKS(1, APP_TIMER_PRESCALER);
APP_TIMER_DEF(Avid_timer_id);
uint32_t err_code;

// Create timers
err_code = app_timer_create(&Avid_timer_id,
APP_TIMER_MODE_REPEATED,
Avid_timer_handler);
APP_ERROR_CHECK(err_code);

// Start timers
err_code = app_timer_start(Avid_timer_id, APP_TIMER_TICKS(1, APP_TIMER_PRESCALER), NULL);
APP_ERROR_CHECK(err_code);

Avid_ticks = ctr_tick;
Avidflag_PC.my_flag.app_timer_enable = 1;

}

With this the handler is called every 1 ms.

When I am in power down down mode without app timer (using app_timer_stop_all(); to stop it) the average current consumption is around 30µA. 

When I am in power down mode with app timer, the average current consumption is around 110 µA. 

Do you know what is wrong in my software and cause this high current consumption?

For information, I use the following code to enter in low power mode

static void power_manage(void)
{
//Used to stop interrupt flag of the floating co processor
__set_FPSCR(__get_FPSCR() & ~(0x0000009F));
(void) __get_FPSCR();
NVIC_ClearPendingIRQ(FPU_IRQn);

//Enter in low power mode
uint32_t err_code = sd_app_evt_wait();
APP_ERROR_CHECK(err_code);
}

By advanced, thank you for your help.

BR.

Parents
  • The RTC draws negligible current.  Only 0.1uA according to the data sheet.

    I have used it on several projects and never had any issues with a power manage and getting the current to go to about 1.9uA for the entire device.

    Based on your assertion that the power down number is 30uA, I would guess you are doing something wrong with your current measurement.  The spec shows about 1.2 to 1.5 for a system off.

    Measuring microamps requires a really precise DMM with very little offset.  I have a stand alone bench unit just for that purpose. If that is not in your budget you can probably do decent measurements with a series resistance and an o-scope.  Some people in the DevZone use the PPK and seem to like it.

    Also possible your choice of app ticks is too small.  This drives the minimum resolution of the app timer. Normally people set it large to keep the cpu from waking up too much.  Can't tell from your code since it's not there.

Reply
  • The RTC draws negligible current.  Only 0.1uA according to the data sheet.

    I have used it on several projects and never had any issues with a power manage and getting the current to go to about 1.9uA for the entire device.

    Based on your assertion that the power down number is 30uA, I would guess you are doing something wrong with your current measurement.  The spec shows about 1.2 to 1.5 for a system off.

    Measuring microamps requires a really precise DMM with very little offset.  I have a stand alone bench unit just for that purpose. If that is not in your budget you can probably do decent measurements with a series resistance and an o-scope.  Some people in the DevZone use the PPK and seem to like it.

    Also possible your choice of app ticks is too small.  This drives the minimum resolution of the app timer. Normally people set it large to keep the cpu from waking up too much.  Can't tell from your code since it's not there.

Children
No Data
Related