MicroZed Chronicles: Ultra96 & the Click Mezzanine

I use my Ultra96 a lot, for Hackster.IO projects, blogs and client prototyping if they are targeting a Xilinx MPSoC. I was therefore very…

Adam Taylor
4 years ago

I use my Ultra96 a lot, for Hackster projects, blogs, and client prototyping if they are targeting a Xilinx MPSoC. I was therefore very happy to see the recent release of the Click Mezzanine which connects to the Ultra96 low speed connector and provides two MikroBUS sites.

If you are unfamiliar with the MikroElectronica MikroBus it consists of pair of 1×8 headers (female on the socket) which supports a number of commonly used embedded system interfaces. This include SPI, I2C, UART, analog input, PWM output, interrupt and support for both 3v3 and 5v operation.

Into each MikroBUS site we can connect any one of the 657 different click boards which range from a simple UART all the way to SD card, wireless networking, and motor control. There is a vast range to chose from — to get started I opted for the Click Mezzanine Starter Kit which comes with the following:

  • 6 degree-of-freedom inertial measurement (LSM6DSL)
  • 2x16 LCD character display

In the remainder of this blog, we are going to take a look at how we can get the USB to UART Click up and running. This is an important Click as it provides us UART functionality if we do not have the USB to JTAG/UART Pod. (Although you can see from my images that I do have a USB to JTAG/USB pod.)

The first thing we need to do is create a new Vivado project targeting the Ultra96.

Once the project is created, we have to consider the UART configuration of the Ultra96. The Ultra96 UART configuration is interesting, as both the processor system UARTs are used in the design. PS UART0 is connected to the combined WiFI-BlueTooth, while PS UART 1 is connected for use with the USB to JTAG/UART pod.

This leaves us two choices when working with the Click USB I2C Click:

  • Redirect the PS UART One pins to EMIO and route to the low speed connector — very simple to do, just select EMIO from the PS UART1 pin allocation in the MPSoC re-customize dialog.
  • Implement a AXI UART Lite in the programmable logic.

The decision between the two options really depends upon your design requirements. For this example, we are going to add in a AXI UART Lite as it is the more complex of the two approaches.

In the block diagram, add in the MPSoC processing system and run the block automation to ensure the Processing System (PS) is configured correctly for the Ultra96.

With that completed the next step is to add in the AXI Uartlite IP core.

To connect the AXI UartLite with the MPSoC ,we can run the connection automation wizard. This will connect the AXI UartLite to the MPSoC memory architecture and also connect the necessary clocks and resets.

As we want to be able route the AXI UartLite Tx and Rx pins to the low speed connector. When we run the automation wizard, we connect both the AXI interface and the external UART pins.

The completed block diagram for this reference design looks as below.

The final element is to set the external pins for the TX and RX pins, for this example we want to use pins 13 (RX) and 11 (TX) on the low speed connector. As the MPSoC IO is set to 1v8 LVCMOS the Click Mezzanine provides translation between the 1v8 of the MPSoC IO and 3v3 required by the Click boards.

For clarity, the RX pin is an input at the MPSoC and the TX pin is an output at the MPSoC.

Once the bit stream has been generated, we can export the HDF (with bitstream) to SDK and create a new application project. Ensure this new project is set to create a new board support package (BSP) as well.

For this application, we can use the Hello_World example provided by SDK.

To be able to use the AXI UART easily in our design, we need to reconfigure the BSP to use the AXI UartLite for STDIN/STDOUT communication.

Once this was configured, we can rebuild the application and download it to the Ultra96 using either the USB-JTAG POD or by creating a first stage boot loader and running from a SD card.

As you can see getting the Click USB I2C/UART up and running is pretty easy, and provides UART functionality for the Ultra96. Note that, unless you change the baud rate in Vivado, it will be by default 9600.

Overall, I am impressed with the Click Mezzanine as it provides a range of modules we can interface easily with the Ultra96. As it uses SPI, I2C, UART interfaces we can easily interface with these using both bare metal and Linux applications.

I will be looking at and using more of the Click boards in future blogs and Hackster projects going forward.

See My FPGA / SoC Projects: Adam Taylor on Hackster.io

Get the Code: ATaylorCEngFIET (Adam Taylor)

Access the MicroZed Chronicles Archives with over 290 articles on the Zynq / Zynq MpSoC updated weekly at MicroZed Chronicles.

Adam Taylor
Adam Taylor is an expert in design and development of embedded systems and FPGA’s for several end applications (Space, Defense, Automotive)
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles