Jump to content

Edocecrous

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Edocecrous

  1. It might help someone, so i note that if the leds and buttons are connected to separate GPIO blocks, then Vitis generates the correct code for both. Based on the help above i managed to make it work from one dual GPIO.
  2. Hi, On my Arty A7 board i have the hello world running with Microblaze and UART. I added from the board tab the 4 buttons then i added the 4 LEDs. I'm using 2020.1, and by default it combined the AXI GPIO so there is a dual channel GPIO where both the leds and the buttons are connected. My problem is, that in Vitis the generated IO example code uses the same port, and only the buttons work... the device gets configured as such in the code: #define GPIO_OUTPUT_DEVICE_ID XPAR_GPIO_0_DEVICE_ID #define GPIO_INPUT_DEVICE_ID XPAR_GPIO_0_DEVICE_ID In xparameters.h i found this: /* Definitions for driver GPIO */ #define XPAR_XGPIO_NUM_INSTANCES 1 /* Definitions for peripheral AXI_GPIO_0 */ #define XPAR_AXI_GPIO_0_BASEADDR 0x40000000 #define XPAR_AXI_GPIO_0_HIGHADDR 0x4000FFFF #define XPAR_AXI_GPIO_0_DEVICE_ID 0 #define XPAR_AXI_GPIO_0_INTERRUPT_PRESENT 0 #define XPAR_AXI_GPIO_0_IS_DUAL 1 /* Canonical definitions for peripheral AXI_GPIO_0 */ #define XPAR_GPIO_0_BASEADDR 0x40000000 #define XPAR_GPIO_0_HIGHADDR 0x4000FFFF #define XPAR_GPIO_0_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID #define XPAR_GPIO_0_INTERRUPT_PRESENT 0 #define XPAR_GPIO_0_IS_DUAL 1 The wizard creates two functions: GpioOutputExample( GPIO_OUTPUT_DEVICE_ID, GPIO_BITWIDTH); GpioInputExample(XPAR_AXI_GPIO_0_DEVICE_ID, &DataRead); input example works (buttons), but output does not (leds) Any help is appreciated! Csaba
×
×
  • Create New...