We've been having a hard time getting the I2C to work in our project after a wakeup from PM2 or PM3. We need to get something working fast, so we thought using PM1 instead of PM2 or PM3 would be a good thing to try since, according to the CC254X User's Guide, the I2C loses some of its state in PM2 and PM3 but not (apparently) in PM1. Can anyone (ideally from TI) tell me how to force the OSAL to only sleep as deeply as PM1 but never PM2 or PM3? From a quick look at the code for SDK version 1.4.0, it looks like it could be as simple as changing the following code in hal_sleep.c from
#define HAL_SLEEP_OFF CC2540_PM0
#define HAL_SLEEP_TIMER CC2540_PM2
#define HAL_SLEEP_DEEP CC2540_PM3
to
#define HAL_SLEEP_OFF CC2540_PM0
#define HAL_SLEEP_TIMER CC2540_PM1
#define HAL_SLEEP_DEEP CC2540_PM1
?
Thanks,
Gary