2023-05-17 11:39 PM
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB)!=RESET)
{
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
for(int i =0; i<10; i++)
{
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0|GPIO_PIN_7|GPIO_PIN_14);
HAL_Delay(50);
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0|GPIO_PIN_7|GPIO_PIN_14);
HAL_Delay(50);
}
}
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
for(int i =0; i<4; i++)
{
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0|GPIO_PIN_7|GPIO_PIN_14);
HAL_Delay(750);
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0|GPIO_PIN_7|GPIO_PIN_14);
HAL_Delay(750);
}
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_HIGH);
HAL_PWR_EnterSTANDBYMode();
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
the above code of standby activation and wakup from pin PA0 is working with stm32f103 series and stm32f411 series but not working with stm32f7222ze Nucleo board .
Solved! Go to Solution.
2023-05-19 10:57 PM
well . it's working if we uses __HAL_PWR_CLEAR_WAKEUP_FLAG(PWR_WAKEUP_PIN_FLAG4); instead of this __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); we need to specify the pin flag
2023-05-18 08:36 AM - edited 2023-11-20 05:09 AM
stm32f7222ze first time going to standby mode and once you give the wake up then it's keep on going to initializing and and waking up automatically . any one please suggest me about stm32f7222ze nucleo board stand by activation and wakeup
2023-05-18 10:04 AM
STM32Cube_FW_F7_V1.17.0\Projects\STM32F722ZE-Nucleo\Examples\PWR\PWR_CurrentConsumption\Src\main.c
2023-05-19 10:57 PM
well . it's working if we uses __HAL_PWR_CLEAR_WAKEUP_FLAG(PWR_WAKEUP_PIN_FLAG4); instead of this __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); we need to specify the pin flag