Lab3: using UART

Lab3: using UART

by Ahmed Kooli -
Number of replies: 3

Hello,

We managed to use printf with the JTAG UART but not with the UART. We tried to connect the cable UART to USB to a second computer on which we use PuTTY to detect the serial port (which is detected) but no message is printed on the terminal. 

We think that the problem might come from the pin assignment. We thus added in the TCL script a pin assignment to hps_uart_rx and hps_uart_tx (since there wasn't any) similarly to the following github. However, there still is an error in quartus saying that the pins were already assigned.

Do we really need to modify the TCL script or is there another way to use the UART? 

Thank you for your help.

Tags:
In reply to Ahmed Kooli

Re: Lab3: using UART

by Isaac Bernardino Dinis -

Hi,

Are you using the hardware processor? I think the HPS pins are not accessible for the NIOS II.

You can drive the uart signals to standard GPIO's and then use some external tool to interpret the signal.



In reply to Isaac Bernardino Dinis

Re: Lab3: using UART

by Basile Maurice Pierre Spaenlehauer -

Hi Ahmed,

We were also stuck on this part as we thought we could use the existing UART-USB port to read from a computer.

As Isaac suggested you can just link the RX ant TX signals to GPIO's and then connect your logic analyser to look at the signals.

Here is a guide that i successfully followed to read the UART Protocol using the Saleae 16 Pro logic Analyser : https://support.saleae.com/tutorials/example-projects/how-to-analyze-uart

And also as a note : the signal on which you should see your signal when printing from the NIOS2 is the TX line (we got confused and did never get a falling edge as we were first triggering on RX ...)

Hope it helps !

Tags: