I'm working on some code on the CC2540 and having trouble finding out how to make sure it can only enter deep sleep power mode (PM3) with an input in a known state.
A falling edge on external interrupt pin is used for wake up from sleep, so the cpu must only enter sleep mode when this input is high for everything to work correctly.
If i check the pin is high then issue the sleep commands there is a chance it will change low in the time taken to actually enter sleep.
Can anyone point me in the direction of some info on how to solve this sort of issue.
On CC2540 or just in general.
Thanks!