diff options
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | embassy-nrf/src/lib.rs | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index 4e0887b0d..5dc941b25 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | - changed: nrf54l: Disable glitch detection and enable DC/DC in init. | ||
| 12 | |||
| 11 | ## 0.7.0 - 2025-08-26 | 13 | ## 0.7.0 - 2025-08-26 |
| 12 | 14 | ||
| 13 | - bugfix: use correct analog input SAADC pins on nrf5340 | 15 | - bugfix: use correct analog input SAADC pins on nrf5340 |
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 |
