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.

cc3200 use UART both ports 0n CC3200

Other Parts Discussed in Thread: CC3200

Hi Guys,

I want to use both uart ports on the board. From an example(uartecho), I could find how to use a uart, but I would like use all uart on the board(there is two uart ports on the board).

Is there any suggestion and example?

Thank you

  • Moving this to the CC3200 forum.

    Regards,
    Gigi Joseph.
  • Hi Mina,

    CC3200 has two UARTs (UARTA0 and UARTA1). For UARTA0 please refer to 'uart_demo' SDK example. For UARTA1 there are no examples but you can keep the 'uart_demo' as reference for configuring UARTA1 yourself.

    Basically changing the base address definition UARTA0_BASE to UARTA1_BASE

    Please note that only UARTA0 is routed to USB port on the LP. UARTA1 comes on the header.

    Thanks and Regards,
    Praveen
  • Hi,

    Were you able to get the UARTs working on your setup ? If so, please mark this thread as answered to close it.

    Thanks and Regards,
    Praveen
  • Same problem, no solution yet...

    pinmuxconfig.c fragment (same as pinmux utility output):

        MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);
        MAP_PRCMPeripheralClkEnable(PRCM_UARTA1, PRCM_RUN_MODE_CLK);
        // UART 0
        MAP_PinTypeUART(PIN_55, PIN_MODE_3);
        MAP_PinTypeUART(PIN_57, PIN_MODE_3);
        // UART 1
        MAP_PinTypeUART(PIN_07, PIN_MODE_5);
        MAP_PinTypeUART(PIN_08, PIN_MODE_5);

    Shorted pins P2-3 and P2-6 (pins 7 and 8) just in case if the floating UART receiver input sees something that makes it go nuts. main.c fragment:

        InitTerm();
        MAP_UARTConfigSetExpClk(UARTA1_BASE, PRCMPeripheralClockGet(PRCM_UARTA1),
                38400, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
                UART_CONFIG_PAR_NONE));

    InitTerm is effectively same thing as the function call, with all values hard-coded:

      MAP_UARTConfigSetExpClk(CONSOLE,MAP_PRCMPeripheralClockGet(CONSOLE_PERIPH),
                      UART_BAUD_RATE, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
                       UART_CONFIG_PAR_NONE));

    When I execute

                    MAP_UARTCharPut(UARTA1_BASE, 0x01);
    from a task, the task hangs. When I restart the debugger and reload the code, the code hangs in UARTConfigSetExpClk function on line

    UARTDisable(ulBase);

    The hangup is caused by the UART still being busy trying to transmit the 0x01 byte. Only if I press the reset button on the board and then reload and restart the code, it goes through initialization and hangs in the MAP_UARTCharPut(UARTA1_BASE, 0x01); again.

  • Don't know what happened, but for a long while this code failed to work, but now with no changes to that code it fails to fail (i.e. it works).