From 69c93caadf06ba4425081d621e67f5b917fe1138 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 8 Nov 2025 08:59:19 +0800 Subject: [PATCH] remap PROG pin to effectively reset for alt-boot mode this makes it a little easier to explain the procedure in exiting alt-boot mode --- bao1x-boot/boot1/src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bao1x-boot/boot1/src/main.rs b/bao1x-boot/boot1/src/main.rs index b45d8280b..49af9bbee 100644 --- a/bao1x-boot/boot1/src/main.rs +++ b/bao1x-boot/boot1/src/main.rs @@ -306,6 +306,13 @@ pub fn boot(iox: &Iox, mut oled: Option, se0_port: bao1x_api::IoxPo } }); + // reset instead of boot + #[cfg(feature = "alt-boot1")] + { + let mut rcurst = CSR::new(utra::sysctrl::HW_SYSCTRL_BASE as *mut u32); + rcurst.wo(utra::sysctrl::SFR_RCURST0, 0x55AA); + } + // when we get to this point, there's only two options... try_boot(true); unreachable!("`or_die = true` means this should be unreachable");