Dear TI Engineers,
I am using CC2538 (EM) / SmartRF06 Evaluation Board (EB). I wish to program one node as a polling -based Receiver/Coordinator (polls sequentially every 1 second from 1 to 8) and other 2 to act as end-devices which continuously transmit light (End device with node ID =4) with and Vdd value (End device with node ID =7) respectively.
Moreover, I wish to put the Coordinator to sleep (PM2 mode) the moment it receives light value but wake up (PM0 mode) when it is supposed to receive Vdd value. At the moment, the Coordinator only goes to sleep (PM2 mode) when it receives the light value.
I understand that once the chip goes to PM2 mode, it would stop all activities including polling and receiving values from the end device.
So is there any method or is it in any way possible to wake it up based on value reception from another device after it enters sleep mode. If my approach is totally incorrect, could I be advised on a smarter way to achieve something of similar sort?
I actually wish to know the specific piece of code which would atleast help me to wake the device up from PM2 mode ( say after spending 2 seconds in PM 2 and then
The following is the excerpt of the Coordinator code which I have written so far.
if(Transmit_Flag1==1){
if (d[0]==1){
printf("The value of temperature reported from Node_ID %d is %d degree celsius.\n", d[0], d[1]);
}
if (d[0]==4){
printf("The raw ambient light sensor value reported from Node_ID %d is %d lux.\n", d[0], d[1]);
lpm_enter();
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM2; THE COORDINATOR HERE GOES TO SLEEP AS SOON AS LIGHT VALUE IS DETECTED FROM NODE_ID 4.
}
if (d[0]==7){
printf("The positive power supply value,'Vdd' reported from Node_ID %d is %d volts.\n", d[0], d[1]);
while(REG(SYS_CTRL_CLOCK_STA) & SYS_CTRL_CLOCK_STA_SYNC_32K);
while(!(REG(SYS_CTRL_CLOCK_STA) & SYS_CTRL_CLOCK_STA_SYNC_32K));
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM0; I WISH TO WAKE THE COORDINATOR HERE BUT IS IT POSSIBLE IN ANY WAY?
}
Transmit_Flag1=0;
}
If the above is not possible could you please advise what coding may I write to simple wake my Coordinator after spending say 2 seconds in PM2 mode.
Any advice would be of huge help.
Thanking in advance,
Indrajit