aboutsummaryrefslogtreecommitdiffstats
path: root/src/rp2040/main.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-10-21 21:50:21 -0400
committerKevin O'Connor <kevin@koconnor.net>2022-11-08 09:53:04 -0500
commit6485ff800b56dbb4578afde88e7d22f6b0a25dc8 (patch)
treec68e762a9abd6af3af31292bf4ccedc30e95e9c9 /src/rp2040/main.c
parent42e9adcfc9963b54c71e8851e1a6a41a001531e5 (diff)
downloadkutter-6485ff800b56dbb4578afde88e7d22f6b0a25dc8.tar.gz
kutter-6485ff800b56dbb4578afde88e7d22f6b0a25dc8.tar.xz
kutter-6485ff800b56dbb4578afde88e7d22f6b0a25dc8.zip
rp2040: Support CanBoot as bootloader
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/rp2040/main.c')
-rw-r--r--src/rp2040/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rp2040/main.c b/src/rp2040/main.c
index 462e69c6..eac3a0b9 100644
--- a/src/rp2040/main.c
+++ b/src/rp2040/main.c
@@ -6,6 +6,7 @@
#include <stdint.h> // uint32_t
#include "board/misc.h" // bootloader_request
+#include "generic/armcm_reset.h" // try_request_canboot
#include "hardware/structs/clocks.h" // clock_hw_t
#include "hardware/structs/pll.h" // pll_hw_t
#include "hardware/structs/resets.h" // sio_hw
@@ -45,6 +46,7 @@ DECL_INIT(watchdog_init);
void
bootloader_request(void)
{
+ try_request_canboot();
// Use the bootrom-provided code to reset into BOOTSEL mode
reset_to_usb_boot(0, 0);
}