How to control GPIO of ARM on Zedboard

6 次查看(过去 30 天)
Hi Paul,
I would like to control the GPIO of ARM on my Zedboard.
I would like to set one/some GPIO to be 1 or 0.
Which function should be called in Matlab? Is there any reference doc online?
Thanks and Best Regards,
Ardeal
  1 个评论
Ardeal Liang
Ardeal Liang 2018-10-31
Hi Paul,
Could you please help to answer the question?
Thanks and Best Regards,
Ardeal

请先登录,再进行评论。

回答(1 个)

Paul
Paul 2018-11-5
There currently is no support for GPIOs on a Zedboard from the ARM.
LEDs and DIP switches are connected to the FPGA, you can assign them to an AXI-Lite port and access the data through the ARM using the HDL workflow advisor. Give a look at the following example to do that: Getting Started with Hardware-Software Co-Design Workflow for Xilinx Zynq Platform.
You can do the same using the Zynq Radio support package if you need to. The following example will help you following this workflow for an SDR application: HW/SW Co-Design Implementation of ADS-B Transmitter/Receiver Using Analog Devices AD9361/AD9364. If you mix it with the example above, you will be able to interact with the LEDs and DIP switches from the ARM.
It looks like you can also assign the Pmod connectors of the ZedBoard in step 1.3 of the HDL workflow advisor, but I have not used them. You can maybe give it a try if these are what you need.
  3 个评论
Paul
Paul 2018-11-5
As mentioned, we are not supporting GPIOs for the ZedBoard from the ARM.
However, you can try to use the "execute" command of the "zynq" object to send remote commands to the target from a MATLAB script.
>> help zynq
Then find how to use the GPIO you need on the board. Some documentation migt help you doing this: Using the GPIO driver from User Space
On the target, you can turn on an LED this way for example:
zynq> echo 1 > /sys/class/leds/ld0\:red/brightness
Ardeal Liang
Ardeal Liang 2018-11-6
Hi Paul,
Many thanks for your reply! It is really a pity that I cannot control GPIO from Matlab remotely.
Best Regards, Ardeal

请先登录,再进行评论。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by