Is "CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC = 32768" correct for nRF52840?

Wang, Steven L


   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

void test_kernel_systick(void)
        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 { to automatically receive all group messages.