Zynq with no driver problem with Pmod development solution

Previously we mentioned "P, a tool for rapid prototyping system development with FPGA development boards. In fact, in addition to the patents of the Pmod standard definition interface - Digilent, which provides nearly 100 kinds of feature-rich original Pmod transmissions Outside the sensor module (generally equipped with a free ip driver for developers to call directly), there are many Pmod modules available from different vendors on the market.

Goose, many Pmods from unknown small factories (mostly cottage manufacturers in Taiwan and Shenzhen) often do not provide module drivers, and users need to write drivers to fill the pits. If you are unfortunate enough to take the opportunity to talk about comfort, today I will teach you a trick to fill the pit and teach you how to deal with the situation without a driver available.

Just one trick, Zynq is developed with Pmod, no driver is not afraid

Let me focus first: If there is no driver available, you can use the Zynq SoC PL (programmable logic) Pmod bridge module, which allows us to establish the correct mapping between the selected development board and the Pmod port, and then develop our own Zynq PS (Processing System) driver. If you look closely at the Pmod drivers provided by regular vendors, you will find that these drivers are actually implemented using the Pmod bridge plus an AXI I2C or SPI component.

Figure: Digilent PmodAD2: Driver component for a 12-bit four-channel analog-to-digital converter

Figure: Digilent PmodAD2: Driver component for a 12-bit four-channel analog-to-digital converter

In this article, we will take the Digilent PmodDA4: 8-channel DAC module and the PmodAD2: 4-channel ADC module as an example. We will integrate these two modules and develop the driver ourselves with the Pmod bridge module, using PmodDA4. Generate an analog signal and use PmodAD2 to receive the signal.

Figure: Testing the PmodDA4 with the Digilent Analog Discovery pocket instrument

Figure: Testing the PmodDA4 with the Digilent Analog Discovery pocket instrument

The Pmod Bridge module allows us to define the input type of the upper and lower rows of the Pmod interface on the development board. It can be selected as GPIO, UART, I2C or SPI protocol interface. We select and configure the upper and lower layers of the onboard Pmod interface for the required driver, so that the pinout of the Pmod sensor is consistent with the corresponding onboard interface standard.

For PmodDA4, we only need to use the SPI protocol on top of the onboard Pmod interface. With this choice, we need to provide the actual SPI communication channel. Since we are using the Zynq SoC development board (Digilent Arty Z7), we have two options here. The first method is to establish a connection with the Pmod bridge module using the AXI SPI IP module on the PL side. The second method (which we will use here) is to use EMIO to establish a connection between the Zynq PS SPI and the Pmod bridge. This approach will allow us to establish a direct connection between the PS SPI port and the Pmod bridge module input pins.

To do this we need to read the official Pmod interface standard documentation to ensure proper mapping between the SPI pins and the Pmod bridge input pins (eg which PS SPI signal is connected to IN_0). The pins of the Pmod bridge module represent different interface types, and their naming is also common. The block diagram below shows how we can implement the PmodDA4 pin mapping here. In this example, we can build the project after completing the pin mapping, export to the SDK, and write the software program to drive DA4.

Just one trick, Zynq is developed with Pmod, no driver is not afraid

We can use the SPI driver created by the BSP in the SDK to drive the PmodDA4. In order to interact with PmodDA4, the first thing we have to do is initialize the SPI controller. Once we have set the SPI clock phase and main operating options, we can define the buffer and use the polling transfer mode to pass the required information to PmodDA4. More complex drivers will use interrupt-driven rather than polling.

Just one trick, Zynq is developed with Pmod, no driver is not afraid

Below, we tested the created PmodDA4 driver file. We drive a simple harmonic output and use the oscilloscope function of the Digilent Analog Discovery pocket instrument to monitor the DAC output. The received signals are as follows:

Just one trick, Zynq is developed with Pmod, no driver is not afraid

After completing all the settings PmodDA4 works as expected, then we connect PmodDA4 with PmodAD2 so that the Zynq SoC can receive the signal:

Just one trick, Zynq is developed with Pmod, no driver is not afraid

We have to be very careful during the test to ensure that the PmodDA4 output signal is within the working range of PmodAD2. When completed, PmodDA4 will work properly on the hardware.

At this point, I believe you have already learned how to create a Pmod driver yourself without an available driver. Of course, filling the pit is often a last resort, life is too short, Fanghua is limited, as far as possible to touch the small cottage Pmod is the king.

Smart Watch

16+ Years Experience Smart Watch manufacturer, ITOPNOO Provide One-stop Smart Wearable devices Solutions For You.


Our Smart Wearable products include android smart watches, Watch For iPhone, Bracelet and Wristband etc.

Leading healthcare navigation services for individuals and families who are generally healthy or face serious medical issues, and health services for employers.

The Trends New Watches Designs. Custom smart watch products designed with the vision of our clients' brands in mind.





Wholesale smart watches,Best Smart Watches,Gifts Wholesalers, smart watch manufacturer

TOPNOTCH INTERNATIONAL GROUP LIMITED , https://www.micbluetooth.com

This entry was posted in on