Re: Is "CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC = 32768" correct for nRF52840?
toggle quoted messageShow quoted text
From: firstname.lastname@example.org <email@example.com> On
Behalf Of Wang, Steven L via Lists.Zephyrproject.Org
Sent: 28 June 2019 10:03
Subject: [Zephyr-devel] Is "CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC = 32768"
correct for nRF52840?
Does anyone know if "CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC = 32768" is
correct for nRF52840? I call test_kernel_systick() with reel_board and
it always fails. I tried to print "start_time" and "stop_time"
and found that "stop_time - start_time" was around "32670". However, it
is supposed to be a number bigger than "32768". So, I'm wondering if
"32768" is correct setting.
#define WAIT_TIME_US 1000000
u32_t start_time, stop_time, diff;
start_time = osKernelSysTick();
stop_time = osKernelSysTick();
diff = SYS_CLOCK_HW_CYCLES_TO_NS(stop_time -
start_time) / NSEC_PER_USEC;
zassert_true(diff >= WAIT_TIME_US, NULL); }
Join firstname.lastname@example.org to automatically receive all group messages.