This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9E5 RTC & GPIO Wake Up...

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

  • About the interrupt processing….

    Table 36 describes the interrupt sources and priorities. I am using INT0_N and wdti (RTC).

    INT0_N natural priority is 1, so it is the highest and wdti (RTC) seems to be the lowest, natural priority 12.

    If I put the INT0 to low priority and wdti (RTC) to high, should the wdti (RTC) then override the INT0 ?

    Seems to be so that INT0 all ways overrides the wdti (RTC). I like to have situation where RTC interrupt overrides the INT0. Is that possible to implement???

    BR and have a nice weekend

Related