News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

A baremetal blinking led for ZynqBerry?

Started by ccortiz, January 19, 2017, 11:20:03 AM

Previous topic - Next topic

ccortiz

Hello,

I have some problems accesing GPIO on Zynqberry. I am trying to switch on/off GPIO4 (IO_L1N_T0_34).

On xparameters.h can not see a right definition for GPIOS throught AXI (for 40 pin expansion connector).
I guess I need something like "XPAR_AXI_GPIO_0_DEVICE_ID" definition, but I can not find it.

I tried to use te0726-test_board_noprebuilt-vivado_2016.2-build_07_20160927155803.zip running vivado_create_project_batchmode and design_run_project_batchmode scripts.

I tried with prebuilt version too, but no luck.


Could you provide a basic example for use a GPIO on ZynqBerry?

Thanks

Oleksandr Kiyenko

Hello,

GPIO controller signals in this project is not directly connected to GPIO pins. To connect it you have to set mux in rpi_gpio core.
Please check rpi_gpi Documentation - Product guide

Best regards
Oleksandr Kiyenko

ccortiz

After check "mux_connection_table.pdf" generated from rpi_gpio_v1_0(1.0) in Vivado, I have configured pin mux with this command:

PINMUX_mWriteReg(0x43C00000, 0x16, 0);

base Address: 0x43C00000
offset: 0x16
value: 0 (for GPIO4 as MIO4)

Searching the web, I found a good example to switch on/off some GPIOS in PL and PS:
https://www.xilinx.com/support/answers/51786.html

But trying to adapt the example to ZynqBerry I found that functions needed to change GPIOS in PL are not available in my project.

#include "xgpio.h"
XGpio_DiscreteWrite()

...

My SDS project is made using your testboard hdf, so I guess I am using a right BSP for ZynqBerry board.

If GPIO4 is mapped on IO_L1N_T0_34 (PL) and I do not have functions to work with GPIO's in PL, How should I do to change a simple GPIO in your board?

Really is so dificult to provide a working example?

Thanks

Antti Lukats

Hi

the pin mux connects the EMIO pins to I/O you are trying to use include file for AXI GPIO, this of course can never work.

We have so far not have many requests for LED blinky design issues, most user want to use the FPGA PL for some more advanced features.

If you do not want to use the pinmux, you can remove it completly and wire the IO pin directly to AXI GPIO or EMIO.


JH

Hi,

on attachment you found a picture (vivado_bd) of simple design with EMIO GPIO and AXI GPIO interface.
You can use one of them, like Antti has wrote. Set correct Loc constrains of the IOs with Vivado Floorplanner.
Generate Bitstream and export HDF file to SDK. On SDK, you can try the BSP examples, see second picture (sdk_bsp_example). You must also set the UART to ps7_uart_1 instead of default ps7_uart_0 to get console output.

br
John