rtc: get wakup irq working
This commit is contained in:
@ -7,6 +7,7 @@ use embassy_time::Duration;
|
||||
|
||||
use crate::interrupt;
|
||||
use crate::interrupt::typelevel::Interrupt;
|
||||
use crate::pac::EXTI;
|
||||
|
||||
const THREAD_PENDER: usize = usize::MAX;
|
||||
const THRESHOLD: Duration = Duration::from_millis(500);
|
||||
@ -28,6 +29,9 @@ pub fn stop_with_rtc(rtc: &'static Rtc) {
|
||||
crate::interrupt::typelevel::RTC_WKUP::unpend();
|
||||
unsafe { crate::interrupt::typelevel::RTC_WKUP::enable() };
|
||||
|
||||
EXTI.rtsr(0).modify(|w| w.set_line(22, true));
|
||||
EXTI.imr(0).modify(|w| w.set_line(22, true));
|
||||
|
||||
unsafe { RTC = Some(rtc) };
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user