Skip to content

Commit 90b8f69

Browse files
joerchande-nordic
authored andcommitted
boot: zephyr: Only call sys_clock_disable when supported
Only call sys_clock_disable when the system clock driver support this feature. Signed-off-by: Joakim Andersson <[email protected]>
1 parent 8f289ba commit 90b8f69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boot/zephyr/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ static void do_boot(struct boot_rsp *rsp)
190190
rsp->br_hdr->ih_hdr_size);
191191
#endif
192192

193-
sys_clock_disable();
193+
if (IS_ENABLED(CONFIG_SYSTEM_TIMER_HAS_DISABLE_SUPPORT)) {
194+
sys_clock_disable();
195+
}
194196

195197
#ifdef CONFIG_USB_DEVICE_STACK
196198
/* Disable the USB to prevent it from firing interrupts */

0 commit comments

Comments
 (0)