Z-turn-Board-V2-Diary

Assuming Hellow World

Part 1: LEDs w/ PL(CLK)


GPIO(test)

There is a list of drivers for linux. As per the gpio driver, let’s test the:

Let’s identify the GPIOChip:
Looking at /sys/class/gpio:

root@spyros:~# cd /sys/class/gpio/
root@spyros:/sys/class/gpio# grep . */*
gpiochip1022/base:1022
gpiochip1022/label:41210000.gpio
gpiochip1022/ngpio:1
gpiochip1023/base:1023
gpiochip1023/label:41200000.gpio
gpiochip1023/ngpio:1
gpiochip904/base:904
gpiochip904/label:zynq_gpio
gpiochip904/ngpio:118

Apparently, gpiochip904 will contain the PS(GPIO). As per the driver:

Thus, our PS(GPIO) pins are from 904 + 0 to 904 + 118.
[From previous chapters], We need MIO(0, 9 and 50):
Export the pins: Fix the directions:

(The remaining 1022/1023 gpios are AXI(button in) and AXI(CLK out). They both work).


Crude notes

DMA:

troubleshooting


Interrupt from PL(downscaled CLK)

Let’s try to handle AXI(CLK out) as an interrupt.


Next: Part 2: PS(BUTTON) 2 PL


Referencies