Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microblaze, EDK and SPARTAN-3E, program download problem !!

Status
Not open for further replies.

matrix1

Junior Member level 1
Joined
Mar 21, 2005
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,453
xgpio_initialize

hi all
i have made a simple program for the SPARTAN-3E starter board from Xilinx to test the Microblaze functionality but when i try to download the program after generating the bit stream it gives me error before download. program is this

#include "xparameters.h"
#include "stdio.h"
#include "xbasic_types.h"
#include "xgpio.h"
#define LED_CHANNEL 1

void delay(void);

int main(void)
{
XGpio GpioOutput;
XStatus Status;
Xuint32 LedLoop;


Status = XGpio_Initialize(&GpioOutput, XPAR_LEDS_8BIT_DEVICE_ID);
if (Status != XST_SUCCESS)
{
return XST_FAILURE;
}
XGpio_SetDataDirection(&GpioOutput, LED_CHANNEL, 0x0);
LedLoop = 0x01;

while(1)
{
XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL, LedLoop);
delay();
XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL, 0x00);
delay();
LedLoop = LedLoop << 1;

if (LedLoop > 0x80)
LedLoop = 0x01;
}


}

void delay(void)
{
int x=0;
int y=0;
for (x=0;x<10000;x++)
for (y=0;y<10000;y++)
;
}
// Ends program

I have also tested another program and on another system as well to ensure the installation and port integrity but in vain. when i connect the USB cable from the board to PC it starts a new hardware Wizard and ends with the Detection of cable as Xilinx XPS platform cable. second program is this from a xilinx documantation

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

//*******************************************************************


int main(void)
{
XGpio Led, Push;
int push_check1, push_check=0;

xil_printf("-- Entering Main() -- \r\n");

XGpio_Initialize(&Led, XPAR_LEDS_4BIT_DEVICE_ID);
XGpio_Initialize(&Push, XPAR_PUSH_BUTTON_5BIT_DEVICE_ID);

XGpio_SetDataDirection(&Led, 1, 0x0);
XGpio_SetDataDirection(&Push, 1, 0xffffffff);

xil_printf("Press Centre PUSH BUTTON to Exit\r\n");
xil_printf("Any other to see corresponding LED turn ON \r\n");

push_check = XGpio_DiscreteRead(&Push, 1);


while(1)
{
push_check = XGpio_DiscreteRead(&Push, 1);

if (push_check1 != push_check)
{
push_check = push_check1;

if (push_check)
xil_printf("Push Buttons status %0x \r\n", push_check1);
}
if (push_check) == 0x10)
break;
XGpio_DiscreteWrite(&Led, 1, push_check);
}

xil_printf("-- Exiting Main() -- \r\n");
return 0;
} // Ends program


But it behave smilarly. please guide me what mistake i have made. i also checked by removing M0 and M2 jumpers on the board for JTAG but no change. thanks for the suggestions.
 

Rainbow00

Junior Member level 3
Joined
Feb 23, 2006
Messages
29
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,504
xgpio_discreteread

hi,

what's the error msg?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top