mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
gotthard dacs only save 10 bits but firmware is more than 14-16 bits..so changed setdacreg to save only msb and accordingly ignore a difference of 3 while setting. Problem not detected earlier, communicationfuncs.c.Solution: commented out a part from receiveModule
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@215 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -1187,6 +1187,8 @@ int setDACRegister(int idac, int val, int imod) {
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
//saving only the msb
|
||||
val=val>>2;
|
||||
|
||||
off=(idac%3)*10;
|
||||
mask=~((0x3ff)<<off);
|
||||
@ -1198,9 +1200,12 @@ int setDACRegister(int idac, int val, int imod) {
|
||||
bus_w(addr+(imod<<SHIFTMOD),reg);
|
||||
}
|
||||
val=(bus_r(addr+(imod<<SHIFTMOD))>>off)&0x3ff;
|
||||
//since we saved only the msb
|
||||
val=val<<2;
|
||||
|
||||
//val=(bus_r(addr)>>off)&0x3ff;
|
||||
|
||||
|
||||
|
||||
#ifdef VERBOSE
|
||||
printf("Dac %d module %d register is %d\n\n",idac,imod,val);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user