diff options
| author | Matthew Tran <[email protected]> | 2025-10-22 18:59:34 -0500 |
|---|---|---|
| committer | Matthew Tran <[email protected]> | 2025-10-24 01:51:32 -0500 |
| commit | 75ad0684f28ccb6b2a5b4772894e8c6a4f327299 (patch) | |
| tree | 3f350905588a4bbb966623f2bcb97a917bfc4198 /embassy-nrf | |
| parent | 4434dc5712f93e5f67852cd07a216cc33ff8f79d (diff) | |
nrf: use DETECTMODE_SEC in GPIOTE in secure mode
DETECTMODE only applies to pins assigned to non-secure.
Diffstat (limited to 'embassy-nrf')
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index 94fc58ca2..0280e2730 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 12 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l | 12 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l |
| 13 | - changed: do not panic on BufferedUarte overrun | 13 | - changed: do not panic on BufferedUarte overrun |
| 14 | - added: allow direct access to the input pin of `gpiote::InputChannel` | 14 | - added: allow direct access to the input pin of `gpiote::InputChannel` |
| 15 | - bugfix: use DETECTMODE_SEC in GPIOTE in secure mode | ||
| 15 | 16 | ||
| 16 | ## 0.8.0 - 2025-09-30 | 17 | ## 0.8.0 - 2025-09-30 |
| 17 | 18 | ||
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 61162b87f..3658657c0 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -77,6 +77,9 @@ pub(crate) fn init(irq_prio: crate::interrupt::Priority) { | |||
| 77 | 77 | ||
| 78 | for &p in ports { | 78 | for &p in ports { |
| 79 | // Enable latched detection | 79 | // Enable latched detection |
| 80 | #[cfg(feature = "_s")] | ||
| 81 | p.detectmode_sec().write(|w| w.set_detectmode(Detectmode::LDETECT)); | ||
| 82 | #[cfg(not(feature = "_s"))] | ||
| 80 | p.detectmode().write(|w| w.set_detectmode(Detectmode::LDETECT)); | 83 | p.detectmode().write(|w| w.set_detectmode(Detectmode::LDETECT)); |
| 81 | // Clear latch | 84 | // Clear latch |
| 82 | p.latch().write(|w| w.0 = 0xFFFFFFFF) | 85 | p.latch().write(|w| w.0 = 0xFFFFFFFF) |
