How to Program DTC Flash

1. Log on to CMS1 as user daq (usual password, Mega....).

2. Copy the MCH file generated by Xilinx to somewhere on cms1. You can for example grab it from Wu's download area directly with a command like this:

  $ wget

3. Convert the MCH file to binary with command like this:

  $ srec_cat DTC_test.mcs  -Guess -Output DTC_test.bin -Binary

4. Copy the binary file to the directory /tftpboot/mch like this:

  $ cp DTC_test.bin /tftpboot/mch/

5. Make sure the USB and Ethernet cables are connected. Power up the MCH. Connect to bul3x1 with remote desktop (log in as daq). Launch putty.exe from desktop. Click on 'USB for MCH COM4' and 'Open'. If this gives an error, try again with 'USB for MCH COM3'. Then hit "Enter" and you should get the "nat>" prompt, and you can type commands.

Type the following commands:

  nat> diag
  DIAG (RET=0/0x0): 9
  CLK (RET=0/0x0): 1
  SPIFL (RET=0/0x0): 7
  SPI_FLASH DRV V1.0 Beta (13:28:25 Mar 10 2010)
  detected SPI flash with size of 4194304 bytes
  Enter loops (RET=1/0x1): Enter
  TFTP: getting BIN file:
  TFTP: getting file done (54702 bytes)
  SPI_FLASH(0) programming 54702 bytes at offset 0x00000000
     erase sector at offset 0x00000000...done
     programming data to FLASH......done
  SPI_FLASH(0) programming finished
  SPI_FLASH(0) verifying 54702 bytes at offset 0x00000000
  SPI_FLASH(0) reading 54702 bytes at offset 0x00000000
     reading data from FLASH....done
  SPI_FLASH(0) verify finished without errors
  SPIFL (RET=0/0x0):

After this you should cycle the power to reload the FPGA from the new flash image.

-- EricHazen - 18 Mar 2010

Topic revision: r1 - 18 Mar 2010 - EricHazen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback