Deepsleep wake trigger with excelitas digipyro pyd1588

I use openmv h7 and excelitas digipyro pyd1588, my code is :

def pin_ready():

    Pin('P3', Pin.OUT_PP)
    Pin('P3').off()

    _regmask= 0x1000000
    _val =0x00325D10   # 0x00304D10
    _pin = Pin('P7',Pin.OUT_PP)
    _pin.value(0)
    for i in range(0,25):
        nextbit = (_val&_regmask)!=0
        _regmask >>=1
        _pin.value(0)
        _pin.value(1)
        if nextbit:
            _pin.on()
            print("1")
            time.sleep_us(100)
        else:
            _pin.off()
            print("0")
            time.sleep_us(100)

    _pin.off()

    time.sleep_us(600)
    sensor.reset()
# Bypass internal regulator
    sensor.__write_reg(0x4F, 0x18)
# Shutdown the sensor.
    sensor.sleep(True)



    ext = ExtInt(Pin('P3'), ExtInt.IRQ_RISING,Pin.PULL_DOWN, callback)

    Pin('P3', Pin.OUT_PP)
    Pin('P3').off()
    Pin('P3', Pin.IN)
    print(ext)
    time.sleep(1)
   machine.deepsleep()

pin_ready()

but when openmv command start and it is going to sleep my ‘P3’ pin get high but it should be low, my all wired is true, ı am sure.
Is this a bug or something and is there any way to manipulate pins while in deepsleep mode

You need to assign P3 to an object or it can get garbage collected which will reset it back to the default state…

can you give a example i am new at that topic ?

pin3 = pyb.Pin(“P3”)
pin3.value(1)
pin3.value(0)

What is differenet Pin(‘P3’, Pin.OUT_PP) with pin3 = pyb.Pin(“P3”) ?

I assigned it to a variable so it won’t be garbage collected.