Hi,
The device is programmed to go into the VLPS mode when the task is finished. It will be waken up by a button (gpio pin). It works fine and seems no any problem until I notice that occasionally the device in the VLPS mode can be randomly waken up without the button being touched.
Before the device is put into sleep, code disable most of the gpio pins.
Any ideas how I can deal with it?
Hi Jieqiu Yang
There could be many sources of interrupts that could wakeup the MCU as long as any interrupt could wakeup the MCU;
Did the GPIO interrupt is the only one configured before your MCU goes to VLPS mode? I would recommend to isolate the issue by disabling all other possible interrupts and check if it is your GPIO interrupt or there is other source for the problem.
I would also recommend to check the noise level in the pin that wakeup your MCU, if it is high, it could be the one that wake up your MCU.
Also, the NMI interrupt could be being triggered, did you have an external pull up resistor in this pin?
Hope this information could help you.
Best Regards.
Hi Antonio,
I have two pins which can wake up the device.
The NMI pin is left unused. The pin has not been given an external pull up resistor. Is an internal pull up is good enough for it?
Thank you for your help
Jieqiu
Hi Jieqiu Yang
I would highly recommend to add an external pull up in this pin, this could be triggering an interrupt that wake it up.
Regards