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.

CC2530: Low temperature PWM on CC2530

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, Z-STACK-ARCHIVE

Hi team,

A customer used CC2530 to make a light based on Z-Stack Lighting 1.0.2, and he found the light could not be turned on when temperature was below zero---No output from PWM.

Experimental steps:

1.At room temperature, the light worked well

2.Put the light into fridge for a while [temperature was -5℃] and turn on the light. If the light was not in a network, it can be turned on;If the light was in a network, it can be turned on but then went off. He used the gateway to send a light-on command and repeat the command, got the same phenomenon.

PS:Power, lamp bead, and drive circuit problems have been ruled out. This issue is a batch issue.

He was confused about:

1.The light could be turned on in the low temperature condition when it was not in a network,which means the PWM worked normally before joining into a network.But if joined, PWM could not work.

2.Experiment step two shows that the light could still communicate with the gateway[receive ON/OFF command], only the PWM function was disabled[he measured the waveform via an oscilloscope].

Is there any low temperature protection in the stack and how to solve this problem? Thanks in advance.

BR,

Viki Shi

  • Operating ambient temperature range of CC2530 is from –40 to 125 °C. I see no reason that CC2530 PWM doesn't work at  -5℃.

  • Hi Viki,

    So just to confirm: the Zigbee communication is still operating properly but the PWM no longer works, and this only happens when the device is joined to a network?  Temperature shouldn't affect behavior but voltage could.  What is the supply voltage at this time and does functionality return to normal if the device is removed from the environment?  Have TI EVMs been tested and how many devices appear to be affect (total and percentage)?

    Regards,
    Ryan

  • Hi Ryan,

    His test results:

    1.PWM function can recover if put the light back to room temperature.

    2.He did suspect the voltage issue and tried to use an external DC power supply, unfortunately the problem still existed.

    3.He has no TI EVM board for test, and the percentage of bad board is 100%.

    He is now trying to use simulated PWM to check if this problem persists.

    BR

    Viki

  • Hi Ryan,

    He did another experiment---- open a 1s periodic event and flip the IO port in the event. He got the following results:

    1. At room temperature, whether the light was connected to the Zigbee network or not, everything is normal and the IO port can be flipped normally.
    2. At -5℃,the light was not in a Zigbee network and the IO can be flipped normally too.
    3. At -5℃, the light was in a Zigbee netwoek then the flip was abnormal. The oscilloscope showed there was a short pulse -------the IO port went low then went high after tens of ms. While in normal situation,it should be 1s for high level and 1s for low level and so on.
    4. The above phenomenon is the same whether it is the whole lamp test or the cc2530 minimum system module test.

    It seemed that at low temperature (minus zero)+ joined a Zigbee network, the IO driver failed (the IO port cannot be continuously pulled down under the this condition?).


    BR,

    Viki

  • Hi Viki,

    Thank you for providing further detailed information.  Is the device is question a Zigbee router or end device?  Can the customer replicate the issue with out-of-box examples (plus minor changes for their custom PCB) and would they be able to verify this on a more recent Zigbee stack such as HA 1.2.2a or 3.0.2?

    Regards,
    Ryan

  • Hi Ryan,

    I am the “customer”,thank you for answer.

    for you question:

    1.the device is a  router.

    2.the  issue reappear in another PCB which from a module  Supplier,with his FW 。

    3.I will do  more test with out-of-box example,and recent stack。 but it is an old product, base on   Z-Stack Lighting 1.0.2,so ……

    4.Can you help me do a test on TI EVM board,that can find if it a FW issue or a HW issue。

    thank you again for the help

    Regards

    Aaronga

  • Hi Aaronga,

    It is a pleasure to make your acquaintance, thank you for continuing to provide valuable debug information.

    1. Since the device is a router it does not enter Low Power Mode so we know that this is not the cause of failure.
    2. This additional information could mean that the hardware is not a factor, which was also apparent from your previous investigations.
    3. Thank you for agreeing to test as it would help determine if the issue is resolved in a later release.
    4. I am attempting to organize a test environment so that I can replicate this issue from my end.

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for your support。

    Did you find anything on your testing?

    Regards

    Aaronga

  • Hi Aaronga,

    I unfortunately do not have immediate access to a -5℃ testing environment, please let me know when you have completed further Z-Stack version test cases.

    Regards,
    Ryan

  • Hi ,Ryan

    I have tested the project “samplelight” on Z-stack 3.0.2.  the  issue not reappeared。

    Seems  it is a bug on   Z-Stack Lighting 1.0.2?

    any suggestion?

    Regards

    Aaronga

  • Hi Aaronga,

    This issue is specific to the Z-STACK-ARCHIVE Lighting Sample Light involving the Thermal Shutdown, which is discussed in Section 7.7 of the Stack Developer's Guide.  The light is supposed to shut down after the temperature surpasses a provided threshold (90℃ by default) however there exists a bug inside of the HalAdcRead function where is does not correctly connect the internal temperature sensor to the ADC during temperature measurements.  Therefore results are unreliable and shutdown can occur at unexpected temperatures, such as -5℃ or less.  You can choose to disable this feature or modify HalAdcRead accordingly:

    uint16 HalAdcRead (uint8 channel, uint8 resolution)
    {
      int16  reading = 0;
      uint8 refvolt = adcRef;
    
    #if (HAL_ADC == TRUE)
      uint8   i, resbits;
      uint8  adcChannel = 1;
    
      /*
       * If Analog input channel is AIN0..AIN7, make sure corresponing P0 I/O pin
    is enabled.  The code
       * does NOT disable the pin at the end of this function.  It is
    better to leave the pin
       * enabled because the results will be more accurate.  Because of the
    inherent capacitance on the
       * pin, it takes time for the voltage on the pin to charge up to its
    steady-state level.  If
       * HalAdcRead() has to turn on the pin for every conversion, the results may
    show a lower voltage
       * than actuality because the pin did not have time to fully charge.
       */
      if (channel < 8)
      {
        for (i=0; i < channel; i++)
        {
          adcChannel <<= 1;
        }
      }
    
      /* If we are going to read the temperature sensor then we must enable it
    first */ 
      else if (channel == HAL_ADC_CHANNEL_TEMP) 
      { 
        TR0 |= 0x01; 
        ATEST |= 0x01; 
        refvolt = HAL_ADC_REF_125V;
      } 
      else if (channel == HAL_ADC_CHANNEL_TEMP) 
      { 
        refvolt = HAL_ADC_REF_125V;
      } 
    
      /* Enable channel */
      ADCCFG |= adcChannel;
    
      /* Convert resolution to decimation rate */
      switch (resolution)
      {
        case HAL_ADC_RESOLUTION_8:
          resbits = HAL_ADC_DEC_064;
          break;
        case HAL_ADC_RESOLUTION_10:
          resbits = HAL_ADC_DEC_128;
          break;
        case HAL_ADC_RESOLUTION_12:
          resbits = HAL_ADC_DEC_256;
          break;
        case HAL_ADC_RESOLUTION_14:
        default:
          resbits = HAL_ADC_DEC_512;
          break;
      }
    
      /* writing to this register starts the extra conversion */
      ADCCON3 = channel | resbits | refvolt;
    
      /* Wait for the conversion to be done */
      while (!(ADCCON1 & HAL_ADC_EOC));
    
      /* Disable channel after done conversion */
      ADCCFG &= (adcChannel ^ 0xFF);
    
      /* Read the result */
      reading = (int16) (ADCL);
      reading |= (int16) (ADCH << 8);
    
      /* Treat small negative as 0 */
      if (reading < 0)
        reading = 0;
    
      switch (resolution)
      {
        case HAL_ADC_RESOLUTION_8:
          reading >>= 8;
          break;
        case HAL_ADC_RESOLUTION_10:
          reading >>= 6;
          break;
        case HAL_ADC_RESOLUTION_12:
          reading >>= 4;
          break;
        case HAL_ADC_RESOLUTION_14:
        default:
          reading >>= 2;
        break;
      }
    
      /* Disable the temp sensor if we turned it on for this read */ 
      if (channel == HAL_ADC_CHANNEL_TEMP) 
      { 
        ATEST &= ~0x01; 
        TR0 &= ~0x01; 
      }
    
    #else
      // unused arguments
      (void) channel;
      (void) resolution;
    #endif
    
      return ((uint16)reading);
    }

    Regards,
    Ryan

  • Hi ,Ryan 

    Thanks very much ,this resolved my issue.

    another question:

    how to open the function“mesh”,on Z-Stack Lighting 1.0.2?

    I test Z-Stack 3.0.2,I found it have “mesh”,but on Z-Stack Lighting 1.0.2,it seems no mesh。

    maybe I miss some “defined”?

    Regards

    Aaronga

  • Mesh capability is enable by default on Z-Stack Lighting 1.0.2.