The main purpose of lab number 2 is configuration of the Zynq processing system to use UART peripheral to run example Hello World application.
1. Enabling and configuration of a UART peripheral
The Zynq SoC has MIO pins divided into two banks: Bank 0 = MIO0-15 and Bank 1 = MIO16-53. We need to set voltage for these banks to LVCMOS 3.3V. Additionally we need to enable UART1 peripheral and map it to MIO[48:49]. To do that we need to double-click on Zynq PS. On Page called MIO Configuration we could check voltage for Bank 0/1. It should be set for MiniZed board to 3.3 V. On the same page we need to enable UART1 peripheral and set I/O to pins MIO48-49. When you select a Zynq Block Design you should see check indicator on UART1 peripheral which tells that it is properly connected. At the page called PS-PL Configuration you could check baud rate setting for UART1. Below there is print screen from these windows.
2. Configuration of the memory and clocks for Zynq PS
Next step it is configuration of clocks for DDR3 memory and CPU. We will configure the CPU clock to operate at 667 MHz and the memory clock at 533 MHz. Firstly we need to go to the Clock Configuration page and check clocks for input frequency (33 MHz), CPU (666 MHz) and DDR (533 MHz). Because we are not using in this example PL we could disable in fabric clocks FCLK_CLK0. After that we need to disable M AXI GP0 interface present at PS-PL Configuration page. See below images for more details.
Then we need to DDR Configuration page where we need to check memory configuration. It is important to choose proper memory part for MiniZed board: MT41K256M16RE-125. There are entries called DQS which allow to set up a clock delays in ns for each of four byte data lanes. These parameters are specific for each individual PCB design and Zynq package. These values are based on the PCB trace lengths and specific Zynq package chosen. See below images for more details.
3. Building the hardware platform and exporting it to the SDK
At this stage we have properly configured ARM HW, we could export it to the SDK. Firstly we need to check the design by pressing Validate Design button at Diagram window. Then we should select current block design at Design Sources and press right-click and choose option Create HDL Wrapper. When this HDL wrapper will be ready we need to generate bitstream. This option is available from Flow Navigator pane. Then we could export hardware. To do that please select option File->Export->Export Hardware. In the popup please select option Include bitstream and press Ok. After that we could launch SDK: File->Launch SDK.
4. Creation of Hello World application
We need to create a Board Support Package by selecting File->New->Board Support Package. All default settings are fine for this example, we could press Finish. Now we could create a application by choosing: File->New->Application Project. In pop-up please enter project name and set to use existing BSP. Then we could launch given application project on the MiniZed. To do we need to change boot switch to position J and connect board to PC by port J2. Linux automatically detects proper devices ttyUSB0 and ttyUSB1. The device ttyUSB1 will be used for transmission. We could run a minicom with following command: sudo minicom -D /dev/ttyUSB1. To run application we need to choose option Run->Run Configuration where we could select System Debugger for given application and press Run. SDK will download the hello ELF to the DDR3 and the ARM begins executing the code. Below there are screenshots for these steps: