cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
8,118 Views
Registered: ‎04-24-2015

How to set a value of a signal from AXI GPIO

Hello,

I have used AXI GPIO , DMA and custom Ip in vivado design. In my IP, i used a

     signal size:unsigned (7 downto 0);

    and connect that signal with GPIO_O port (set as output).  Now from Sdk, i want to set the value of that signal through AXI GPIO . and written a code like that :
 

  u32 *GPIO;
  

  GPIO= (u32 *)XPAR_AXI_GPIO_0_BASEADDR;

    Xil_Out32 ( XPAR_AXI_GPIO_0_BASEADDR , 8 );
       for (Index = 0; Index < 4; Index++) {

        xil_printf( "GPIO  %x \r\n", GPIO[Index]); }

but  i see the output everytime  as : 0, FF, 0, 0

 

 so it just show me the direction of GPIO, not the value. How to see the value and set it ? Is it a right method ?
Kindly clear my confusion.

 

 Thanks

 Regards

 

0 Kudos
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
8,098 Views
Registered: ‎08-02-2007

hi,

 

an easier way to do this is to look at an example for one of the development boards with GPIO configured as output{LED}

 

http://www.xilinx.com/support/documentation/boards_and_kits/kc705/2014_3/xtp195-kc705-bist-c-2014-3.pdf

 

refer to LED test and the source code of it.

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos