我试过代码,没什么问题。 from pyb import Pin, ExtInt callback = lambda e: print("intr") ext = ExtInt(Pin('P7'), ExtInt.IRQ_RISING, Pin.PULL_NONE, callback) while True: pass