fixed jungfrau configure bug by getting rid of gb10reset at configure

This commit is contained in:
Dhanya Maliakal
2016-11-08 09:35:34 +01:00
parent 52cf790dde
commit 8aea36b4ef
6 changed files with 50 additions and 6 deletions

View File

@ -167,11 +167,13 @@ void resetFPGA(){
cprintf(BLUE,"\n*** Reseting FPGA ***\n");
FPGAdontTouchFlash();
FPGATouchFlash();
usleep(250*1000);
}
void FPGAdontTouchFlash(){
//tell FPGA to not touch flash
system("echo 0 > /sys/class/gpio/gpio9/value");
//usleep(100*1000);
}
void FPGATouchFlash(){
@ -1645,7 +1647,7 @@ int configureInterface(uint32_t destip,uint64_t destmac,uint64_t sourcemac,int
#endif
bus_w(CONTROL_REG,GB10_RESET_BIT);
//bus_w(CONTROL_REG,GB10_RESET_BIT);
//usleep(50 * 1000);
bus_w(CONTROL_REG,0);
//usleep(500* 1000);
@ -1691,7 +1693,7 @@ int configureMAC(uint32_t destip,uint64_t destmac,uint64_t sourcemac,int source
/*volatile u_int32_t conf= bus_r(CONFIG_REG);*/
uint32_t sourceport = 0x7e9a; // 0xE185;
int interface=0;
int ngb;

View File

@ -312,7 +312,7 @@
#define RUNSTATE_0_BIT 0x00001000
#define RUNSTATE_1_BIT 0x00002000
#define RUNSTATE_2_BIT 0x00004000
#define STOPPED_BIT 0x00008000 // error!
#define STOPPED_BIT 0x00008000 // stopped!
#define ALL_FIFO_EMPTY_BIT 0x00010000 // data ready
#define RUNMACHINE_BUSY_BIT 0x00020000
#define READMACHINE_BUSY_BIT 0x00040000

View File

@ -58,8 +58,8 @@ int init_detector(int b) {
if(b){
defineGPIOpins();
resetFPGA();
usleep(250*1000);
}
}else
usleep(300*1000);
if (mapCSP0()==FAIL) {
printf("Could not map memory\n");
@ -3180,7 +3180,6 @@ int reset_fpga(int file_des) {
sprintf(mess,"Reset FPGA unsuccessful\n");
resetFPGA();
usleep(250*1000);
initializeDetector();
ret = FORCE_UPDATE;