Can you show an example of this, perhaps using the Pearl Gecko starter kit? BTN1 is a supported wake-pin, so it should be possible, but a lot of what you describe here doesn't make sense.
What about functions like:
void GPIO_EM4EnablePinWakeup (uint32_t pinmask,uint32_t polaritymask)
I can' t for the life of me find any documentation on what the pinmask and polaritymask's are to configure.
The article got published while it was still waiting in the drafts folder. I based it on the articles I did for Happy Gecko and Zero Gecko but hadn't yet finished making all of the necessary changes.
I've gone ahead and finished what I started and included an example for the Pearl Gecko STK. The code is heavily commented and should explain any questions you have.
Followup question, where can I find documentation on the pinmasks? In the example you use 0x2 to map the wakeup pin to PF7, but I don't understand the mapping.
GPIO_EM4EnablePinWakeup(0x2 << _GPIO_EM4WUEN_EM4WUEN_SHIFT, 0);