AXI_reset.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #! /bin/bash
  2. export PCILIB_MODEL=ipedma
  3. #echo "ADC & GOT: Turning on power..."
  4. #pci -w 9048 f0
  5. #sleep 0.1
  6. #pci -w 9048 ff
  7. #sleep 0.1
  8. #echo "KALYPSO: reset internal PLL"
  9. #pci -w 904C f
  10. #sleep 0.1
  11. #echo "KALYPSO: enable internal clock (WARNING: ONLY FOR DEBUGGING!)"
  12. #pci -w 904C 0
  13. #sleep 0.1
  14. #echo "KALYPSO: enable external RF-CLK"
  15. #pci -w 904C 1
  16. #echo "*DMA: START"
  17. #pci --stop-dma dma0r
  18. #sleep 0.2
  19. #pci --start-dma dma0r
  20. #sleep 0.2
  21. echo "RESET of the KALYPSO"
  22. pci -w 9040 0x800f0
  23. echo "DE-RESET of the KALYPSO"
  24. pci -w 9040 0x0
  25. echo "KALYPSO: Total Orbits"
  26. pci -w 0x9020 0x400
  27. sleep 0.1
  28. pci -w 0x9024 0
  29. sleep 0.1
  30. echo "*ONBOARD TRIG GEN: ON"
  31. pci -w 0x9044 0x2E
  32. sleep 0.01
  33. echo "GOTT: Integration Period"
  34. pci -w 0x9000 0x1
  35. sleep 0.01
  36. echo "GOTT: Integration Delay"
  37. pci -w 0x9004 0x0
  38. sleep 0.01
  39. echo "GOTT: Gain"
  40. pci -w 0x9010 0x02
  41. sleep 0.01
  42. #echo "KALYPSO: AXI Master de- reset "
  43. # pci -w 0x9040 0x200000
  44. #sleep 0.1
  45. #pci -w 0x9040 0x000021 -- original for reset Gotthard control to be consider later
  46. #sleep 0.1
  47. # only control reg [0] and reg [5] for reset
  48. #pci -w 9040 0x000000
  49. #sleep 0.1
  50. # internal receiver reset
  51. #pci -w 0x9040 0x00000000
  52. #sleep 0.01
  53. #pci -w 0x9040 0x00000010
  54. #sleep 0.01
  55. #pci -w 0x9040 0x00000000
  56. #sleep 0.01
  57. #echo "*KALYPSO: Reset errors"
  58. #pci -w 0x9050 0x01
  59. #sleep 0.01
  60. #pci -w 0x9050 0x00
  61. #sleep 0.01
  62. #./PLL_jesd.sh
  63. #sleep 0.1
  64. #echo "*KALYPSO: Reset ADC ADS52J90"
  65. # pci -w 9040 0x00001000
  66. # sleep 0.1
  67. # pci -w 9040 0x00000000
  68. # sleep 0.1
  69. # reset ADC SPI (hardware reset)
  70. #echo "*KALYPSO: ADC Hardware reset"
  71. # control_reg [13]
  72. #pci -w 0x9040 0x00022000
  73. #sleep 0.01
  74. #pci -w 0x9040 0x00000000
  75. #sleep 0.01
  76. #echo "*KALYPSO: Configure ADC ADS52J90"
  77. #./spi_configure.sh
  78. #echo "*DMA: START"
  79. #pci --stop-dma dma0r
  80. #sleep 0.2
  81. #pci --start-dma dma0r
  82. #sleep 0.2
  83. #echo "*KALYPSO: DDR3 Enable Read"
  84. # control_reg [10]
  85. #pci -w 0x9040 0x00000400
  86. #sleep 0.01
  87. #pci -w 0x9040 0x00000000
  88. #sleep 0.01
  89. #echo "*DMA: Reading data..."
  90. #pci -r dma0 --multipacket -o test_data.out --timeout=1000000
  91. echo "write the number of samples to be acquired"
  92. pci -w 9108 0x1000
  93. ./status.sh