Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎11-17-2009

ML505 Problem

Hello ,

I've created a Bsb Project to light on the LEDS with a DIP input in XPS 11.1
here is the c source code 


#include "xparameters.h"#include "xbasic_types.h"#include "xgpio.h"#include "xstatus.h"XGpio GpioOutput;XGpio GpioInput;int main (void) { Xuint32 status; Xuint32 DataRead; Xuint32 OldData; // Clear the screen xil_printf("%c[2J",27); // Initialisation du Driver GPIO pour Leds status = XGpio_Initialize(&GpioOutput, XPAR_LEDS_8BIT_DEVICE_ID); if (status != XST_SUCCESS) return XST_FAILURE; // Configuration de sortie des leds XGpio_SetDataDirection(&GpioOutput, 1, 0x0); // Initialisation du Driver GPIO pour DIP status = XGpio_Initialize(&GpioInput, XPAR_DIP_SWITCHES_8BIT_DEVICE_ID); if (status != XST_SUCCESS) return XST_FAILURE; // Configuration d'entré des DIPS XGpio_SetDataDirection(&GpioInput, 1, 0xFFFFFFFF); OldData = 0xFFFFFFFF; while(1){ // Lecture de l'état des Dips DataRead = XGpio_DiscreteRead(&GpioInput, 1); // Envoyer L'information sur UART if(DataRead != OldData){ xil_printf("Etat des Dips: 0x%X\r\n", DataRead); // Envoyer l'information des DIPS dur les LEDS XGpio_DiscreteWrite(&GpioOutput, 1, DataRead); // Enregistrer l'état OldData = DataRead; } } return 0;}


 but when i build the project and I generate the bitstream and i download the bitstream with Impact 11 , i can't see a result !
How can a resolve the problem ??


0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
Registered: ‎02-25-2009

Are you able to send any pattern on LEDs say 0xAAAAAAAA? First try to glow led only.


Make sure all the section of code is not assigned to external memory like DDR. You can check this in linker script *.ld.


If all the sections in linker script are assigned to internal BRAM then it will directly run once you dump the bitstream.




0 Kudos