I am concerned about the potential for a race condition between enabling global interrupts and putting the CC2530 to sleep.
As in:
EA = 1; // Enable global interrupts
PCON = PCON_IDLE; // Enter sleep mode
Is there a chance that an ISR could be invoked, before the device enters sleep mode?
Thanks,
Steve