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.

CC2531EMK: Enabling UART/RS232

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

Hi all,

I am working on a set of custom PCBs that both use CC2531, designed to be both sensor/data accumulator and coordinator.

I am trying to compile the example ZNP project from Z-Stack 3.0.2 with the UART enabled so we can get some debug output, and having a bit of a nightmare.

Changing the #define in hal_board_cfg.h so HAL_UART_ISR is 1 and HAL_UART_USB is 0 causes a compilation error due to lack of _hal_uart_isr.c, a quick search shows it in $ZSTACK_DIR\Components\hal\target\CC2350ZNP, so I've added this include directory to project options, but now have a missing definition for HAL_UART_PRIPO in the newly included c file.

Another search and the definition can be found in hal_board_cfg.h in the same \Components\hal\target\CC2530ZNP folder, but the CC2531 - Debug project options don't appear to reference the include by name, so I added it to the top of _hal_uart_isr.c, but the definition was still not picked up.

At this point I wonder if I am barking up the wrong tree, is it possible (within reason) to route the UART out from this chip while making use of the ZNP example project?

Thanks,

Will

  • Hi Will,

    I would have just expected a change to the HAL drivers (from USB to UART) and Pre-definitions to be necessary.  You may need to ensure that the file search paths correspond to the HAL changes which are made.  Conversely, have you tried starting with a CC2530 UART ZNP example and modifying it to use the CC2531 instead?  This may prove to be the more simple method since the devices are so similar.

    Regards,
    Ryan