AnsweredAssumed Answered

Wakeup Standby from WKUP pin AND RTC Timer

Question asked by yoann.guerin on Jul 22, 2016
I have problem to wake up from standby mode.
I ma working on STM32L162, WKUP2 is on PC13
I succeed to wake from RTC timer or with the WKUP2 pin individually on my board, but when i want to be wake from one or the other i have problem.
I can be wake from WKUP pin when i am in standby but not with the RTC. After the delay of RTC timer passed i can't be wakeup from WKUP it's seems that there a conflict maybe on the interrupt...
My code is below, i comment "HAL_RTCEx_SetWakeUpTimer_IT" to be wake from WKUP and "HAL_PWR_EnableWakeUpPin" to be wake from RTC timer (timeout is 10s)

void enter_standby_mode(void)
    /* RTC configuration */ 
    RTCHandle.Instance = RTC; 
    RTCHandle.Init.HourFormat = RTC_HOURFORMAT_24;
    RTCHandle.Init.AsynchPrediv =0x7F;   // LSE as RTC clock: RTC_ASYNCH_PREDIV
    RTCHandle.Init.SynchPrediv =  0x00FF; // LSE as RTC clock: RTC_SYNCH_PREDIV;
    RTCHandle.Init.OutPut = RTC_OUTPUT_DISABLE;
    RTCHandle.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
    /* Disable Wake-up timer */
    /* Clear PWR wake up Flag */
    /* Clear RTC Wake Up timer Flag */
    /* Setting the Wake up time */
    HAL_RTCEx_SetWakeUpTimer_IT(&RTCHandle, 0x000A, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);
    /* Set WKUP2 as Wake Up pin */
    /* Request to enter STANDBY mode */

Did someone already succeed to be wake from different potential source ?