cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F031x6 RTC Wakeup Timer

xarion
Associate II
Posted on December 25, 2017 at 22:04

Hi Guys

I'm trying to implement the function HAL_RTCEx_SetWakeUpTimer_IT in stm32f0xx_hal_rtc_ex.h file.

My device is STM32F031x6

However I see the following code in the .h file:

#if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F070xB) || defined(STM32F030xC) 

/* RTC Wake-up functions ******************************************************/

/** @defgroup RTCEx_Exported_Functions_Group2 Extended RTC Wake-up functions

* @{

*/

HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);

HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);

uint32_t HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc);

uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc);

void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc);

void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc);

HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

#endif

Does this mean that MCU's other than the list in the #if do not support rtc wakeup timers? surely not?

Many thanks:)

Xarion
2 REPLIES 2
xarion
Associate II
Posted on January 09, 2018 at 19:39

has anyone worked with the wakeup timer and cubemx, perhaps its better not to use the HAL for this?
jiangpen
Associate II
Posted on January 18, 2018 at 22:59

I have exactly same question with you, do you get it working?