cancel
Showing results for 
Search instead for 
Did you mean: 

unable wake-up from standby mode in stm32f30 controller

nraj
Associate II

Hi all,

i am using stm32f3 discovery EV kit, i am using stand by mode for deep sleep, but it is not wake up from sleep mode.

i configured sys_wkup1 (PA0) and it is connected push button.i am re intialize i/o port and toggling one led after wake up from sleep. when i pressed the button nothing is occur. when i connected mutli meter it is showing 4 uamps when button pressed it is increased 10uamps, but when releasing button it is 4uamps. when i debugging it is gone to Error_Handler function. i am sharing firmware below.

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();
//MX_TIM2_Init();
// MX_ADC1_Init();
/* USER CODE BEGIN 2 */
HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
HAL_Delay(2000);
HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
HAL_Delay(2000);

HAL_PWR_EnableWakeUpPin( GPIO_PIN_0);
HAL_PWR_EnableWakeUpPin( GPIO_MODE_IT_RISING);
HAL_SuspendTick();
__HAL_RCC_PWR_CLK_ENABLE();

HAL_PWR_EnterSTANDBYMode();

HAL_ResumeTick(); // Resume Tick interrupt if disabled prior to sleep mode entry
MX_TIM2_Init();
MX_GPIO_Init();

while (1)
{
/* USER CODE END WHILE */
HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
HAL_Delay(2000);
/* USER CODE BEGIN 3 */
}

 

please give any solutions

 

regards,

nraj

0 REPLIES 0