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 (F256) UART responds with 0xFF

Other Parts Discussed in Thread: CC2530, Z-STACK, CC2530EM

I'm working on an application that will communicate with a CC2530 (F256) chip on an android device through UART.

The manufacturer of the android device has supplied the CC2530 firmware, and I've been told that it will work with the CC2530 protocol.

The first thing my application does is to reset and start the CC2530 through the reset HW interface. The CC2530 then responds on the UART with 0xFF and nothing else.

My UART connection is setup with:

  • Baudrate: 115200
  • One stop bit
  • No flow control
  • 8 data bits
After I receive the 0xFF respons I try to send a ZCD_NV_ZDO_DIRECT_CB message over UART: 0x03 0x26 0x05 0x008F 0x01 0x01, wrapped in an UART transport frame (0xFE [ ] Checksum). However, I don't receive any respons message.
Does anyone have an idea of what can be the cause of the problems I'm experiencing? Any response would be much appreciated. 
  • I suggest you use SYS_PING command which would look like 0xFE 0x00 0x21 0x01 0x20 to test your CC2530 since it is the basic command. If there is still not response. I would suggest to to contact the manufacture for help.

  • I have tried using SYS_PING as you suggested, but nothing is returned still. I have also contacted my manufacturer in China, but they could not help me. 

    I have tried compiling ZNP firmware also, to see if that could solve my problem. However, I'm getting the same result (returning 0xFF on startup, and nothing on everything else) with my new firmware.

    Any other suggestions?

  • If you use ZStack Home 1.1.0, you can use the pre-build hex image at C:\Texas Instruments\Z-Stack Home 1.1.0\Projects\zstack\ZAP\ZNP-HexFiles\CC2530ZNP-Pro.hex. Try to download it into your CC2530 and test it. I can use ZTool to connect to SmartRF05EB+CC2530EM with this ZNP firmware.

  • I have tried using the CC2530ZNP-Pro.hex, and it gives me no response, not after startup, and not on SYS_PING. Is UART enabled on this firmware? 

    In the firmware I compiled I've also tried performing a HalUARTWrite() in the npInit() of the znp_app.c:

    static uint16 npUartTxCnt = 1;
    static uint8 *pMsg = (uint8*)0x11;
    if (ZNP_CFG1_UART == znpCfg1)
    {
    halUARTCfg_t uartConfig;

    uartConfig.configured = TRUE;
    uartConfig.baudRate = ZNP_UART_BAUD;
    uartConfig.flowControl = FALSE;
    uartConfig.flowControlThreshold = HAL_UART_FLOW_THRESHOLD;
    uartConfig.rx.maxBufSize = HAL_UART_RX_BUF_SIZE;
    uartConfig.tx.maxBufSize = HAL_UART_TX_BUF_SIZE;
    uartConfig.idleTimeout = HAL_UART_IDLE_TIMEOUT;
    uartConfig.intEnable = TRUE;
    uartConfig.callBackFunc = npUartCback;
    HalUARTOpen(HAL_UART_PORT, &uartConfig);
    MT_UartRegisterTaskID(znpTaskId);
    HalUARTWrite(HAL_UART_PORT, pMsg, npUartTxCnt);

    }

    However, this does not give me any response.

    Also:

    HAL_UART TRUE

    HAL_UART_DMA 1

    HAL_UART_PORT 1

    ZNP_CFG1_UART 1

    Any ideas?

  • What UART pins do you use on your CC2530? P0_2 and P0_3 as TX/RX? If so, you need to define HAL_UART_PORT 0. Please make sure your UART HW connection is correct first.

  • Thank you very much YiKay, this got it working for me. 

  • Hi,

    Actually am also struck at similar kind of problem . I request you to please tell that where should I define this-

    define HAL_UART_PORT 0. 

  • You can define ZTOOL_P1 in compile option instead of define HAL_UART_PORT 0.
  • if I want define HAL_UART_PORT 0. then where should i define this?
  • It's in OnBoard.h.

    /* Serial Port Definitions */
    #if defined (ZAPP_P1)
    #define ZAPP_PORT HAL_UART_PORT_0
    #elif defined (ZAPP_P2)
    #define ZAPP_PORT HAL_UART_PORT_1
    #else
    #undef ZAPP_PORT
    #endif
    #if defined (ZTOOL_P1)
    #define ZTOOL_PORT HAL_UART_PORT_0
    #elif defined (ZTOOL_P2)
    #define ZTOOL_PORT HAL_UART_PORT_1
    #else
    #undef ZTOOL_PORT
    #endif