Hi Martin,I found a problem about the CC2420TransmitP module which support 
the cc2430 platform. In the attemptSend() fuction ,I found the variable of 
"status" always be equal to "success" in the sentence of " status = m_cca ? 
call STXONCCA.strobe() : call STXON.strobe();" Because the STXONCCA.strobe() 
and STXON.strobe() fuction are always return "success".This can be learn in the 
sentence of " 
 async command cc2420_status_t Strobe.strobe[ uint8_t opcode ]() {
    RFST = opcode;
    return SUCCESS;
  }"
So,it must be invalid to the next sentence of "if ( !( status & 
CC2420_STATUS_TX_ACTIVE ) ) ".So,I think if the sentence  of "return SUCCESS;" 
can be changed as "return FSMSTATE;"That is to say,it should be return the 
states of the FSMSTATE regester? The whole code as follow:


  void attemptSend() {
    uint8_t status;
    bool congestion = TRUE;
    call CSN.clr();
    status = m_cca ? call STXONCCA.strobe() : call STXON.strobe();
    if ( !( status & CC2420_STATUS_TX_ACTIVE ) ) {
      status = call SNOP.strobe();
      if ( status & CC2420_STATUS_TX_ACTIVE )
 congestion = FALSE;
    }
    atomic m_state = congestion ? S_SAMPLE_CCA : S_SFD;
    
    call CSN.set();
    if ( congestion ) {
      releaseSpiResource();
      congestionBackoff();
    }
    
#ifdef PLATFORM_MICAZ
    else {
      startBackoffTimer(CC2420_ABORT_PERIOD);
    }
#endif

  }
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to