2020-08-27 05:02 AM
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
*/
Solved! Go to Solution.
2020-08-27 06:20 AM
You can't select both edges for wakeup. The hardware doesn't allow for it. Look at the PWR registers in the reference manual.
2020-08-27 06:20 AM
You can't select both edges for wakeup. The hardware doesn't allow for it. Look at the PWR registers in the reference manual.