UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie krupalworld
Newbie
4,050 Views
Registered: ‎09-16-2008

XPS Starter Problem..

I am doing sample lab programs using XPS 10.1 . I have selected DCE_UART , LEDs_8bit  and DDR_SDRAM using BSB. Then i added two general purpose IOs "dip" and "push". I connected it with plb bus, set the size. Then i generate address. Then i make port settings for 4 pin and input. Then made the pin external. Changed the TestApp_Memory.c  below one.

#include "xparameters.h"
#include "xgpio.h"
#include "xutil.h"
 


//====================================================

int main (void)
{
 XGpio dip, push;
 int i, psb_check, dip_check;
 
   //xil_printf("-- Start of the Program --\r\n");
 
   XGpio_Initialize(&dip, XPAR_DIP_DEVICE_ID);
 XGpio_SetDataDirection(&dip, 1, 0xffffffff);
 
 XGpio_Initialize(&push, XPAR_PUSH_DEVICE_ID);
 XGpio_SetDataDirection(&push, 1, 0xffffffff);
 
 while (1)
 {
   psb_check = XGpio_DiscreteRead(&push, 1);
   xil_printf("Push Buttons Status %x\r\n", psb_check);
   dip_check = XGpio_DiscreteRead(&dip, 1);
   xil_printf("DIP Switch Status %x\r\n", dip_check);
  
   for (i=0; i<999999; i++);
 }
 
}

 

Then i changed the ucf file. Generated net llist and finally downloaded. But there is no impact  of push button or dip switch.

When I downloaded the download.bit file given from XILINX it is working. I don't know wat is problem with me..

 

 

 

0 Kudos
2 Replies
Visitor ashwinwmich
Visitor
3,076 Views
Registered: ‎10-09-2009

Re: XPS Starter Problem..

Hello krupalworld,

Try deploying the TestApp_Peripheral.c file's bitstream to your board, if that works you will know for sure that the bitstream is being generated properly. This might help you: 

Follow the below given link, select FPGA page at the bottom and perform a page search with the "FPGA EDK: Creating a new MicroBlaze project using XPS BSB and deploying it on the XUPV2P development board"as the search criteria.  http://www.afflatustechtronics.org/tutorials/basics.html

 

While you are there also search for "FPGA EDK: Using the Xilinx Platform Studio SDK", it may be of some help to you.

-------------------------------------------------
May I suggest you to look into my home page for Projects, Tutorials and FAQs on microcontrollers (8051, AVR, Freescale CPU12, MSP430), FPGAs and Software Development with downloadable source codes and pdf documents?
Home page:http://www.afflatustechtronics.org
Project List: http://www.afflatustechtronics.org/projects/projectlist.html
Resources: http://www.afflatustechtronics.org/resources
Tutorials: http://www.afflatustechtronics.org/tutorials.html
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
3,060 Views
Registered: ‎08-07-2007

Re: XPS Starter Problem..

The C code looks all right.

 

Two things to check:

1. Check if the application has been downloaded and run properly. You can debug the application with XMD.

2. Check if the gpio pins are locked at the right location.

0 Kudos