http://e2e.ti.com/support/low_power_rf/f/158/t/17598.aspx
Q:
Is it possible to wake up the CC2430 during PM1 mode
It seems the orginial stack doesnt support UART's ISR during sleep mode. When CC2430 enters PM1, the Interrupt bit of UART0 and UART1 are set to zero. Even if I turn the interrupt bit on (in IEN0), it cant be woke up by UART.
A:
You are correct, UART interrupts can't be used to wake from sleep mode.
If you take a look at paragraph 4.5 of the CC2430 data sheet, it says that "System can wake up onexternal interrupt or real-time counter event". Then, in paragraph 13.4 it says "Theexternal interrupt capability is available on all 21 I/O pins". Finally, in paragraph 13.4.4 it says "General purpose I/O pins configured as inputs can be used to generate interrupts".
So, when I/O pins are configured for Peripheral I/O (see paragraph 13.4.6), they are not capable of generating external interrupts, and therefore not capable of waking the device from sleep (PM1 - PM3).
Hi, ...
Thus... the only method for using uart with PM1 is ....
add an extra pin for waking up CC2430 by an external interrupt with GPIO...
send uart data to cc2430
and poll the logic level of this pin before executing HAL_SLEEP_SET_POWER_MODE(halPwrMgtMode)in halsleep() ;
Second question, is it possible to sync an event with the data request in z-stack, so that i can wake up the cc2430 at less at possible ....
For example, I am setting the NLME_Pollrate(10000) in order to make an data request to its parent in 10 sec interval. And I also need to do a zcl_report in a 20sec interval.
case 1. If i use an osal_timer_startEx to tigger the zcl_report event, the CC2430 will wake up three times instead of two times within 20sec. 2 for data request and 1 for zcl_report.
case 2. if i add a line in halsleep() (after HAL_SLEEP_SET_POWER_MODE(halPwrMgtMode); HAL_ENTER_CRITICAL_SECTION(intState);) to send an event message to my application, it seems that the event will be executed repeatably more than 1 times. This cause the CC2430 doesnt go to sleep again. It is weird for me.... ~
thx ~