Question
USB-Device_Only - STOP_Mode - Not Wakeup
hi ,
Working on USB - Device_Only wake up from Stop mode and entering to stop mode is successful but not wakeup from stop mode .There is no example code for USB wake up from STOP Mode .
Entered to stop with following code :
HAL_SuspendTick();
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);Trying to wake from stm32f4xx_it.c with following code :
void OTG_FS_WKUP_IRQHandler(void)
{
/* USER CODE BEGIN OTG_FS_WKUP_IRQn 0 */
/* USER CODE END OTG_FS_WKUP_IRQn 0 */
if ((&hpcd_USB_OTG_FS)->Init.low_power_enable) {
/* Reset SLEEPDEEP bit of Cortex System Control Register */
SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
SystemClock_Config();
}
__HAL_PCD_UNGATE_PHYCLOCK(&hpcd_USB_OTG_FS);
/* Clear EXTI pending bit */
__HAL_USB_OTG_FS_WAKEUP_EXTI_CLEAR_FLAG();
/* USER CODE BEGIN OTG_FS_WKUP_IRQn 1 */
HAL_ResumeTick();
/* USER CODE END OTG_FS_WKUP_IRQn 1 */
}D+ pin is 3.3v at stop mode . There is anything i need to do before entering to STOP mode usb
