2025-07-07 11:05 AM
I am using the STM32L433RCT6 and need to assign a GPIO pin as an external interrupt, which will be used to wake and shutdown the MCU (shutdown must use minimal power).
However, I am not sure if I have to use a specific GPIO pin, or if I can use any GPIO pin for the external interrupt ?
The external interrput will be connected to a momentary push button (net PWR_SWITCH)...
There will be a procedure to wake and shutdown the MCU as explained below (there is also a link to a video to demonstrate the procedure)...
Start the switch-on cycle by clicking the button once. After approx. one second, an LED will flash. You must
acknowledge the LED light immediately by clicking the button again. This sequence - a click as soon as the LED appears - will be repeated two more times. After a total of four clicks, the MCU will wake up.
If you do not act promptly after seeing the LED light, or if you push the button too soon, it will ignore the switch-on attempt. This four-click switch-on cycle has been designed to prevent the MCU from being switched on accidentally.
To proceudre to shutdown the MCU will consist of holding the button for a fixed time e.g. 10 seconds
An example is shown in this video...
https://www.youtube.com/watch?v=TpTqGVCbXGE
2025-07-07 11:25 AM
Your info is catch 22. After a total of four clicks, the MCU will wake up = who counts clicks MCU is in standby?
2025-07-07 11:33 AM
I think you need to spend some time reading the Reference Manual for the microcontroller to understand the low-power modes and pick one.
Depending on the mode, a WKUP pin can be used or an EXTI line; capabilities of specific pins are defined in the microcontroller Datasheet.
2025-07-07 11:49 AM
The MCU needs to be in a low power mode where its able to wake from an external interrupt and run the procedure to determine if it can fully wake and operate.
I originally implemented this on the Microchip dSPIC, where it went into a 'sleep' mode but was still able to monitor the external interrupt
2025-07-07 11:56 AM
"a low power mode" is not specific, these devices have as many as 7 available.
"low power" is a relative term...