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.

Problem with starterware Beaglebone Uartecho example

Hello,

I have several questions about the starterware Uartecho example for Beaglebone board.

1) The example uses the UART0, however, UART0 is not connected externally where a jumper can be placed. Do we need to do extra work to connect UART0 tx to the UART0 rx?

2) I am debugging the example by stepping into it and I notice that the FCR value at mode A and the operational node are not successfully written. it fails to write the FCR register value in the UARTFIFOConfig function in the uart_irda_cir.c (driver file) when I set a break point on the UartFIFOConfigure() function in the uartecho.c file.   The fcrvalue is 0x57, however, in the memory address it displays 0xC1 after being written. 

3) In the interrupt service routine part, the rx only receives the last character "." in the end, because it only triggers interrupt once at the end. In the ISR, the FCR/IIR value is always C2, does this mean the RX FIFO is always being reset?

Thanks a lot!!!

  • Hello Hong,

    I would like to answer to each of your questions.

    1) There is no need to do any work to use UART0. The Mini-USB port present in the Beaglebone provides multiple interfaces. It acts as a power supply, a debugging interface and as a UART0 port interface. Therefore connect the Mini USB data cable to the Mini-USB port ‘P3’ and run the UART example.

    2) The FCR and IIR registers shares the same offset address of 0x8. However FCR is write-only and IIR is read-only. Therefore the data that is seen in the memory window of CCS is the value in IIR. However the data that is written to the FCR would be written to it. Let there be no doubt about it.

    3) I could not understand your third question clearly. I request you to elaborate on it.

    Please revert if you have any comments.

    Thanks and Regards.

    Gurudutt.

  • Gurudutt Bharadwaj said:

    Hello Hong,

    I would like to answer to each of your questions.

    1) There is no need to do any work to use UART0. The Mini-USB port present in the Beaglebone provides multiple interfaces. It acts as a power supply, a debugging interface and as a UART0 port interface. Therefore connect the Mini USB data cable to the Mini-USB port ‘P3’ and run the UART example.

    hi Gurudutt.  i am also having trouble with uartecho. 
    i have the beaglebone black.  i am under the impression that uart0 is on connector J1.  no?   i prefer routing uart0 thru the usb port.  how do i do that (in windows)?  or where is that documented?

    thanks..................dd

  • You are correct, on Beaglebone Black uart0 is on J1. You need to get a FTDI calbe to use it. Or, there is a RS232 cape Rev B that can route uart0 to the standard 9 pin connector. I have one of those capes but have not tested it yet.

    Steve K.

  • hi Steve.  ok, i have that ftdi cable, i know it works cuz i have been using it on the raspberry pi.  my terminal emulator sees it as com4 and when i connect, i receive several nulls.  and that is it.  i connect to pins 1, 4 & 5.  i must be doing something wrong.  any suggestions?

    thanks.............dd

  • For BBB you need a 3.3V UART cable. Don't know what the one for the Pi is but the standard 5V cables will not work (and probably damage the UART on your BBB).

  • no, the pi uart is 3.3v. 

  • When it is wired according to http://elinux.org/Beagleboard:BeagleBone_Black_Accessories#Serial_Debug_Cables and when you are using the serial settings as described there, it should work. In case not, there is something damaged.

  • hi.  good news.  i booted linux with the ftdi cable and could not see the console.  i then swapped the Tx & Rx lines and the console came up ok and i could log in.  this proves the uart & ftdi cable are ok.  now the uartecho example works!  the Tx & Rx lines should go straight thru, not crossed (my usual habit). 

    so, thanks.  and it is very encouraging that the starterware baremetal stuff is working as advertised. 

    good work ti!

  • hi Hans.  u r right.  Tx & Rx r crossed on the board, as shown it the link u provided.  thx...............dd