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.

EK-TM4C123GXL: Unable see echoed characters using UART3 in uartecho_TM4C123GXL_TI example

Part Number: EK-TM4C123GXL

Hello!

I believe I have made the necesary changes to the example in order to use UART3 instead of the default UART0. I have not added another uart in EK_TM4C123GXL.c. Rather I have simply done changes to the code used to configure UART0.

I am using a bluetooth module I have successfully used using UART3 in a non-rtos setting. I can confirm that I am able to connect to the module through Tera Term. The program compiles and runs, but no characters are echoed. 

I will show the relevant screenshots containing the changes:

Here is the echoFxn. All I've changed is "Board_UART3"

-Board_UART3 is defined in Board.h

- uart3  is in EK_TM4C123GXL.h:

In EK_TM4C123GXL.C I have the following changes. Anything related to uart0 has been changed to uart3, along configuration of relevant pins

I believe I have written the necessary changes to have UART3 working. If the steps are correct, I will look into issues other than the code.

  • Hello Pablo,

    The reason for this is because only UART0 is routed through the connections to the LaunchPad USB port and thus connected to your PC.

    You would need to get a UART to USB translator cable and attach that to the pins for UART3 to then connect the UART3 port to your PC. Without the cable, you can only see outputs of UART0 on TeraTerm and other PC terminal software.

  • Hello Ralph,

    I have UART3 TX (pin PC7) and UART3 RX (pin PC6) going to the TX and RX pins of a bluetooth module. In the past I have used  Tera Term to connect to the bluetooth module and send and receive characters wirelessly. I believe that takes care of the possible issue you have brought up.

    However, if the steps shown in the screenshots seems like it should set up UART3 correctly, I will put my attention towards other aspects of my set up.

    Best regards,

    Pablo 

  • Hello,

    If I may - your code shown reveals the proper enabling of 'UART_3' - but we found 'No similar enabling' of MCU's Port 'C!'    (both the Port & Peripheral must be enabled.)

    For your Bluetooth module to attach directly (and safely) to the MCU - the 'blue module' must provide & accept CMOS Voltage Levels!    (0V to 3V3, only)   Is that the case w/your 'blue module?'     (Note that many such modules produce & expect RS232 signal levels - which if not 'voltage limited' (via a standard 'line driver') - will almost certainly 'damage' your MCU.)

    You've made mention of a (past) wireless capability - yet that's (completely) unexplained here - thus confounding/complicating my (and others) 'Attempt to Assist.'

    Tag: UART_3 (cmos) signal levels when 'attached' to the (undescribed) 'outside world!'

  • Hello Pablo,

    Thanks for clearing up my misunderstanding on your setup with the module, it is clear now. I am going to pass this over to the TI-RTOS experts to check the UART3 setup now that I understand your system setup better.

  • Which version of the SDK are you using?

    When you halt the processor while the application is failing, where is the PC?

    Are you using CCS to debug this? If so, is ROV working for you? If so, is there an exception active in the Hwi exception view?

    Alan

  • Hello Alan,

    I am currently using CCS 9.1.0

    The example I have tinkered with uses:

    XDCtools 3.32.06_core

    TIRTOS 2.16.0.08 for TivaC

    I do have access to ROV. Under Hwi-> Exception shows "No data to display"

     have posted a zip file with the project. In case anyone wishes further information. It should be very familiar to those who have ran the uartecho example.

    uartecho_EK_TM4C123GXL_TI.zip

    Pablo

  • Thank you.

    When you halt the CPU, where is the PC?

    Alan

  • I imported your project and ran the .out.

    I noticed the line that constructs the task that opens the UART is commented out:

    // Task_construct(&task0Struct, (Task_FuncPtr)echoFxn, &taskParams, NULL);

    If the task who's task function is 'echoFxn' doesn't run, nothing will happen.

    Perhaps you posted the projected while it was in a transient state?

    Alan

  • When I halt, the PC has a value of 0x00006756

    Pablo

  • My apologies, I forgot to un-comment that line.

    I  have found the source of the problem however.

    UART_read(uart, &input, 1);

    is not returning upon being called.

    Pablo

  • Pablo,

    I rebuilt and ran your application with that line restored.

    I attached a USB to serial adapter to my PC and connected the TX and RX pins to PC6 and PC7.

    The echo example behaved properly for me. Each character that I typed was echoed back to me.

    Alan

  • Alan,

    Alright, this means there's something wrong on my end in regards to hardware, such as the bluetooth module I'm using, or my wiring, or something else. I am glad that it's working on your end, which means I can put my attention somewhere other than my code.

    Your post is most helpful

    Thank you,

    Pablo

  • I would like to add simply for those who stumble upon a similar issue.

    I got my hands on a USB-to-serial adapter and the code worked. Characters where indeed being echoed while using UART3.

    I went back to a non-rtos application that made use of a bluesmirf bluetooth module and UART3 and noticed the baud rate was at 115200.

    I had not remembered that the module was designed to only operate at only a baud rate of 115200.

    Now the project works while making use of the bluetooth module.