Jump to content

Recommended Posts

Posted

Hi, I am working with CMOD A7 35T. I need help for working on GPIO. My SDK Software is working well with the onboard LEDs, programmed using the AXI GPIO IP with Microblaze. But when I tried to use a digital IO Pin, it does not work. I verified my software in several ways. The digital IO pin works with a behavioral verilog program, but not with Microblaze and GPIO IP. 

Can you share me any demo program that works with CMOD A7's digital IO ports (port 1-48 excluding the ADC ports) using GPIO IP?   

Posted

You can add (+) another AXI GPIO to your block diagram, similar to how it was done for the button in https://digilent.com/reference/programmable-logic/guides/getting-started-with-ipi. Name the (make) external connection pio instead of btn. Constrain the desired IO pins as pio_tri_io[0]...pio_tri_io[7]. Name the block AXI_GPIO_PIO and finish the build by running block automation. Follow the guide to create the HDL header, generate the bit stream, and export the design wrapper. In your SDK app, add the following, like it was done for the buttons and LEDs. 

#define PIO_ID XPAR_AXI_GPIO_PIO_DEVICE_ID
#define PIO_CHANNEL 1
#define PIO_MASK 0b11111111

cfg_ptr = XGpio_LookupConfig(PIO_ID);
XGpio_CfgInitialize(&pio_device, cfg_ptr, cfg_ptr->BaseAddress);
XGpio_SetDataDirection(&pio_device, PIO_CHANNEL, 0); //output

//update the first eight GPIOs.
XGpio_DiscreteWrite(&pio_device, PIO_CHANNEL, pio_data);

  • 2 weeks later...
Posted

Dear JRys,

Thanks for your prompt response. 

Though I could not succeed with your suggestion, I struggled for a week to find that it was problem with the folder I was working with.

Now its all fine.

Thanks again

 

Ravindra Kumar

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...