Skip to content

Commit b26dca4

Browse files
sandeepmistryfacchinm
authored andcommitted
Add 10ms delay at start of double detector for boards with EZ6301QI to settle
Without this change the board would stay in boot loader when USB cable is freshly plugged in.
1 parent 40b3dcf commit b26dca4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

bootloaders/zero/board_definitions_arduino_mkrvidor4000.h

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
#define PMIC_PIN_SDA 11
6969
#define PMIC_SERCOM SERCOM0
7070

71+
#define HAS_EZ6301QI 1
72+
7173
#define ENABLE_JTAG_LOAD 1
7274
#define TDI 12
7375
#define TDO 15

bootloaders/zero/main.c

+10
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ static void check_start_application(void)
106106
return;
107107
}
108108

109+
#ifdef HAS_EZ6301QI
110+
// wait a tiny bit for the EZ6301QI to settle,
111+
// as it's connected to RESETN and might reset
112+
// the chip when the cable is plugged in fresh
113+
114+
for (uint32_t i=0; i<2500; i++) /* 10ms */
115+
/* force compiler to not optimize this... */
116+
__asm__ __volatile__("");
117+
#endif
118+
109119
/* First tap */
110120
BOOT_DOUBLE_TAP_DATA = DOUBLE_TAP_MAGIC;
111121

0 commit comments

Comments
 (0)