rtc_enable_wakeup_timer() also enables wakeup output on f4 RTC
It took me a while to figure out why a GPIO that happens to be RTC_OUT as AF kept breaking when I'd try to enable RTC wakeup interrupt on an f401 board. I'm not really convinced it should call rtc_enable_wakeup_timer_interrupt() either, but at least that is possibly expected. The brief should probably note that, if it really is desired. From the name and brief I expected it to just set RTC_CR_WUTE.
@brief Enable the wakeup timer @warning You must unlock the registers before using this function
*/ void rtc_enable_wakeup_timer(void) { RTC_CR |= RTC_CR_WUTE | (RTC_CR_OSEL_WAKEUP << RTC_CR_OSEL_SHIFT); rtc_enable_wakeup_timer_interrupt(); }
from the ref manual:
The OSEL[1:0] control bits in the RTC_CR register are used to activate the alarm alternate function output (RTC_ALARM) in RTC_AF1, and to select the function which is output on RTC_ALARM.
[...]
Note: When RTC_CALIB or RTC_ALARM is selected, RTC_OUT is automatically configured in output alternate function.
Almost a full year on this one. Any opinions on whether this is desired behaviour, for some reason?
Am I supposed to decide for us and put a PR?