Modded Zigbee Example Dropping Messages...

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Modded Zigbee Example Dropping Messages...

3,871件の閲覧回数
mjcoury
Contributor I
I am using the AccelerometerV2 example... I added a 1ms timer on TPM1C0. I am currently manually sending messages from another 1392SARD. It appears that I do not always catch messages (the example also does not use any ACK) here is my code.... Also I am not entirely sure what the LOW_POWER_WHILE gets me other than a asm "WAIT" comamnd... which i think is the problem... however if i remove it, the program NEVER recieves messages from the other SARD board...
 
 
Thanks...
 
/*************************/
//                       //
//      RX LOOPS         //
//                       //
//************************/
 
void Rx_TaskLoop_0001ms() {
} // end Rx_TaskLoop_0001ms( )
void Rx_TaskLoop_0025ms() {
} // end Rx_TaskLoop_0025ms( )
void Rx_TaskLoop_0050ms() {
 /*if(++i250counter >= 4) {
    
  i250counter = 0x00;
 }// end if
 */
} // end Rx_TaskLoop_0050ms( )
 
void Rx_TaskLoop_0100ms() {
 // Heartbeat
 LED2 ^= 1;
} // end Rx_TaskLoop_0100ms( )
void Rx_TaskLoop_1000ms() {
} // end Rx_TaskLoop_1000ms() 
void Rx_bk_loop() {     
  switch (app_status) {
  
   case IDLE_STATE:
    //Switch to RECEIVER_ALWAYS_ON
    app_status = RECEIVER_ALWAYS_ON;
    break;
    
   case RECEIVER_ALWAYS_ON:
     MLME_RX_enable_request(&rx_packet, 0);
     LOW_POWER_WHILE;
    break;
   
   //Should not get here.
   default:
    app_status = RECEIVER_ALWAYS_ON;
    
  }  
}
ラベル(1)
0 件の賞賛
返信
4 返答(返信)

1,141件の閲覧回数
stevasway
Contributor III
In my opinion you should add a state in your switch.
If you remove LOW_POWER_WHILE, you stay in RECEIVER_ALWAYS_ON state and continuosly call the MLME_RX_enable_request.

void Rx_bk_loop() {
switch (app_status) {

case IDLE_STATE:
//Switch to RECEIVER_ALWAYS_ON
app_status = RECEIVER_ALWAYS_ON;
break;

case RECEIVER_ALWAYS_ON:
MLME_RX_enable_request(&rx_packet, 0);
//LOW_POWER_WHILE;
app_status = WAIT_RX;
break;

case WAIT_RX:
break;

//Should not get here.
default:
app_status = RECEIVER_ALWAYS_ON;
}
}

void Packet_Received(tRxPacket *lRxPacket)
{
if( lRxPacket->u8Status == SUCCESS )
{
app_status = RECEIVER_ALWAYS_ON;
}
}
0 件の賞賛
返信

1,141件の閲覧回数
mjcoury
Contributor I
I'll give that a shot and try that tonight
0 件の賞賛
返信

1,141件の閲覧回数
mjcoury
Contributor I
Fixed -
Thanks!
0 件の賞賛
返信

1,141件の閲覧回数
alex_spotw
Contributor III
Hi:

My guess is that your application is changing the internal status of the SMAC from receive to idle at some point, and therefore, you loose a packet. Remember that the SMAC has reentrant interrupts and if the internal status is corrupted/changed it leads to packet problems.

You have to be careful in how your application interfaces with the SMAC to avoid these problems.

Another possibility is that the packets are really being lost due to interference, low power, distance, a low battery, etc. Check these out.

Regards,

Alex
0 件の賞賛
返信