Jump to content
  • 0

Zybo Z7 UART works for one example project but not for another


MichaelZ

Question

Hello,

I am new to developing on Zybo board...

The first project I programmed was the example "getting started" project, which works as expected outputting some strings through UART (see attached screenshot).

Encouraged by this "great success" , I have programmed another example "hdmi out" project, but faced difficulties to use the same UART port.

The output of the UART port are unappropriated characters (see attached screenshot of outputting "***"), although I'm using the same TeraTerm session for both projects.

Inspecting the hardware (PS settings) and the SW (debugging the xil_printf function) showed no difference between the working example and the failing one.

I also checked with ChipScope the UART1_TX signal (see attached), which is normal and equal for all the three outputted "*" signs (Ascii 0x2A), although the output on TeraTerm is 3 unappropriated and non-equal signs.

I've tried to install the most updated CP210x / CDM drivers - no change.

What can go wrong with one example project but not with the other?

Please help

 

ChipScope.PNG

TeraTerm_FAILED.PNG

TeraTerm_GOOD.PNG

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hi @MichaelZ,

Did you try restarting the Tera Term session? I usually find that I need to start a fresh Tera Term session when starting an HDMI project where I restart Tera Term, and then launch the application project on hardware. I am uncertain of why this happens specifically with the HDMI project and not the other way around, but I confirm that I replicated your issue and found that this method works.

Let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

@MIchaelZ,

I own an Arty A7 and a Zybo Z7. It's been awhile since I pulled out the Zybo Z7; but I'll mention a few tips.

Every UART configuration has a baud rate. I don't know what the defaults are; but you should consider picking a baud rate and double-checking that your IPI-BD system is configured for that baud rate prior to synthesis. Note that the UART function may allow you to select a baud rate higher than 115200; but 115200 is the typical maximum baud rate for UART functionality as it is the common maximum baud rate for modem speeds dating back in history. Whenever I create a design, I always check the baud rate is configured to 115200 baud before synthesizing and downloading. If you connect to a terminal with a different baud rate than what the embedded system is using, you will see either no characters displayed or unreadable text displayed on your terminal session.

Additionally, the Arty A7 has an usual behavior when connecting a terminal to the UART. If I use the Linux program screen to connect to the USB-UART tty, the Arty A7 may perform a soft reset (without deconfiguring the implementation bitstream) and start again at the beginning of execution. This soft reset does deconfigure the Microblaze soft CPU; but does not deconfigure (only soft reset) a plain RTL design. Either way; I mention this as the solution is to attach your USB to the Linux box and then connect the terminal before programming the bitstream via the USB JTAG. In that way, the terminal does not interfere with the FPGA configuration state. There may not be a solution for a booting from a bitstream that is programmed to the SPI Program Flash and then connecting the terminal. Another thought is that TeraTerm on Windows might not cause this incorrect behavior.

Thanks,

Tim S.

Link to comment
Share on other sites

Thank you for your response, guys!

Unfortunately I still facing the same problem...

@ Jcolvin

I tried to close and open a fresh Tera Term connection several times, while I am proceeding with xil_printf commands in the debugger.

Each time got unreadable characters only (please see attached).

@Tim S

This is a Zynq PS UART, which configured from the bsp (as far as I understand it).

Since I found no baud rate configuration in the application sw, I assume the bsp default configurations are used - 115200 (please see attached).

Regarding the "soft reset issue", I guess that since I'm going step by step in the debugger, the output to the UART happens long after any possible FPGA re-configuration state.

 

I found in the Device Manager a complaint regarding the USB-UART port. (attached)

I'm using the most updated drivers...

Also the same error reported in "getting started" example, which has normal output to the Tera Term.

 

I will be grateful for any others suggestions.

 

Unknown_Device.PNG

Fresh_TeraTerm.PNG

Uart_BAUDRATE.PNG

Link to comment
Share on other sites

Hi @MichaelZ,

I have a Zybo Z7 design I made from last year. I assume it is in working condition still. What I'd like to show you is where you can double-check the baud rate of the PS UART1 that connects to the USB port.

In the Vivado block design, check for Interface Ports connectivity on the ZYNQ7 Processing System:

245711521_Screenshotfrom2020-07-2519-26-23.png.247eb7a9a980aca67366a16f7a63d90e.png

In the Vivado block design, Customize Block... for the ZYNQ7 Processing System:

690511262_Screenshotfrom2020-07-2519-22-00.thumb.png.2901cdf6aa7bdeead4eda56c6d67dac9.png

Examine the UART1 Baud Rate in the General PS-PL panel:

512849863_Screenshotfrom2020-07-2519-19-30.thumb.png.eea27b74b33cd4969ad34053c9e7817e.png

In the ZYNQ7 Processing System's MIO panel, check which pins the UART1 is connected to:

525423105_Screenshotfrom2020-07-2519-20-24.thumb.png.637215b06d208d7560ca5bd4d1c79df1.png

 

Again, this is from a working example with Vivado / SDK 2019.1 . But I have not checked its working state since 2019.

Regards,

Tim S.

 

Link to comment
Share on other sites

@Tim S,

Thank you for this clarification!

Checked it now, but it is all as in the screenshots you have attached.

Baud Rate 115200

MIO Pins: MIO48 for TX

MIO 49 for RX.

Yet does not work at my site...

Thank you anyway!

Link to comment
Share on other sites

@MichaelZ,

A few more tips on TeraTerm on Windows 10.

Check that the COM port used by the Zybo Z7 is without warnings and that you are using the correct COM number, such as COM1, COM4, etc.

998910050_Annotation2020-07-26123031.thumb.png.d8affd5f34f2493cb299a2705f56879b.png

Then configure your TeraTerm session to select the correct COM Port with the settings set in the ZYNQ7 Processing System IP.

1944266364_Annotation2020-07-26123135.png.fbc788221be5f32835cdf5a526aaae69.png

570659253_Annotation2020-07-26123205.png.4c6cbe47806ff7bc3303233e0b55f75c.png

While the connection is Live, you may need to reset the terminal so that the behavior instructed by those non-printable characters is reset and you start with a fresh terminal.

Reset the terminal:

618671402_Annotation2020-07-26123234.png.a84a1147a0762577855e0877f438f648.png

Clear the buffer:

1692758551_Annotation2020-07-26123259.png.0c20b9200aa23058bf3d6efbacfcef9e.png

If you find that the new settings work, you can save them as defaults when TeraTerm first runs.

1182865542_Annotation2020-07-26123836.png.99b2df796f15bd11008883e086b42518.png

1738971580_Annotation2020-07-26123900.png.f9e1b2b0d36572a998e3be42a5ee91cc.png

 

Regards,

Tim S.

 

Link to comment
Share on other sites

If all of this still fails, you can try rebooting the computer and plugging into a different USB port on the PC; and powering the Zybo Z7 from a wall jack power supply instead of the USB port. Beyond that, I have no more advice. Best of luck! Tim S.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...