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

The app_timer timeout_handler function will increase current about 200uA

HI,

    Under nRF5_SDK_12.2.0_f012efa, with s132_nrf52_3.0.0_softdevice, run on system on low power mode.

   I define an app_timer,below is my parameter

    APP_TIMER_DEF(m_second_id);    //Timer ID

    #define SECOND_INTERVAL       APP_TIMER_TICKS(1000, APP_TIMER_PRESCALER)   //timer interval

    //timeout function

    static void sec_timeout_handler(void * p_context)

    {
    uint32_t count = 0;

#ifdef    TEST
    count = 2400;  //  run for 14ms
      while(1)
      {
        count--;
        for(i=0;i<5;i++);
        if(count == 0)
        {
             break;
        }
      }

#endif
    }

    if undef TEST, the current is stable at 30uA ,

    if def TEST, the current will increase, the value is range between 20 to 200uA .

    if the timeout function run more than millisecond, the current will increase, what  error will produce this problem?

    best regards

 

Parents
  • Hi,

     

    If your function takes ~15 ms, then your added average current consumption would be approx:

    15 ms / 1000 ms * I_cpu = 15/1000 * 7 mA = ~105 uA.

     

    In general it is advised to keep interrupts short, so that you do not block other interrupts in your system.

    What problem are you seeing?

     

    Best regards,

    Håkon

  • Hi, 

    my problem is when the sec_timeout_handler call for three time the current will increase to 200uA.。

    And  i cannot understand why current reference is 7mA ?

     in  nRF52832 Product Specification v1.4 

    chapt  17 Power and clock management

    when radio id on ,the current is  

        IRADIO_TX0 0 dBm TX @ 1 Mb/s Bluetooth Low Energy mode, Clock = HFXO 7.1 mA

    when system on lower power mode, the current is

        ION_RAMOFF_EVENT System ON, No RAM retention, Wake on any event 1.2 µA
        I
    ON_RAMON_EVENT System ON, Full RAM retention, Wake on any event 1.5 µA
        I
    ON_RAMOFF_RTC System ON, No RAM retention, Wake on RTC               1.9 µA

    Thanks

Reply
  • Hi, 

    my problem is when the sec_timeout_handler call for three time the current will increase to 200uA.。

    And  i cannot understand why current reference is 7mA ?

     in  nRF52832 Product Specification v1.4 

    chapt  17 Power and clock management

    when radio id on ,the current is  

        IRADIO_TX0 0 dBm TX @ 1 Mb/s Bluetooth Low Energy mode, Clock = HFXO 7.1 mA

    when system on lower power mode, the current is

        ION_RAMOFF_EVENT System ON, No RAM retention, Wake on any event 1.2 µA
        I
    ON_RAMON_EVENT System ON, Full RAM retention, Wake on any event 1.5 µA
        I
    ON_RAMOFF_RTC System ON, No RAM retention, Wake on RTC               1.9 µA

    Thanks

Children
No Data
Related