diff options
| author | Ulf Lilleengen <[email protected]> | 2025-11-24 07:38:02 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-24 07:38:02 +0000 |
| commit | a66d9f6bea6b6e55ba3dfe0f3b86152402e47d3f (patch) | |
| tree | bd14665d894673f58add42a7ed9ab2dff3ff766a | |
| parent | 989efb9852c193d80e57d224a45f8080e5042267 (diff) | |
| parent | df119ba155ffde03503e8072dc9371010e71d105 (diff) | |
Merge pull request #4938 from 0e4ef622/nrf52-temp-trim
embassy-nrf: add workaround for anomaly 66 on nrf52
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/lib.rs | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index f6fe1e14f..be79bde5d 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 27 | - changed: `gpiote::InputChannel::wait()` now takes a mutable reference to `self` to avoid interference from concurrent calls | 27 | - changed: `gpiote::InputChannel::wait()` now takes a mutable reference to `self` to avoid interference from concurrent calls |
| 28 | - changed: `gpiote::InputChannel::wait()` now ensures events are seen as soon as the function is called, even if the future is not polled | 28 | - changed: `gpiote::InputChannel::wait()` now ensures events are seen as soon as the function is called, even if the future is not polled |
| 29 | - bugfix: use correct flash size for nRF54l | 29 | - bugfix: use correct flash size for nRF54l |
| 30 | - changed: add workaround for anomaly 66 on nrf52 | ||
| 30 | 31 | ||
| 31 | ## 0.8.0 - 2025-09-30 | 32 | ## 0.8.0 - 2025-09-30 |
| 32 | 33 | ||
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 2f5ad352f..28d2119ae 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -776,6 +776,30 @@ pub fn init(config: config::Config) -> Peripherals { | |||
| 776 | } | 776 | } |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | // Workaround for anomaly 66 | ||
| 780 | #[cfg(feature = "_nrf52")] | ||
| 781 | { | ||
| 782 | let ficr = pac::FICR; | ||
| 783 | let temp = pac::TEMP; | ||
| 784 | temp.a(0).write_value(ficr.temp().a0().read().0); | ||
| 785 | temp.a(1).write_value(ficr.temp().a1().read().0); | ||
| 786 | temp.a(2).write_value(ficr.temp().a2().read().0); | ||
| 787 | temp.a(3).write_value(ficr.temp().a3().read().0); | ||
| 788 | temp.a(4).write_value(ficr.temp().a4().read().0); | ||
| 789 | temp.a(5).write_value(ficr.temp().a5().read().0); | ||
| 790 | temp.b(0).write_value(ficr.temp().b0().read().0); | ||
| 791 | temp.b(1).write_value(ficr.temp().b1().read().0); | ||
| 792 | temp.b(2).write_value(ficr.temp().b2().read().0); | ||
| 793 | temp.b(3).write_value(ficr.temp().b3().read().0); | ||
| 794 | temp.b(4).write_value(ficr.temp().b4().read().0); | ||
| 795 | temp.b(5).write_value(ficr.temp().b5().read().0); | ||
| 796 | temp.t(0).write_value(ficr.temp().t0().read().0); | ||
| 797 | temp.t(1).write_value(ficr.temp().t1().read().0); | ||
| 798 | temp.t(2).write_value(ficr.temp().t2().read().0); | ||
| 799 | temp.t(3).write_value(ficr.temp().t3().read().0); | ||
| 800 | temp.t(4).write_value(ficr.temp().t4().read().0); | ||
| 801 | } | ||
| 802 | |||
| 779 | // GLITCHDET is only accessible for secure code | 803 | // GLITCHDET is only accessible for secure code |
| 780 | #[cfg(all(feature = "_nrf54l", feature = "_s"))] | 804 | #[cfg(all(feature = "_nrf54l", feature = "_s"))] |
| 781 | { | 805 | { |
