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.

CC2538DK: CC2538 ZED to CC2538 ZC data transfer with 1 sample per minute

Part Number: CC2538DK

Hello sir,

I am using z-stack mesh 1.0.0 generic app example. I want to transfer the analog signal data to coordinator from multiple enddevices. I need 1 sample per minute from each node my input signal is about 1hz.

1) in the rest of time devices needs to be in sleep state.

2) devices are not reconnecting to coordinator if ZC restarts even after using NV_RESTORE.

3) I want to disable all the pheripherals (LCD, Buttons etc) to reduce power consumption ho to do it.

please help.

thanks and regards

  • Hi,

    Are both ZC and ZED using Z-Stack mesh 1.0.0? 

    Are you using CC2538 EVMs, or do you have custom board?

    shiva p said:
    1) in the rest of time devices needs to be in sleep state.

    I believe low power should be enabled by default if there is no further activity to perform by the CC2538.
    Also, try referring to this post: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/369843


    shiva p said:
    2) devices are not reconnecting to coordinator if ZC restarts even after using NV_RESTORE.

    Can you share a sniffer log which captures this behavior?

    shiva p said:
    3) I want to disable all the pheripherals (LCD, Buttons etc) to reduce power consumption ho to do it.

    Consider how the peripherals are initialized / enabled during startup (e.g. HAL_BOARD_INIT, HalDriverInit, etc, from main()).

    Regards,
    Toby

  • thankyou for reply,

    i am using cc2538EVMs only.

    NV_RESTORE is working fine now.

    actually i want to transfer the adc data from ZED to ZC for every 1 minute.CC2538 uses delta sigma ADC and it is clocked at 4Mhz. for 12-bit resolution with 512 decimation rate we will get almost 7812 samples. so i want to sample data using adc once per a minute.

    for 12- bit resolution 4Mhz/512 = 7812.5 samples and conversion time = (512+16)0.25usec = 132usec*7812 = 1.03sec.

    data size = 7812.5*12bit = 93750 bits/8=11718.75 bytes of data as per my calculation is it correct?. how can i send this data and with how many packets.

    for this i have enabled adc using

    HalAdcInit ();
    HalAdcSetReference(HAL_ADC_REF_AVDD); in genericapp_init() function only for end device.

    by using

    i assumed here packetsize is 60 and byte ui16dummy[60];.

      if ( events & GENERICAPP_SEND_MSG_EVT )
      {
    #if defined (ENDDEVICE)
        int i = 0;
        ui16dummy[i] = HalAdcRead(HAL_ADC_CHN_AIN6, HAL_ADC_RESOLUTION_12);
        i++;
        if (i == (PACKETSIZE-1))
        {
          i=0;
        }
        printf("%s",ui16dummy);
        HalUARTWrite( HAL_UART_PORT_0,ui16dummy,60);
        HalUARTWrite(HAL_UART_PORT_0, "\r\n",2);
    #endif
        // Send "the" message
        GenericApp_SendTheMessage();
        osal_set_event( GenericApp_TaskID, GENERICAPP_SEND_MSG_EVT );

        // Setup to send message again
        
          /*
        osal_start_timerEx( GenericApp_TaskID,
                            GENERICAPP_SEND_MSG_EVT,
                            txMsgDelay );
        */

        // return unprocessed events
        return (events ^ GENERICAPP_SEND_MSG_EVT);
      }

    is above code correct?

    to send matchdescreq from enddevice without pressing button.

    case ZDO_STATE_CHANGE:
              GenericApp_NwkState = (devStates_t)(MSGpkt->hdr.status);
              //if ( (GenericApp_NwkState == DEV_ZB_COORD) ||
               //    (GenericApp_NwkState == DEV_ROUTER) ||
              //     (GenericApp_NwkState == DEV_END_DEVICE) )
             // {
              
    #if defined(ENDDEVICE)
              if ( GenericApp_NwkState == DEV_END_DEVICE)
              {
                dstAddr.addrMode = Addr16Bit;
                dstAddr.addr.shortAddr = 0x0000;             //NWK_BROADCAST_SHORTADDR;
                ZDP_MatchDescReq( &dstAddr, 0x0000,
                                  GENERICAPP_PROFID,
                                  GENERICAPP_MAX_CLUSTERS, (cId_t *)GenericApp_ClusterList,
                                  GENERICAPP_MAX_CLUSTERS, (cId_t *)GenericApp_ClusterList,
                                  FALSE );
         
          /////////////////////////////////////////////////////////////////////////////
                // Start sending "the" message in a regular interval.
              /*
              osal_start_timerEx( GenericApp_TaskID,
                                   GENERICAPP_SEND_MSG_EVT,
                                   GENERICAPP_SEND_MSG_TIMEOUT );
         */
             }
                
    #endif

    are my above assumptions and code are correct?

    please clarify the issues.

    thanks and regards

  • What ADC are you using? If it is one for TI, I would recommend posting in https://e2e.ti.com/support/data-converters/f/73  to check your ADC parameter calculations.

    In terms of Zigbee:

    A 60 byte payload should be fine (Zigbee supports full packet size up to 128 bytes). In the past I have used max of 82 bytes in payload (this is accounting for the packet bytes allocated to headers, etc).

    How many devices will be reporting?
    For ~12000 bytes of data, at 60 bytes, takes 200 packets. Each packet takes about 4 ms (128 bytes * 8 bits/byte * 250 kbps). Another consideration is the processing of this data at the ZC.
    If you see network bandwidth issues given your setup, I would recommend either lengthening the reporting frequency, or reporting less data per device.

    I don't immediately see anything wrong with your code.
    Although, I don't see a mechanism of detecting that all packets have been sent? At first glance, it seems that you are always triggering the GENERICAPP_SEND_MSG_EVT.

  • i am using on board ADC which is delta-sigma ADC.

    i want to use 10 end devices in a network.

    Although, I don't see a mechanism of detecting that all packets have been sent?

    How to do this please suggest.

    for ADC reasons you can transfer this question to some other person of TI.

    Thanks



  • Since the number of packets to send is known, a simple method could be to use a counter.

  • Hello sir,

    I am able to transmit the ADC data from ZED to ZC.

    I have tested the range of this it's about 1 and half meter only by using on board antenna in closed room. what is the default I tx power set in the z-stack? and where can i find it in z-stack? is it is fixed in z-stack to 7dm?.

    i went through the document of CC2538 the output nominal power is 7dbm so, i want to increase the tx power to 7dbm.

    i have done PER TEST with various programmable tx power given in PER TEST Menu(7dbm,3dbm,0dbm,-3dbm,-9dbm,-15dbm), i have good results with 7dbm upto 6 meters.

    If the tx power 7dbm is already set in z-stack why the connection is limited upto 1 and half meter in the same environment where PER TEST is done.

    i want to change the onboard antenna to external antenna which is SMA antenna for better range. what are the to be considered?.

    I don't want to use the range extenders(cc2591 and cc2592) because of power consumption.

    please clarify the issuses

    Thanks and Regards

  • Support for this RF issue will be continued at your post here: e2e.ti.com/.../956236