Burning new firmware in v1495
From PolWiki
Jump to navigationJump to search
- You need to login into the CPU of the crate which has this v1495 using telnet or minicom.
telnet c-comptonv0
- change your directory to the place where you have the firmware saved
cd "/home/cdaq/Compton/firmware/"
- check if the list of files to confirm the new firmware in this location
ls
- load the object file corresponding to the CAEN provided lib. [This library has the function 'v1495firmware' defined]
ld < v1495.o
- check the VME bus address to which this v1495 is mapped. by running the sysBusToLocalAdrs command followed by printing the value.
sysBusToLocalAdrs(0x39, 0x200000 , &laddr); printf("%x\n",laddr);
- 1st parameter: 0x39 stands for 24 bit addressing on my v1495 board, which could have been 0x09 in 32 bit addressing mode.
- 2nd parameter: 0x200000 is the hardware address set by me on this v1495, by setting the Hexa decimal dip switches on the top of the board to '0','0','2','0'. the last 4 bytes are automatically '0'
- 3rd parameter: laddr is a local variable (stands for local address), (if it is not already defined, then enter "laddr =0" in the CPU terminal to create a variable with that name)
- finally run the function v1495firmware to burn in the binary file into the EEPROM of the v1495.
v1495firmware(0xFA200000,"v1495chcmaster_AA04.rbf",0,0)
- 1st parameter: 0xFA200000 is the local VME bus addr of the v1495, corresponding to my hardware addr of 0x200000, found in step 5
- 2nd parameter: v1495chcmaster_AA04.rbf is the name of the (raw binary format) file that I want to burn into the User FPGA memory of the v1495.(in the local directory/folder where I call this function)
- 3rd parameter: 0 stands for writing in ['1' for reading out]
- 4th parameter: 0 stands for User FPGA ['1' for Bridge FPGA]