I use the CC2530 in an application with a rechargeable battery. The device has the concept of a shutdown mode that is entered when there is no activity. There are two ways to wake up - button press and battery charging.
The button press drives a P2 pin, the ISR wakes up the device, and watchdog is used to reset.
The battery charge IC has 2 status pins, connected to pins on P1. Either pin can fire an interrupt waking up the device. The net effect is to simply monitor charge status, not turn on the device.
The issues:
1) frequently, a button press will not wake the device, but unplug/replug of the USB charge cable will - my guess, I got a bug here and I am digging to find it.
2) infrequently and most help needed, the device hangs completely where even the debugger/ Reset low will not restart the device. Power has to be completely removed and then reconnected to get the CC2530 to restart. Has anyone experienced this? The device is connected to the charging cable when this happens. What the device does while connected to the charge cable: uses sleep timer to wake up periodically to: read ADC on P0_7 to check charge current of battery (voltage over a resistor with current proportional to charge current provides voltage to ADC), if below predetermined level, use Timer4 and LED as a charge complete indicator and sleep in IDLE mode only. If charge current too high, update the sleep timer compare and go to PM2, wake up and do it over again.
Unplugging the cable while 'powered off' causes the device to enter PM3.
The device operates at 4 MHz, but sets the clock back to 32 MHz when shutting down to support the ADC use.
Any help or insight will be greatly appreciated - Sam