Have you tried to add the following option in your “prj.conf”?
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
Which set the clock tick resolution to 1ms.
From: <devel@...> on behalf of Anthony Kreft <anthony.kreft@...> Date: Wednesday, August 1, 2018 at 08:39 To: "devel@..." <devel@...> Subject: [Zephyr-devel] STM32L0 k_sleep
Hi All,
I noticed with my nucleo_l053r8 board that if I call k_sleep(1) in the basic/blinky sample, the time between LED toggles is about 10 milliseconds instead of 1 millisecond. Could there be a problem with the STM32L0 sleep function that is adding extra time?