Best way to have more than one WKUP GPIO pins?

What would be the best way to configure more than one WKUP GPIO pins on a PICO or SC13048Q?

How do I configure PA2 or PC13 for WKUP in addition to PA0?

We added this feature to the next release,
For SC20xxx: PA0, PA2, PC1, PC13, PI8, PI11. Use can chose any of those pins. Default isPA0.
For SC13xxx: PA0 and PA2 only. Default is PA0.

User can’t select multiple pins, some thing like PA0 | PA2 will not work, of course.

We will document this, but here is the way, this is only for next release. Version 2.2.0.5100 doesn’t work with this.

            var wakeupPinAddress = (IntPtr)8; // 8 is special marshal address for wakeup pin
            Marshal.WriteInt32(wakeupPinAddress, SC20260.GpioPin.PA0);

            Power.WakeupEdge = WakeupEdge.Rising;
            Power.Shutdown(true, DateTime.Now.AddSeconds(20));

Thanks! That will work !

PA0 and PA2 only on SC13xxx makes sense.
Those are the only GPIO pins exposed that support WKUP.

Do you have a rough estimate of when to expect the next release ?

Dat,
So … how do we configure both PA0 & PA2 for WKUP ?
Or customer specifically requires two different wakeup pins.

The original question was:
“What would be the best way to configure more than one WKUP GPIO pins on a PICO or SC13048Q?”

Developer team is ready, we are waiting the approval for the date, but it will be soon, hopefully it will be this week.

Only one pin at the time, why do you need multiple pins at the same time?

We have multiple external devices that will trigger a process wakeup from shutdown.

The STM32L4x2 support up to 5 WKUP pins.
Power control register 3 (PWR_CR3)

ok, we just added that.

if you want multi pins:

var wakeupPinAddress = (IntPtr)8; // 8 is special marshal address for wakeup pin
 var wakeupPins = 0x08000000; // special value to detect multi pins
            // PA0: bit 0
            // PA2: bit 1
            // PI8: bit 2 //SC20260 only
            // PC13: bit 3  //SC20xxx only
            // PI11: bit 4  //SC20260 only
            // PC1: bit 5  //SC20xxx only

            wakeupPins |= 0x08000000 | (1 << 0); // PA0
            wakeupPins |= 0x08000000 | (1 << 0) | (1 << 1); // PA0, PA2
            wakeupPins |= 0x08000000 | (1 << 0) | (1 << 1) | (1 << 2); // PA0, PA2,  PI8
            wakeupPins |= 0x08000000 | (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3); // PA0, PA2,  PI8, PC13
            wakeupPins |= 0x08000000 | (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4); // PA0, PA2,  PI8, PC13, PI11
            wakeupPins |= 0x08000000 | (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5); // PA0, PA2,  PI8, PC13, PI11, PC1

 Marshal.WriteInt32(wakeupPinAddress, wakeupPins);

Fantastic !
Thanks

if wakeup is config as multi pins, all pins must be config same state before enter shudown. Example, you can’t tie PA0 to low and PA2 to high then enter shutdown mode.