Hello.
I use ADRV9361Z7035 board on ADRV1CRR-FMC carrierboard.
In Vivado i built the project from github source files as shown here.
First, I want to blink the LEDs 0-3 on Carrierboard.
There are not all ports initialized in "Block design", but in XDC file all ports are initialized. "Ok"- say me, after I created the Port "gpio_bd" as shown in XDC-file, made bitstream and download to ADRVboard with JTAG-emulator.
In SDK, I add code to blink LEDs
#define LED_DELAY 100000 #define LED_STATE 0x00000000 //HERE WAS CODE FROM GITHUB TO INITIALIZE AD9361 /////////////////user code in main: XGpio leds_on_board; int ledStatus; volatile int Delay; volatile int led_state = LED_STATE; /* Initialize the GPIO driver */ ledStatus = XGpio_Initialize(&leds_on_board, XPAR_AXI_GPIO_LEDS_DEVICE_ID); // look xparameters.h //define XPAR_GPIO_0_DEVICE_ID XPAR_AXI_GPIO_LEDS_DEVICE_ID if (ledStatus != XST_SUCCESS) { xil_printf("LEDS_Gpio Initialization Failed\r\n"); return XST_FAILURE; } XGpio_SetDataDirection(&leds_on_board, 1, 0x00); //XGpio_SetDataDirection(&Gpio, LED_CHANNEL, ~LED); while (1) { /* Set the LED to High */ XGpio_DiscreteWrite(&leds_on_board, 1,led_state); /* Wait a small amount of time so the LED is visible */ for (Delay = 0; Delay < LED_DELAY; Delay++); led_state ^= 0x00f0; //XGpio_DiscreteWrite(&leds_on_board, 0,led_state); /* Clear the LED bit */ XGpio_DiscreteWrite(&leds_on_board, 1,led_state); for (Delay = 0; Delay < LED_DELAY; Delay++); /* Wait a small amount of time so the LED is visible */ //for (Delay = 0; Delay < LED_DELAY; Delay++); } ///////////
Compile, linking and so on was successful, but the leds dont blink.
I check the states of "gpio_bd" bus with IP ILA. In ILA ports are changing the state from 0 to 1.
What do you think about my trouble?
Sorry for bad english, Petra.
In XDC was that.
Hi,What git branch are you working on?All the gpio_bd ports are connected in the reference design https://github.com/analogdevicesinc/hdl/blob/hdl_2018_r1/projects/adrv9361z7035/ccfmc_lvds/system_top.v#L232-L236.It is not clear to me, have you modified the HDL?
Andrei
Thank you for your response.
andrei_g said:What git branch are you working on?
I use "hdl_2018_r2" branch.
There are correct port declaration in my system_top.v
andrei_g said:have you modified the HDL?
Аt first I did not change the project. I realized that the project is not working. After, I added the port "gpio_bd" in Vivado Block_Design. Also I added IP ILA for checking the states of GPIO_BD bus.
Hi Petra,I think you are missing the fact that the gpio_bd are already connected to the ZYNQ(ps7 gpio_x[20:0]).Take another look at the Block Design (gpio_t[63:0], gpio_i[63:0], gpio_o[63:0]).You can control the LEDs form software (reference design)Are you using no-OS or Linux?Andrei
andrei_g said:Are you using no-OS or Linux?
no_os