nrf_delay_ms clock issues

I'm using nrf_delay_ms in main on "ble_app_beacon", but the delay time is much longer than I set.

I have set 2000ms delay to log, but it seems 4s or longer than I set.

int main(void)
{
	uint32_t num=0;
    // Initialize.
    log_init();
    timers_init();
    leds_init();
    power_management_init();
    ble_stack_init();
    advertising_init();

    // Start execution.
    NRF_LOG_INFO("Beacon example started.");
		NRF_LOG_FLUSH();
    advertising_start();

    // Enter main loop.
    for (;; )
    {
			nrf_delay_ms(2000);
			NRF_LOG_INFO("beacon test %d",num);
			NRF_LOG_FLUSH();
			num++;
        idle_state_handle();
    }
}

Parents Reply Children
No Data
Related