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.

Zigbee Light Link support for CC2530-CC2592

Other Parts Discussed in Thread: CC2592, CC2530, CC2591, Z-STACK, CC2531, CC2590

Hello,


I am planning to use CC2592 Range Extender with CC2530 with ZigBee Light Link Stack. For this I want to know if there is any support for integrating CC2592 with CC2530 using ZigBee Light Link.


Regards,

Aijt Wadekar

  • Basically, ZLL stack doesn't support CC2592. However, CC2591 and CC2592 are similar so I think you can define HAL_PA_LNA (for CC2591) to make CC2592 work too.
  • Dear Yikai,

    So does this mean in hardware if I use CC2592 design guide for designing Range Booster with CC2530 and in software if use HAL_PA_LNA in compiler option in ZLL, it will work?

    Regards,
    Ajit Wadekar
  • Dear Yikai,

    So does this mean in hardware if I use CC2592 design guide for designing Range Booster with CC2530 and in software if use HAL_PA_LNA in compiler option in ZLL, it will work?

    And I think in Hardware I would need to change connection of LNA_EN pin of CC2592 from P1_0 to P1_4 in CC2530.

    Are these changes enough?

    Regards,
    Ajit Wadekar
  • Actually, you can replace the following codes in mac_radio_defs.c

    /* P1_4 -> EN (LNA control) */
    RFC_OBS_CTRL1 = RFC_OBS_CTRL_LNAMIX_PD_INV;
    OBSSEL4 = OBSSEL_OBS_CTRL1;

    with

    /* P1_0 -> EN (LNA control) */
    RFC_OBS_CTRL1 = RFC_OBS_CTRL_LNAMIX_PD_INV;
    OBSSEL0 = OBSSEL_OBS_CTRL1;

    Then, you can only define HAL_PA_LNA to use CC2592 in ZLL stack without changing HW.
  • Dear Yikai,

    Thanks for the repy. Will test this on the hardware with ZLL and get back to you for any query.

    Regards,
    Ajit Wadekar
  • You are welcome.
  • Dear Yikai,

    As suggested by you, I have done following changes in order to enable support for CC2592 with CC2530 in Zigbee Light Link

    1) Add ZMacSetTransmitPower(TX_PWR_PLUS_19)   in     zllSampleLight_Init( byte task_id )

     

    2) In mac_radio_defs.c I have changed

       /* P1_4 -> EN (LNA control) */
        RFC_OBS_CTRL1 = RFC_OBS_CTRL_LNAMIX_PD_INV;
        OBSSEL4       = OBSSEL_OBS_CTRL1;

    with


          /* P1_0 -> EN (LNA control) */
        RFC_OBS_CTRL1 = RFC_OBS_CTRL_LNAMIX_PD_INV;
        OBSSEL0 = OBSSEL_OBS_CTRL1;

     

    3) And Hardware connection as shown in

    Are these changes enough to completely enable support of CC2592 with CC2530 in ZLL? Because even after doing above changes it is not working.

    Also, I have tested hardware by testing it  with Z-Stack HA SmapleLight Code.

    Regards,

    Ajit Wadekar

  • If your CC2530-CC2592 follows design in processors.wiki.ti.com/.../LNA_with_Z-Stack-Home-Automation-1.2.1, it should work using SampleLight (Z-Stack Home 1.2.2a) with HAL_PA_LNA_CC2592 defined. Can you verify this first?
  • Dear Yikai,

    As mentioned in previous post I have verified it using Z-Stack HA  SampleLight with HAL_PA_LNA_CC2592 enabled.

    Regards,
    Ajit Wadekar

  • Does your HW work well with Z-Stack HA SampleLight? If yes, I would suggest you to use oscilloscope to check EN (P1_0) and PAEN (P1_1) pin to see if they work as expected.
  • Dear Yikai,


    What is the difference between SampleLight-Zlight and SampleLight-EB in ZigBee light link?

  • SampleLight-Zlight is for Zlight2 aeVB and SampleLight-EB is for CC2530DK.
  • Dear Yikai,

    Thanks for the reply.

    Now my problem here is that I am using Z-Light, for this i created my custom hardware using CC2530 which works fine.

    But I also created a new hardware with CC2530+CC2592 for this I have done changes as suggested by you in above post i.e. enable support for CC2591(HAL_PA_LNA), here RF part works fine but the timer part which is supposed to take care of LED color does not work after enabling HAL_PA_LNA.
    Which rather works fine without HAL_PA_LNA.

    What could be the problem here? And what all functions shall I check in order to identify the problem further?
  • Check if there is conflict on LED pins and PA/LNA pins.
  • Dear Yikai,

    As far as I know pins used for PA/LNA are P1_4, P1_1, P0_7

    and for LED I am using default timer which is already provided in zll code i.e. Timer1
    P0_3,P0_4,P0_5
  • Try to set breakpoint to check CC2530 registers when you control LED.
  • Dear Yikai,

    That is the problem I did check it by setting the break point at hwLight_UpdateLampColor() function and debugger does hit the function and timers are also called from here, but no action at the end.

  • What do you mean no action at all?
  • Dear Yikai,

    The output voltage on the timer pins remain zero.
  • Do you check registers ?
  • Dear Yikai,

    Its the same code as in ZigBee Light Link. So I think the registers should be fine.

    I have designed the hardware accordingly.
  • Dear Yikai,

    I tested the code of Zigbee light link.

    The device works fine i.e. Turn ON and OFF if HAL_PA_LNA is not defined whereas when I define HAL_PA_LNA the device does not turn ON and OFF.

    I have used the same ZLL code without any changes what could be the problem here.
  • Dear Yikai,

    Can you please look into the original ZLL code and help me to check what is disable when HAL_PA_LNA is defined.

    Regards,

    Ajit Wadekar

  • Which pins do you use between CC2530 and CC2592 on your custom board?
  • Dear Yikai,

    For CC2530 + CC2592 I use P1_4 for EN, P1_1 for PAEN, P0_7 for HGM.

    and for LED's P0_3, P0_4 and P0_5.
  • Can you elaborate what you mean the device does not turn ON and OFF when define HAL_PA_LNA? Is there no PWM output on P0.3, P0.4, and P0.5?
  • Dear Yikai,

    Yes Sir there is no output on PWM after enabling HAL_PA_LNA but the same works fine (i.e. there is output on PWM) if I disable HAL_PA_LNA.
  • When you build SampleLight in ZLL stack, do you select Zlight-Router or EB-Router configuration?
  • Dear Yikai,

    I use Z-Light Router.
  • I see no reason why this happens. Do you use oscilloscope to check P0.3, P0.4, and P0.5? And what's the registers P0SEL and P0DIR value when you send ON/OFF command with HAL_PA_LNA enable?
  • Dear Yikai,

    I have checked it on Oscilloscope there is no output on PWM.

    Here the register value should be the following with INIT_PWM_PINS defined

    #define INIT_PWM_PINS()                                          \

    {                                                                \

     PERCFG &= ~(0x40); /* bit 6 = 0 */                             \

     P0SEL |= ( 0x08 | 0x10 | 0x20 | 0x40); /* P0.3:6 */            \

     P0DIR |= ( 0x08 | 0x10 | 0x20 | 0x40); /* P0.3:6 */            \

    }

    Sir here there are two hal_board_cfg.h files one for CC2530 and other for CC2531. Can you please tell me which hal_board_cfg.h file is used for Z-Light Router?

  • Add the following red code to HAL_BOARD_INIT() in hal_board.cfg.h under C:\Texas Instruments\Z-Stack Lighting 1.0.1\Components\hal\target\CC2530PMP4712 and it should fix your problem.

    #elif defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590)

    #define HAL_BOARD_INIT()                                         \
    {                                                                \
      uint16 i;                                                      \
                                                                     \
      SLEEPCMD &= ~OSC_PD;                       /* turn on 16MHz RC and 32MHz XOSC */                \
      while (!(SLEEPSTA & XOSC_STB));            /* wait for 32MHz XOSC stable */                     \
      asm("NOP");                                /* chip bug workaround */                            \
      for (i=0; i<504; i++) asm("NOP");          /* Require 63us delay for all revs */                \
      CLKCONCMD = (CLKCONCMD_32MHZ | OSC_32KHZ); /* Select 32MHz XOSC and the source for 32K clock */ \
      while (CLKCONSTA != (CLKCONCMD_32MHZ | OSC_32KHZ)); /* Wait for the change to be effective */   \
      SLEEPCMD |= OSC_PD;                        /* turn off 16MHz RC */                              \
                                                                     \
      /* Turn on cache prefetch mode */                              \
      PREFETCH_ENABLE();                                             \
      /* Set UART1 I/O to alternate 2 location on P1 pins. */        \
      PERCFG |= 0x02;  /* U1CFG */                                   \
      /* Set UART0 I/O to alternate 2 location on P1 pins. */        \
      PERCFG |= 0x01;  /* U1CFG */                                   \
                                                                     \
      INIT_PWM_PINS();                                               \
                                                                     \
      /* Set PA/LNA HGM control P0_7 */                              \
      P0DIR |= BV(7);                                                \
                                                                     \
      /* setup RF frontend if necessary */                           \
      HAL_BOARD_RF_FRONTEND_SETUP();                                 \
    }

    #endif

  • Dear Yikai,

    Thank you.

    It worked. Will do testing on it let you know if any problem persist.
  • You are welcome.