This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc238 - Intermittent zigbee communication problems after programming same binary

Other Parts Discussed in Thread: CC2538

Hello everyone.

I'm using the smartRF06 kit for debugging and programming an application in cc2538. Sometimes, the output binary generated by IAR 6.50.3.4 run smoothly and sometimes doesn't. Empirically I discovered that behavior depends how many times I have programmed into flash memory. The symptom of failure is that although the router or end-device is able to see and join into coordinator's network (LED3 of kit becomes green in both), none are able to send data to the cordinator. My code are using the AF_DataRequest() method, but data never arrives there.

I thought the problem maybe was some uninitialized variable at my aplication, but it does not matter how many times you power on/off or reset the hardware. It will always failure. The solution has been to reprogram the same binary on the chip. That sometimes solves the problem.

Under programming, XDS100 always reports sucessfull progranning, but I am suspecting that is not always true.

Any suggestions?

  • Hi Fabio,

    When you suspect that the programming was not done correctly, the best way to verify this is to read the flash content of the suspected device flash back to a file, and compare it to the original firmware you programmed.

    Reading the flash content can be done easily using the SmartRF Flash Programmer software.

    Note that you have to comparison options:

    1. compare it to a hex version of the original firmware - in this case there will not be an exact match, because e.g. the original firmware will not contain empty flash sections, while the read-back firmware will contain the complete flash image.

    2. first read the flash from a device that you verified to work correctly, and then compare it to a firmware read from a failing device.

    Best regards,

    OD

  • 1. When you send data to ZC by AF_DataRequest, how do you assign destination short address and end point?

    2. I suggest you check if AF_DataRequest is really sent by your device using Ubiqua protocol analyzer.

  • Hello YiKai Chen, thanks for your reply.

    1. Mainly devices send messages to coordinator, so I use short address 0x0000 to assign destination.

    sample of code:

    /*********************************************************************
    * @fn sidTag_SendPeriodicMessage
    * @brief Send the keep alive (periodic message) to coordinator.
    * The message contains temperature, battery level and current state of device
    * @param none
    * @return none
    */
    void sidTag_SendPeriodicMessage( void )
    {
    afAddrType_t dstAddr;
    struct {
    uint8 battery; // battery charge % (0 - 100)
    uint8 state; // current application state
    uint16 temperature; // temperature oC x 100
    } payload;

    // Set destination as coordinator short address
    dstAddr.addrMode = afAddr16Bit;
    dstAddr.endPoint = SIDTAGAPP_ENDPOINT;
    dstAddr.addr.shortAddr = 0x0000; //NLME_GetCoordShortAddr();

    // fills up payload to be sent
    payload.temperature = sensorAccelTemCheck();
    payload.battery = sensorsBatLevelCheck();
    payload.state = appTag_getState();

    // send message over zigbee network
    if ( AF_DataRequest ( &dstAddr, // Destination Address
    &sidTagApp_epDesc, // end-point description of symbols
    SIDTAGAPP_PERIODIC_CLUSTERID, // keep alive message
    sizeof(payload), // MessageData data length
    (uint8*)&payload, // MessageData data loading
    &sidTag_TransID, // Message ID
    AF_DISCV_ROUTE,
    AF_DEFAULT_RADIUS ) == afStatus_SUCCESS
    )
    { /* Success occurred in request to send */ }
    else
    { /* Error occurred in request to send. */ }
    }

    2. No outcome packets sent by AF_datarequest() was detected by ubiqua or packet sniffer , when this failure shows up.

    Best Regards

    Fabio

  • Hello OD, thank you for you time.

    I am unable to find where in Smart RFTools I can read flash for a file. Can you please tell me where this option is located?

    Regards

    Fabio

  • Your destination short address and end point looks fine. Since you don't see the message sent out over the air from ZED, please check the return value of AF_DataRequest.