Zynq-7000 AP SoC - Protocol Communication Between a Host PC and ZC702 Board Tech Tip
Zynq-7000 AP SoC - Protocol Communication Between a Host PC and ZC702 Board Tech Tip
Table of Contents
Communication Protocol through UART
Power Demo GUI output response structure and details
Document History
Date | Version | Author | Description of Revisions |
27 May 2014 | 0.0 | Prush | Initial Version |
11 June, 2014 | 0.1 | Upender | Added Command and response structures |
|
|
|
|---|
Introduction
The host machine communicates with the application running on ZC702 board through UART channel. The GUI running on the target machine sends appropriate commands to the target application based on the user selection. For the GUI to successfully send command and receive a response a simple protocol is designed in the power demo setup. This Techtip explains this protocol that is used for command and response.
Block Diagram
This design example uses the UART protocol to communicate data between the GUI on host PC and Zynq-7000 AP SoC. The GUI example reference design will have the following components
1. On Windows Visual C# GUI
a. Display the UART ports available on the host PC,
b. Two text boxes
i. one for the input from the user and
ii. display the processed data from the Zynq-7000 AP SoC of the user input
2. Application running on Zynq-7000 AP SoC
a. Receives the input string from user through the GUI
b. Reserves the input string and sends back the reversed sting to the GUI
When user initiates the UART connection by selecting the corresponding UART port, GUI will enable the input text box for the user inputs. The user inputs will be transferred to the Zynq-7000 AP SoC and will be processed (reversed) and sends back the processed data back to the GUI through the UART port.
Figure1: GUI example block diagram
Communication Protocol through UART
The command packet starts with “SOC” delimiter, short for Start Of Command and ends with “EOC” delimiter short for End of Command. The data between SOC and EOC is the actual command that the application will look for.
S | O | C | X | X | X | E | O | C |
After executing the command received from the HOST, the UART application will send out the response in the following two formats. The format of the response when there is an error message is as mentioned below.
E | R | R | ANY | STR | ING | … | E | O | R |