mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 05:45:19 +01:00
Require exclusive access to the RESET peripheral for RP2040/RP2350
If you don't have exclusive access to the RESET peripheral, someone else could race you on the read/modify/write cycle on the update of the RESETS.reset register. This is a breaking change.
This commit is contained in:
parent
a2dfb62ffc
commit
c04b02e7c9
2 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ impl TimerBackend {
|
|||
/// **Do not use this function directly.**
|
||||
///
|
||||
/// Use the prelude macros instead.
|
||||
pub fn _start(timer: TIMER0, resets: &RESETS) {
|
||||
pub fn _start(timer: TIMER0, resets: &mut RESETS) {
|
||||
resets.reset().modify(|_, w| w.timer0().clear_bit());
|
||||
while resets.reset_done().read().timer0().bit_is_clear() {}
|
||||
timer.inte().modify(|_, w| w.alarm_0().bit(true));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue