cancel
Showing results for 
Search instead for 
Did you mean: 

Waking up from stand-by mode with both rising and falling edge on wakeup pin.

varo1111
Associate II

I have a STM32G030K6T.

Right now I can wake up from standby with either wake up pin falling or rising edge. How can I use both of these edges to wake up the device from stand-by?

HAL_PWR_EnableWakeupPin documentation says

/**

 * @brief Enable the WakeUp PINx functionality.

 * @param WakeUpPinPolarity Specifies which Wake-Up pin to enable.

 *     This parameter can be one of the following legacy values which set

 *     the default polarity i.e. detection on high level (rising edge):

 *      @arg @ref PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN4,

 *        PWR_WAKEUP_PIN5,PWR_WAKEUP_PIN6

 *     or one of the following value where the user can explicitly specify

 *     the enabled pin and the chosen polarity:

 *      @arg @ref PWR_WAKEUP_PIN1_HIGH or PWR_WAKEUP_PIN1_LOW

 *      @arg @ref PWR_WAKEUP_PIN2_HIGH or PWR_WAKEUP_PIN2_LOW

 *      @arg @ref PWR_WAKEUP_PIN4_HIGH or PWR_WAKEUP_PIN4_LOW

 *      @arg @ref PWR_WAKEUP_PIN5_HIGH or PWR_WAKEUP_PIN5_LOW

 *      @arg @ref PWR_WAKEUP_PIN6_HIGH or PWR_WAKEUP_PIN6_LOW

 * @note PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent.

 * @retval None

 */

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You can't select both edges for wakeup. The hardware doesn't allow for it. Look at the PWR registers in the reference manual.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

1 REPLY 1
TDK
Guru

You can't select both edges for wakeup. The hardware doesn't allow for it. Look at the PWR registers in the reference manual.

If you feel a post has answered your question, please click "Accept as Solution".