Jump to content
  • 0

Enabling Printf functionality(using UARTLite) for testing the microblaze image of our designed I2C IP on zedboard.


Praful Mulik

Question

We are trying to test our I2C IP (microblaze image) on zedboard, for debugging purpose we want to enable the printf fuctionality so we integrated Xilinx Uartlite in microblaze design but when we run the sdk software code the content of printf is not getting printed, it is printing some vague characters(WE tried to print "Hello World" via sdk code). The baud rate of UArtlite is set to 9600. We verified if signal is coming on UARTLITE txd pin using ILA . The clock and reset coming to the microblaze design is coming from the  RCC in the CPUSS. The board clock is coming to RCC , the I2C and UARTLITE signals are ported on the board pins . Can anyone help me resolving the issue  ?  

image.png

i2c.png

image.png

Edited by Praful Mulik
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Oh I think I know what your problem is, on ZYNQ boards the USB/serial IC is hardwired to the ZYNQ processing system, so I don't think you can do something about it. You'll have to instantiate the zynq PS in your block design if you want serial communication via USB. Or you can pass the data from the uartps inside the zynq ps to your uartlite and then send it forward elsewhere.

image.thumb.png.05fc62c0fdaa442d33695fb10ef3dd33.png

Edited by thinkthinkthink
Link to comment
Share on other sites

  • 0
On 1/4/2022 at 6:09 PM, zygot said:

If you don't want to mess with the ZYNQ you can always use a 3V TTL USB UART cable or breakout board from Adafruit or Sparkfun connected to PMOD pins. They are cheap and worth having around.

Actually we are using TTL USB UART cable, the uartlite txd and rxd pin are connected to Y11 and AA11

WhatsApp Image 2021-12-23 at 12.33.07.jpeg

Link to comment
Share on other sites

  • 0
On 1/7/2022 at 7:24 AM, Praful Mulik said:

Actually we are using TTL USB UART cable, the uartlite txd and rxd pin are connected to Y11 and AA11

In that case, if you are seeing the wrong characters coming out of your UART then I'd suspect a baud rate incompatibility between your MicroBlaze UART Tx and PC application UART Rx. You can measure the baud period from your board on an oscilloscopewith a wide analog bandwidth, not an ILA. This could be due to clocking the baud rate generator.

You shouldn't need a MicroBlaze at all for testing simple HDL designs, especially if your UART is just sending messages like printf statements.

The best place to start with verification is with simulation using a good testbench.

Edited by zygot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...