diff options
| author | Ulf Lilleengen <[email protected]> | 2025-10-29 09:52:16 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-29 09:52:16 +0000 |
| commit | b9a8a834567f32bada6aeab904249a176e9c3df7 (patch) | |
| tree | c1d2aa5b2343d03fbc7dbb9a81ad3e87c25857bc /embassy-nrf | |
| parent | 07602b31f0d7dc8ae06b32197162990bb575a7a8 (diff) | |
| parent | 2120c6e616d88ca3122e92f95a54b92135add51b (diff) | |
Merge pull request #4800 from diondokter/sleep-in-anomaly-fix
[nRF] Add delay in uart anomaly fix
Diffstat (limited to 'embassy-nrf')
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/uarte.rs | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index 3aa8446a1..a0668c495 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 20 | - changed: updated to nrf-pac with nrf52/nrf53/nrf91 register layout more similar to nrf54 | 20 | - changed: updated to nrf-pac with nrf52/nrf53/nrf91 register layout more similar to nrf54 |
| 21 | - added: support for nrf54l peripherals: uart, gpiote, twim, twis, spim, spis, dppi, pwm, saadc | 21 | - added: support for nrf54l peripherals: uart, gpiote, twim, twis, spim, spis, dppi, pwm, saadc |
| 22 | - bugfix: Do not write to UICR from non-secure code on nrf53 | 22 | - bugfix: Do not write to UICR from non-secure code on nrf53 |
| 23 | - bugfix: Add delay to uart init anomaly fix | ||
| 23 | - changed: `BufferedUarte::read_ready` now uses the same definition for 'empty' so following read calls will not block when true is returned | 24 | - changed: `BufferedUarte::read_ready` now uses the same definition for 'empty' so following read calls will not block when true is returned |
| 24 | 25 | ||
| 25 | ## 0.8.0 - 2025-09-30 | 26 | ## 0.8.0 - 2025-09-30 |
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index bf3b73f58..049830aed 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -976,6 +976,14 @@ pub(crate) fn apply_workaround_for_enable_anomaly(r: pac::uarte::Uarte) { | |||
| 976 | break; | 976 | break; |
| 977 | } else { | 977 | } else { |
| 978 | // Need to sleep for 1us here | 978 | // Need to sleep for 1us here |
| 979 | |||
| 980 | // Get the worst case clock speed | ||
| 981 | #[cfg(feature = "_nrf9160")] | ||
| 982 | const CLOCK_SPEED: u32 = 64_000_000; | ||
| 983 | #[cfg(feature = "_nrf5340")] | ||
| 984 | const CLOCK_SPEED: u32 = 128_000_000; | ||
| 985 | |||
| 986 | cortex_m::asm::delay(CLOCK_SPEED / 1_000_000); | ||
| 979 | } | 987 | } |
| 980 | } | 988 | } |
| 981 | 989 | ||
