Hello ,
This nRF9E5 wake up function is driving me slowly nuts...
How to distinguish whether the wake up is coming from RTC or from GPIO.
I have tried to read the wakeup status from RWSTA0, BIT8 RTC timer status and BITS 7-0 for pins P07-P00 but it seems to be so that GPIO pin wake up will always set the RTC bit too.
While(REGX_CTRL & 0x10); // Wait until register not busy
REGX_CTRL = 0x04; // Bits 0,1,2, Address '100' = RWSTA0 Bit4 '0' read
While(REGX_CTRL & 0x10); // Wait until register not busy
iWakeUpStatus = ((((unsigned int)REGX_MSB << 8) & 0x0100);
iWakeUpStatus |= ((unsigned int)REGX_LSB & 0x0018); // Bit3 P03, Bit4 P04, Bit8 RTC