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.

UARTprintf() function doesn't work on Concerto eval board

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I am using the TMDXDOCKH52C1 - H52C1 Concerto Experimenter kit - and cannot get anything to print to the console. The examples provided with ControlSuite have the following code:

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);

GPIOPinConfigure(GPIO_PE4_U0RX);

GPIOPinConfigure(GPIO_PE5_U0TX);

GPIOPinTypeUART(GPIO_PORTE_BASE, GPIO_PIN_4 | GPIO_PIN_5);

UARTStdioInit(0);

UARTprintf( "Hello World!/n");

But when I run this code I do not see anything appear on the console. Can anyone see why it isn't working?

Thanks, Tom

  • Hi David,

    I'm using both that TMDXDOCKH52C1 - H52C1 and the TMDXCNCDH52C1 - H52C1 ControlCard by itself.

    I've tested alot of the demos, the UART demo that I worked with is 'uart_echo_m3' (from the examples in ControlSuite).  It works quite well, here is the setup from uart_echo.c, note the more extensive setup and the use of UARTSend instead of UARTprintf:

    int
    main(void)
    {

        // Disable Protection
        HWREG(SYSCTL_MWRALLOW) =  0xA5A5A5A5;

        // Setup main clock tree for 75MHz - M3 and 150MHz - C28x
        SysCtlClockConfigSet(SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_USE_PLL |
                             (SYSCTL_SPLLIMULT_M & 0x0F));

        // Enable the peripherals used by this example.
        SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);

        // Enable processor interrupts.
        IntMasterEnable();

        // Set GPIO E4 and E5 as UART pins.
        GPIOPinTypeUART(GPIO_PORTE_BASE, GPIO_PIN_4 | GPIO_PIN_5);
        GPIOPinConfigure(GPIO_PE4_U0RX);
        GPIOPinConfigure(GPIO_PE5_U0TX);

        // Configure the UART for 115,200, 8-N-1 operation.
        UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(SYSTEM_CLOCK_SPEED), 115200,
                            (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
                             UART_CONFIG_PAR_NONE));

        // Enable the UART interrupt.
        IntRegister(INT_UART0, UARTIntHandler);
        IntEnable(INT_UART0);
        UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);

        // Prompt for text to be entered.
        UARTSend((unsigned char *)"Enter text: ", 12);

        // Loop forever echoing data through the UART.
        while(1)
        {
        }
    }

    Hope that helps,

    ---Joshua Newman

     

     

  • Hi Josh,

    Thanks for the advice, however I have tested that exact example myself, with the same code, and it still doesn't work!

    I can put a breakpoint on that line and when I go through it, nothing appears on the console.  Just to clarify, should the text appear on the console at the bottom or on the "scripting console" (available through 'view')?

    All I have on the Console is:

    "Cortex_M3_0: GEL Output: Memory Map Initialization Complete

    Cortex_M3_0: GEL Output: Watchdog Timers Enabled

    Cortex_M3_0: GEL Output: UARTs Enabled"

    Have you changed anything else from that example?

    Thanks, Tom

  • Hi Tom,

    Oh, now I see, the problem is simple. :-)

    The Console in CCS is NOT the Terminal (it's a built in UART terminal, like HyperTerminal)!

    You can try one or both of these:

    To get the (CCS) Terminal open,  in the menu for CCS choose Window>Show View>Other>Terminal.  Then, when the Terminal opens (probably on the right of your screen), pick Serial, and set up the parameters properly (115200, 8 bits, 1 stop bit, no parity, no flow control) and choose the correct COM port (the COM that your PC choose for the Concerto, usually the highest one in the Hardware Manager in Windows).  Then, run the program in CCS and you should see it working.

    You can do it with HyperTerminal if you are running Windows XT, set up a HyperTerminal with the proper parameters, make sure it is 'Connected', then run the program in CCS and it should work.

    Let me know how that went.

    Good Luck,

    ---Joshua Newman

  • Ahh yes! Thank you so much, it seems so simple but I don't know how I was supposed to work it out myself...? I must have missed a tutorial along the way at some point.

    Tom

  • Dera All,

    I've the same Concerto based Development's Kit.

    I found the same problem with using the UARTprintf() function. I tried to show the output on the serial terminal but UARTprintf doesn't work.

    I had good result only with UARTCharPutNonlocking().

    Does UARTprintf() function (and in general UART APIs)  need any kind of installation?

    Thanks

    Andrea

  • I've never ever ever ever saw this built-in terminal.

    Does it exist in CCS 5 ??

    Anyway, for anyone looking for a alternative, I've been using the Putty Portable and works flawlessly: http://portableapps.com/apps/internet/putty_portable