diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-05-26 16:50:19 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-05-26 16:50:19 +0200 |
| commit | f4736457f5f6d0d72d27d5d560bf048ca2df359f (patch) | |
| tree | 0133074262997db2a20ef74e89856bc29c3a2a06 | |
| parent | f501a1ba2cea0d7e4fdcdc2f289bce65f87528e3 (diff) | |
nrf/timer: use low power counter mode.
The regular one permanently requests HFCLK, while the low power one only does
so while counting, for 1 clock cycle. The regular mode is "deprecated" too.
| -rw-r--r-- | embassy-nrf/src/timer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-nrf/src/timer.rs b/embassy-nrf/src/timer.rs index e9d2132c1..2a0e16a50 100644 --- a/embassy-nrf/src/timer.rs +++ b/embassy-nrf/src/timer.rs | |||
| @@ -124,7 +124,7 @@ impl<'d, T: Instance> Timer<'d, T> { | |||
| 124 | this.stop(); | 124 | this.stop(); |
| 125 | 125 | ||
| 126 | if is_counter { | 126 | if is_counter { |
| 127 | regs.mode.write(|w| w.mode().counter()); | 127 | regs.mode.write(|w| w.mode().low_power_counter()); |
| 128 | } else { | 128 | } else { |
| 129 | regs.mode.write(|w| w.mode().timer()); | 129 | regs.mode.write(|w| w.mode().timer()); |
| 130 | } | 130 | } |
