Closed as duplicate
Description
Describe the bug
I am using the following simple program based on extint_wakeup.py
example to wakeup Portenta from lightsleep but as soon as I run the code it wakes up without any external interruption.
To Reproduce
Run the following program on Portenta H7 with Vision Shield (LoRa):
import time
import pyb
import machine
from pyb import Pin, ExtInt
def callback(line):
pass
led = pyb.LED(3)
pin = Pin("D6", Pin.IN, Pin.PULL_DOWN)
ext = ExtInt(pin, ExtInt.IRQ_RISING, Pin.PULL_DOWN, callback)
# Enter Stop Mode. Note the IDE will disconnect.
machine.sleep()
while True:
led.on()
time.sleep_ms(100)
led.off()
time.sleep_ms(100)
Expected behavior
The Portenta should stay in sleep mode until external voltage is provided to pin D6 for it to wake up.
Please complete the following information
- IDE version: 4.2.4
- Firmware version: 4.5.9
- Board: Arduino Portenta + Vision Shield (LoRa)
- OS: Windows