RTCv2 wakeup tentative fix.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10118 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
4acb7db6d4
commit
81675a0259
|
@ -512,7 +512,8 @@ void rtcSTM32SetPeriodicWakeup(RTCDriver *rtcp, const RTCWakeup *wakeupspec) {
|
|||
while (!(rtcp->rtc->ISR & RTC_ISR_WUTWF))
|
||||
;
|
||||
rtcp->rtc->WUTR = wakeupspec->wutr & 0xFFFF;
|
||||
rtcp->rtc->CR = (wakeupspec->wutr >> 16) & 0x7;
|
||||
rtcp->rtc->CR &= ~RTC_CR_WUCKSEL;
|
||||
rtcp->rtc->CR |= (wakeupspec->wutr >> 16) & RTC_CR_WUCKSEL;
|
||||
rtcp->rtc->CR |= RTC_CR_WUTIE;
|
||||
rtcp->rtc->CR |= RTC_CR_WUTE;
|
||||
}
|
||||
|
|
|
@ -160,6 +160,7 @@ typedef struct {
|
|||
/**
|
||||
* @brief Wakeup as encoded in RTC WUTR register.
|
||||
* @note ((WUTR == 0) || (WUCKSEL == 3)) are a forbidden combination.
|
||||
* @note Bits 16..18 are copied in the CR bits 0..2 (WUCKSEL).
|
||||
*/
|
||||
uint32_t wutr;
|
||||
} RTCWakeup;
|
||||
|
|
Loading…
Reference in New Issue