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.

CC2538 UART interface with RS232 adapter board.

Other Parts Discussed in Thread: CC2538, MAX3232

Hi,

We have purchased CC2538 zigbee development kit and we intend to connect CC2538's UART port to a host PC.
With this regard, I have connected a MAX3232 based (TTL to RS232) adapter board to the UART Tx, Rx and GND lines, brought out on the break out connector of SRF06EB board. [MCU Tx -> RS232 Adapter Rx, MCU Rx -> Adapter Tx and a straight DB9 cable from PC to MCU]

I ran a couple of UART examples (Uart_example and uart_polled) provided in CC2538 foundation firmware (swr217a). I see that in both interrupt and polled versions, only the UART transmission is working fine, and the UART Rx of the MCU does not seem to be working.

I tried looping back the adapter board (shorting Tx and Rx) and it seems to be working fine. I also tried enabling the loopback enable bit (UART_CTL_LBE) of CC2538 UART0 and this seems to be working fine as well.

I probed the Rx line of CC2538 and I do see data on the Rx pin, but for some reason the Rx interrupt is not generated.

The RS232 adapter board which I am using is procured locally in Bangalore, has an ILX3232D chip from a company called Integral based in Minsk, Belarus.
Following is the datasheet of the 3232 chip.
http://www.integral.by/eng/download/46/ILX3232E.pdf

Following are my Questions:

1. Can you comment on the setup which I have? Do you see any issues with using ILX3232D chip?
2. Which TTL - RS232 adapter board with DB9 connector does TI recommend to interface with SRF06EB?

Thanks,
Somesh

  • Hi Somesh,

    Is there any particular reason you do not use the on-board usb-to-uart that is available on the SmartRF06 board?

    When you connect the SmartRF06 to a PC using a USB cable, it will automatically enumerate a virtual COM port on the PC using the standard driver from FTDI. Please see the details at http://www.ti.com/lit/ug/swru321a/swru321a.pdf section 6.1.1 UART back channel

    Best regards,

    OD

  • Hi OD,

    Following are the reasons why I do not want to use the on-board USB to UART:
    1. We intend to connect one of the SmartRF06 board to Panda board ES which has an UART port brought out on a DB9 connector. Since we are still in development phase, we would require to connect the SRF06EB to a host PC over RS232 (DB9) for debugging purposes.
    2. I tried the sample UART code (of CC2538 foundation firmware) using the COM port allocated by the FTDI driver (Onboard USB to UART). The Tx and Rx seems to be very slow, though it is operating at a baud rate of 115200. In repeater mode of the UART example, it is is taking over 4 seconds and sometimes it took 10 seconds to echo back the character. Is this an expected behavior?

    Apart from these, I tried and observed the following with the RS232 adapter interface board.
    1. I removed the jumper which enables the UART back channel, and opened the COM port associated with the RS232 adapter board. With the same UART example executing, the repeater mode was working even with the adapter board. But the Rx and Tx was slow, takes about 4-5 seconds to echo back the character received. If the speed of characters sent to the terminal is increased, it starts to behave strangely, the terminal becomes
    unresponsive, or only the last character is echoed.
    2. With the UART back channel jumper mounted, (which was the case before I posted this thread), the transmission of character '4' happens when SW1 is pressed in transmitter mode and in repeater mode the it does not receieve and echo back - which is fine as the jumper is mounted. I guess the transmission also should not happen if the back channel jumper is mounted right?

    Can you comment on the sluggish behavior of the UART even when not using the onboard USB to UART?

    There is a tool provided in zigbee home automation folder called ZTool. From ZTool help - "Z-Tool is a development application which can be used to communicate with TI ZigBee target device development system.  Communication takes place using a standard RS-232 serial communication port on a Windows based PC.  It is used for development, testing, and debugging purposes."

    With Sample light coordinatior firmware running on one SRF06EB board, Sample switch end device running on another board and coordinator connected to a host PC, I tried to scan for devices using "Scan for devices" but was there was a message "No Devices Found". This was tried with the UART back channel jumper mounted as well as unmounted.

    Can you help in getting the ZTool working with the SampleLight ZC firmware?

    Thanks,
    Somesh

  • Hi OD,


    Few updates on this. I tried the sample UART application with another terminal application (TeraTerm) on my PC. The UART works very well. Looks like I was using an incompatible terminal application. I had used Bray Terminal https://sites.google.com/site/terminalbpp/.


    So the conclusions for my thread are,

    1. I had mounted the back channel jumper which diverts the UART data to the virtual COM and was expecting to see the actual UART0 port function.
    2. I had used an incompatible PC terminal software.

    Thanks OD for pointing me to the user guide.

    Thanks,

    Somesh