I'm having trouble putting the radio to sleep with Async Sleep Mode 1.
I have the internal pullup resistor for pin 9 (DIO8 / SLEEP_REQUEST) set to '0' using the command:
(void)xbee_cmd_simple(&xdev, "PR", 0x7FBF);
In my main loop I want to do the following:
printf("Going to sleep...\r\n");
(void)xbee_cmd_simple(&xdev, "D8", 5);
(void)pm_set_cpu_mode(PM_MODE_STOP_2, 30); // Start sleeping
// When CPU wakes-up, it continues executing from here
delay_ticks(2); // This is for avoiding writing garbage on the UART
(void)xbee_cmd_simple(&xdev, "D8", 4);
This however doesn't appear to work...I show my power consumption running at ~40mA at idle and ~31mA when it's supposed to be sleeping.
When I use Sync Sleep Mode 8, I'm able to get the sleep current draw down to ~230uA.
What am I missing??