Entering and exiting stand-by mode on interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-18 2:10 AM
I'm a beginner in embedded systems. I'm creating a software where some leds are blinking in the main while loop. I would like to put the MCU into stand-by mode when connecting a certain pin. I want to return to normal execution when this pin is disconnected. Right now I'm using a SYS_WKUP pin to exit the stand-by mode. Could I somehow use the same pin to enter stand-by mode. What is the best way to implement this?
Right now i can enter stand-by mode in the middle of the main loop and exit stand-by mode when connecting the pin, but I don't know how to enter the stand-by mode as i connect the pin.
I have the NUCLEO G031K8 and I'm programming with STM32CubeIDE.
Solved! Go to Solution.
- Labels:
-
Power
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-18 5:22 AM
Can't you just read the value of the wakeup pin, and if it's high, enter standby?
if (HAL_GPIO_ReadPin(...)) {
// enter standby
}
I could be missing something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-18 5:22 AM
Can't you just read the value of the wakeup pin, and if it's high, enter standby?
if (HAL_GPIO_ReadPin(...)) {
// enter standby
}
I could be missing something.
