aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
diff options
context:
space:
mode:
authorOle Bauck <[email protected]>2025-08-31 09:27:47 +0200
committerOle Bauck <[email protected]>2025-09-01 10:38:26 +0200
commit67ba38e1966a934517ceb641b2dcd4c1c68c02ee (patch)
tree5156f0f789a0afdfcb0c2ba8f55b0537500d563b /embassy-nrf/src
parentf86cf87f2f20f723e2ba2fe7d83908a2b3bac2d1 (diff)
nrf54l: Disable glitch detection and enable DC/DC in init.
Diffstat (limited to 'embassy-nrf/src')
-rw-r--r--embassy-nrf/src/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs
index 2b72debeb..aa4801897 100644
--- a/embassy-nrf/src/lib.rs
+++ b/embassy-nrf/src/lib.rs
@@ -707,6 +707,14 @@ pub fn init(config: config::Config) -> Peripherals {
707 } 707 }
708 } 708 }
709 709
710 // GLITCHDET is only accessible for secure code
711 #[cfg(all(feature = "_nrf54l", feature = "_s"))]
712 {
713 // The voltage glitch detectors are automatically enabled after reset.
714 // To save power, the glitch detectors must be disabled when not in use.
715 pac::GLITCHDET.config().write(|w| w.set_enable(false));
716 }
717
710 // Setup debug protection. 718 // Setup debug protection.
711 #[cfg(not(feature = "_nrf51"))] 719 #[cfg(not(feature = "_nrf51"))]
712 match config.debug { 720 match config.debug {
@@ -1083,6 +1091,15 @@ pub fn init(config: config::Config) -> Peripherals {
1083 reg.vregradio().dcdcen().write(|w| w.set_dcdcen(true)); 1091 reg.vregradio().dcdcen().write(|w| w.set_dcdcen(true));
1084 } 1092 }
1085 } 1093 }
1094 #[cfg(feature = "_nrf54l")]
1095 {
1096 // Turn on DCDC
1097 // From Product specification:
1098 // "Once the device starts, the DC/DC regulator must be enabled using register VREGMAIN.DCDCEN.
1099 // When enabling the DC/DC regulator, the device checks if an inductor is connected to the DCC pin.
1100 // If an inductor is not detected, the device remains in LDO mode"
1101 pac::REGULATORS.vregmain().dcdcen().write(|w| w.set_val(true));
1102 }
1086 1103
1087 // Init GPIOTE 1104 // Init GPIOTE
1088 #[cfg(not(feature = "_nrf54l"))] // TODO 1105 #[cfg(not(feature = "_nrf54l"))] // TODO