cancel
Showing results for 
Search instead for 
Did you mean: 

using the stm32f7222ze - nucleo board and trying to activate standby mode and wake up by pin PA0 .

MMARI.1
Senior
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 .

1 ACCEPTED SOLUTION

Accepted Solutions
MMARI.1
Senior

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

View solution in original post

3 REPLIES 3
MMARI.1
Senior

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


_legacyfs_online_stmicro_images_0693W00000bkNrNQAU.png

STM32Cube_FW_F7_V1.17.0\Projects\STM32F722ZE-Nucleo\Examples\PWR\PWR_CurrentConsumption\Src\main.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MMARI.1
Senior

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