Skip to content

Commit 4b74623

Browse files
committed
[Workaround] Delay LED initialization
1 parent b70b6dd commit 4b74623

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/picoboot.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,17 @@ size_t validate_payload() {
5959
void main()
6060
{
6161
stdio_init_all();
62-
63-
while (!tud_cdc_connected()) {
64-
// wait for USB
65-
}
66-
6762
adc_init();
6863
s_board_type = hw_detect_board_type();
6964

7065
printf("PicoBoot (%s) by webhdx (c) 2025\n", FW_VER_STRING);
7166
printf("Board Type: %s\n", hw_board_type_to_string(s_board_type));
7267

73-
status_led_init(s_board_type);
74-
status_led_on();
75-
7668
size_t payload_size = validate_payload();
7769
if (payload_size == SIZE_MAX) {
7870
printf("PicoBoot: Invalid payload. Entering infinite loop.\n");
71+
status_led_init(s_board_type);
72+
7973
while (true) {
8074
sleep_ms(500);
8175
status_led_toggle();
@@ -154,6 +148,9 @@ void main()
154148

155149
printf("PicoBoot: Finished injecting payload. Entering infinite loop.\n");
156150

151+
status_led_init(s_board_type);
152+
status_led_on();
153+
157154
while (true) {
158155
tight_loop_contents();
159156
}

0 commit comments

Comments
 (0)