CC1312R: cc1312r getting uart onto ccs screen

Part Number: CC1312R


Sorry, newbe on CCS / 1312

XDS seems to listen to the uart on my LAUNCHXL board. How do I open a console that displays

what the radio writes on its uart? I wnat to test menus and such while debugging.


  • Hi Gullik,

    To use the CCS UART terminal:

    _ Click on Window -> Show View -> Other -> Terminal

    _ Click on new terminal, then select "Serial Terminal"

    _ You should see your terminal now



  • Thanks for the response Arthur,

    I do that, but nothing comes up on the screen.

    I am using the Uart Bridge example, and it opens up uart 0, and then prints a message

    I thought the first uart pins TXD and RXD would correspond to uart 0, and that the jtag part

    would send them to a console in CCS.

    Puzzled Gullik

  • Hi Gullik,

    Have you selected the right COM port? It should be the XDS110 Class Application/User UART.

    In the following screenshot, I show the rfUARTBridge example project running on two boards, each having it's own terminal window and exchanging data:



  • Thanks Arthur,

    Well, I run linux, but have two ports, ttyACM0 and ttyACM1 when I plug in the XDS.

    Update: when debugging, ttyACM0 is connected to uart 0, so running minicom displays OK. Uart 1 I have connected to a USB dongle, so that works fine as well, but I have not been able to connect a console to

    the port. Anyway, my problem is partly solved.

    I run no-rtos, (for now) how about stdio.h and stdin / stout? Are these in place so standard program prologue

    can be used?


  • Hi Gullik,

    In which case, /dev/ttyAC0 is the port you have to use.



  • Part Number: CC1312R


    I do not seem to get UART 1 working. Please help me understand what I have done wrong.

    I am using the rfUARTBridge_CC1312R1_LAUNCHXL_nortos_gcc example to test my code out.
    I have run syscfg, and added a uart, it uses pins DIO12/19 and DIO1/30 for TX and RX.
    ( what is the meaning of pin 12/19, I am using 12, and 1/30, I am using 1 ??)

    < UART2_Handle uart1;        // ad a uart
    < UART2_Params uartParams1;
    < unsigned char cc;
    < static char         cmdline[MAX_LENGTH]; // a buffer to put caharcters in

    < volatile size_t cmdbytes;    // a count to test if I got some

    similar to the UART2 uart I have added a callback for uart1

    < static void ReceiveonUARTcallback1(UART2_Handle handle, void *buffer, size_t count, void *userArg, int_fast16_t status);

    it is setup similar to uart

    <     /* Initialize UART1 with callback read mode GW */
    <     UART2_Params_init(&uartParams1);
    <     uartParams.baudRate = 115200;
    <     uartParams.readMode = UART2_Mode_CALLBACK;
    <     uartParams.readCallback = ReceiveonUARTcallback1;
    <     uartParams.readReturnMode = UART2_ReadReturnMode_PARTIAL;

    I can print a message on uart1, and it comes out on my terminal correctly

    <     uart1 = UART2_open(CONFIG_UART2_1, &uartParams1);
    <     const char        startMsg1[] = "\r\nRF-UART-1 bridge started:\r\n";
    <     UART2_write(uart1, startMsg1, sizeof(startMsg1), NULL);

    Then issue a read , similar as uart on uart1

    <     status = UART2_read(uart1, &cmdline, 1, NULL);    // issue a starting read

    code snippet to check what I got on uart1 and echo the character

    <         } else {
    <             if (cmdbytes != 0) {
    <                 UART2_write(uart1,&cmdline,1,NULL);    //echo what I got
    <                 cmdbytes = 0;
    <                 UART2_read(uart1, &cmdline, 1, NULL);    // re-issue read
    <             }
    < }

    finally the callback
    < void ReceiveonUARTcallback1(UART2_Handle handle, void *buffer, size_t count, void *userArg, int_fast16_t status)
    < {
    <     if (status == UART2_STATUS_SUCCESS) {
    <         cmdbytes = count;    //just incr cmdbytes to show we got character(s) see snippet above
    <     }
    <     else {
    <         while (1) {}
    <     }

    If I put a break on this callback it never happens, the uart callback happens, and I echo (for testing) what I write on the terminal.
    But, the *identical*?? code for uart1 does not work. Puzzled....


  • Also, when injecting a character in the uart port, the callback enters ONCE into the uart1 callback.

    Is the callback common to ALL uarts, and I am supposed to differentiate between them by

    the handle parameter, or should each uart have its OWN callback (as I have done)?

    even more puzzled

    update: also strange is that the FIRST time I hit a read for uart1, if i put a break after the read,

    the program hangs on the read, I enter a character, it hits the break, and I can see that cmdline[0] contains

    that character. Was not the callback function  NONBLOCKING? Why does the first read hang?

    (at least I have been able to eliminate the HW, since the character IS in cmdline[0]!!)

    But read hangs, and callback is never executed.


    My bad, the parameters set up after the initParams line were refering to the wrong parameter list.

    So, once that was corrected things started working as expected.

    Sorry for all the useless text....