Skip to content

Commit 0f0276c

Browse files
committed
[nrf noup] boot: zephyr: Delay bm IO button check
nrf-squash! [nrf noup] boot: zephyr: Add bm firmware loader code Delays checking IO button state by 10us after pull-up has been applied to allow time for it to be applied Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 3b20ec3 commit 0f0276c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

boot/zephyr/io_bm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ bool io_detect_pin(void)
9393

9494
nrf_gpio_cfg_input(BOARD_PIN_BTN_0, BM_BUTTONS_PIN_PULLUP);
9595

96+
/* Delay 1 us for pull-up to be applied */
97+
#ifdef CONFIG_MULTITHREADING
98+
k_sleep(K_USEC(1));
99+
#else
100+
k_busy_wait(10);
101+
#endif
102+
96103
pin_active = (bool)nrf_gpio_pin_read(BOARD_PIN_BTN_0);
97104

98105
if (!pin_active) {

0 commit comments

Comments
 (0)