High consumption after enable APP Timer

I create an app timer for spi communication at 1s.

The I noticed a strange phenomenon.

You can see the 13uA is in sleep mode, when the app timer timeout, CPU wake up,

but in the T1, CPU start running, it lasted one second, then climbed to the crest of the wave,

The crest is my other circuit's consumption (UWB RADIO consumption ) , It means mcu is lasted unknown power consumption for 1 second.

This period of time, I couldn't find out the reason.

static void uwb_upload_handle(void * p_content)
{
    (void)p_content;
    app_state.uwb_upload = true;
}

//Parical init
void init (void)
{
    nrfx_clock_lfclk_start();
    APP_ERROR_CHECK(app_timer_init());
    APP_ERROR_CHECK(app_timer_create(&uwb_task, APP_TIMER_MODE_SINGLE_SHOT, uwb_upload_handle));
    // 1000 ms
    APP_ERROR_CHECK(app_timer_start(uwb_task, APP_TIMER_TICKS(app_params.dw1000_dura), NULL));
}

void application_run(void)
{
    if (app_state.uwb_upload)
    {
        uwb_tx();
        app_state.uwb_upload = false;
        if (app_state.app_mode == LIS_ACT_MODE)
        {  
            APP_ERROR_CHECK(app_timer_start(uwb_task, APP_TIMER_TICKS(app_params.dw1000_dura), NULL));
        }
        else
        {
            APP_ERROR_CHECK(app_timer_start(uwb_task, APP_TIMER_TICKS(app_params.dw1000_lp_dura), NULL));
        }
    }
}


int main(void)
{
    // Don't mind.
    SCB->VTOR = 0x6000;
    __enable_irq();
    
    NRF_POWER->DCDCEN = true;
    
    APP_ERROR_CHECK(nrf_pwr_mgmt_init());
    
    init();
    
    while (true)
    {
        
        idle_state_handle();

        application_run();
    }
}

Parents
  • Hello,

    Is this the complete code running on your device?
    What is the contents of your uwb_tx function?
    The power consumption you are seeing here should only be possible with RADIO usage, so it looks to me like your radio is used continuously before being aborted by your other circuitry.
    The timers will consume nowhere near this level, even if they had continuously been waking up the CPU, so we should look at what else the RADIO peripheral might be used for during this time, which looks to be the uwb_tx. Is there any way for the uwb_tx to use the radio continuously - keeping the device from returning to SYSTEM_ON sleep?
    Could you check if your program might be stuck in the uwb_tx function when this happens?

    Best regards,
    Karl

Reply
  • Hello,

    Is this the complete code running on your device?
    What is the contents of your uwb_tx function?
    The power consumption you are seeing here should only be possible with RADIO usage, so it looks to me like your radio is used continuously before being aborted by your other circuitry.
    The timers will consume nowhere near this level, even if they had continuously been waking up the CPU, so we should look at what else the RADIO peripheral might be used for during this time, which looks to be the uwb_tx. Is there any way for the uwb_tx to use the radio continuously - keeping the device from returning to SYSTEM_ON sleep?
    Could you check if your program might be stuck in the uwb_tx function when this happens?

    Best regards,
    Karl

Children
No Data
Related