diff --git a/baremetal/src/platform/bao1x/bao1x.rs b/baremetal/src/platform/bao1x/bao1x.rs index f44209d7f..2878560c3 100644 --- a/baremetal/src/platform/bao1x/bao1x.rs +++ b/baremetal/src/platform/bao1x/bao1x.rs @@ -98,7 +98,15 @@ pub fn early_init() { bao1x_hal::board::setup_camera_pins(&iox); bao1x_hal::board::setup_kb_pins(&iox); bao1x_hal::board::setup_oled_power_pin(&iox); - bao1x_hal::board::setup_trng_power_pin(&iox); + + let trng_power = bao1x_hal::board::setup_trng_power_pin(&iox); + // kernel expects the TRNG to be on + iox.set_gpio_pin(trng_power.0, trng_power.1, bao1x_api::IoxValue::High); + + let (port, pin) = bao1x_hal::board::setup_dcdc2_pin(&iox); + // low connects DCDC2 to the chip + iox.set_gpio_pin(port, pin, IoxValue::Low); + // make sure SE0 is cleared let (port, pin) = bao1x_hal::board::setup_usb_pins(&iox); iox.set_gpio_pin(port, pin, IoxValue::High); diff --git a/baremetal/src/repl.rs b/baremetal/src/repl.rs index 8884439aa..57b701e9d 100644 --- a/baremetal/src/repl.rs +++ b/baremetal/src/repl.rs @@ -925,7 +925,7 @@ impl Repl { let base = ref_data[0]; // increment whatever is in the original area let try_write = [base + 1 + i as u8; 32]; // crate::println!("orig ({:x}): {:x?}", region, test_data); - rram.write_slice(region, &try_write).unwrap(); + rram.write_slice(region, &try_write).ok(); // we expect write errors, don't panic on failure if writable { if ref_data != try_write { crate::println!(