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.

CCS/CC3235SF: Utilizing 2 UARTs at the same time.

Part Number: CC3235SF
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software: Code Composer Studio

Hi all,

I am using the CC3235SF board and I would like to utilize 2 UARTs simultaneously, based on the datasheet it would be possible to configure 2 UARTs. Using the sysconfig tool I configured the board as I wanted (i.e. 2 UARTs) as it can be seen below:

So in order to use the 2 UARTs, I imported the generated files: CC3235SF_LAUNCHXL.c,  CC3235SF_LAUNCHXL.h. 

How can I extent the example code of 'uartecho.c' in order to use both UARTs at the same time?

Also, is there a possibility tha this configuration overlaps with other build in functionality of the board, e.g. switches. ?

Thanks in advance!

Best regards,

Artemis

  • Hi Artemis,

    Can you reattach your screenshot? It didn't show up in your original post.

    Otherwise, assuming you added 2 instances of UART named CONFIG_UART_0 and CONFIG_UART_1, you can use those names to open 2 different UART handles.

    In the uartecho example, you would change the single UART_open() to

    uart0 = UART_open(CONFIG_UART_0, &uart0Params);
    uart1 = UART_open(CONFIG_UART_1, &uart1Params);

    Then you can use UART_read(uart0, ...), UART_write(uart1, ...), etc. in your application.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks for the quick reply! I reattached the photo (photo2). Do the pin assignments from the SysConfig tool (photo2) match the pinmap of the board (photo1)?

    Meaning that the pins assigned to RX, TX of MyUART2 = GPI02, GPI01 are indeed the pins in the blue square of photo1.

    Thanks in advance.

    Best,

    Artemis

      

  • Hi Artemis,

    Yes, that looks correct. A few tips though:

    • In the SysConfig tool, I highly suggest you use the Software Product drop down to select the CC32xx SDK version that you have installed locally. The updated SDK will show you many more configuration options, including a view of the LaunchPad header pins.
    • Pins 55 and 57 (GPIO1 and GPIO2) by default are tied to the XDS110 debugger on the LaunchPad and can be used to print messages to your PC terminal. If you wish to use these from the header pins instead of through the USB, you need to move some board jumpers. See the CC3235 LaunchPad User's Guide for more details.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks a lot for the help. I indeed used the internal SysCinfug tool,in which  I choose some other pins for UART1 and my problem is solved!

    I have one last question regarding the UART, does it display first the LSB bit and then the MSB when using the UART_write()?

    I am aksing because I was trying to print a hex value over the UART.

    Thanks a lot!

    Best,

    Artemis