Hi,
then i am starting the timer with configuration :
Hi,
then i am starting the timer with configuration :
The resolution of the kernel timers depend on which clock you are using. We are using RTC on nRF and the configuration CONFIG_SYS_CLOCK_TICKS_PER_SEC is set to 32768 in our samples.
You should not use k_timer for creating timeouts less than the resolution of the system timer.
The resolution of the kernel timers depend on which clock you are using. We are using RTC on nRF and the configuration CONFIG_SYS_CLOCK_TICKS_PER_SEC is set to 32768 in our samples.
You should not use k_timer for creating timeouts less than the resolution of the system timer.
I try to put K_MSEC(1) but the work handler called after 1.117 ms.
.
i fareget that i changed
static int hfclock_config_and_start(void) { int ret; /* Use this to turn on 128 MHz clock for cpu_app */ ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1); ret -= NRFX_ERROR_BASE_NUM; if (ret) { return ret; } nrfx_clock_hfclk_start(); while (!nrfx_clock_hfclk_is_running()) { } return 0; }
Thanks
MaximSh said:I try to put K_MSEC(1) but the work handler called after 1.117 ms.
Are you calling K_MSEC(1) inside the worker handler or are you queuing the worker handler after K_MSEC(1)? After queuing the work handler, it will not necessary be called immediately if there are higher priority interrupts/threads/worker handlers that are pending to run.
If you want higher resolution timer I recommend you to use the API in modules\hal\nordic\nrfx\drivers\include\nrfx_timer.h
Can i use nrfx_timer with zephyr SDK? or use counter API?
nrfx_timer is OS agnostic, so you can still use it in your application even in Zephyr SDK