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.

Communication problem between TM4C123 (UART) and SAMD21 Xplained Pro

Other Parts Discussed in Thread: ENERGIA

 Hello,

I have a problem about serial communication between SAMD21 xplained pro and TM4C123.

I want to led toggle when I send "a"  from SAMD21 board to TM4C123 (serial-UART)

Uart rx tx connections are OK. I used example project "USART_QUICK_START_CALLBACK". But failed.

Is there anything that I forget? I need help please. (I read codes in energia, when send "a" from energia serial monitor, blue led on. ).

Regards,

  • You present little diagnostic info for your detectives/helpers.   Quick/obvious questions follow:

    • How have you established that RX/TX connections are ok?   Are level-shifters present on that "x" board.   (none are present on LPad.)
    • Your test revolves around Led toggle.   Is it possible that the UARTs DO exchange data correctly - but your Led toggle fails?
    • Would it not be wiser to connect each board - one at a time - to your PC - and test the UART in that manner.   You must exercise care - as the PC may not accommodate MCU UART native (3V3) signal levels.   (a UART to USB translator may be required)
    • Code would help - none reveals
    • Usual "rookie" mistake is to neglect the creation of a "common" Ground between the 2 boards

  • Oguz KAYA said:
    (I read codes in energia, when send "a" from energia serial monitor, blue led on. ).

    Oguz,

    So you are able to send an 'a' character via a serial console to the TM4C123 board and the LED toggles as expected? Is my understanding correct about this statement?

    If this is the case, it would seem the TM4C side of your project is working and we will not be able to help much with the SAMD21 side. However, doing a quick review of the SAMD21 datasheet I see this note whenever it discusses the UART_TX/RX pins: "1 The SERCOM4 module is shared between EXT1, 2 and 3 UART's, but uses different pins on EXT1 and EXT2/3." Can you double check that you are using the right pins?

    Also, I would double check for the need of level shifters as cb-1 has mentioned and also try hooking the SAMD21 up to the energia/serial console to see if it is even transmitting the right info?

    Finally, have you cross checked your baud rates and serial config to insure they match and checked content of the TM4C123 RX buffer to see what data it is receiving if any at all?

  • Chuck Davenport said:
    So you are able to send an 'a' character via a serial console to the TM4C123 board and the LED toggles as expected?

    I don't believe that to be the case - poster writes (w/inexactness) that the attempt fails!

    Clearly - the best method for poster's success is to "talk" between the PC and ONE Eval Board at a time!   Trying to join two Eval Boards - w/out proving that each one can attach & communicate (by itself) is "wishful thinking" at best - and likely a sure route to failure.

    KISS discarded is (so often) project plagued w/delay, frustration - failure.

    One simple, isolated step at a time (always) proves best...