Commit b34118cf authored by Dave Newbold's avatar Dave Newbold

Testing align script

parent 96a5b7a6
......@@ -32,6 +32,7 @@ def spi_read(spi, addr):
return d & 0xffff
offsets = [0, 13, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11]
invert = [0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25]
uhal.setLogLevelTo(uhal.LogLevel.ERROR)
board = uhal.getDevice("board", "ipbusudp-2.0://192.168.235.50:50001", "file://addrtab/top.xml")
......@@ -72,7 +73,9 @@ for i_chan in chans:
board.getNode("csr.ctrl.chan").write(i_chan) # Talk to channel 0
board.getNode("daq.chan.csr.ctrl.mode").write(0x1) # Set to capture mode
board.getNode("daq.chan.csr.ctrl.src").write(0x0) # Set source to ADC
board.getNode("daq.chan.csr.ctrl.en_sync").write(0x1) # Enable sync commands for this channel
board.getNode("daq.chan.csr.ctrl.en_sync").write(0x1) # Enable sync commands
if i_chan in invert:
board.getNode("daq.chan.csr.ctrl.invert").write(0x1) # Invert the data
board.getNode("daq.chan.csr.ctrl.en_buf").write(0x1) # Enable this channel
board.dispatch()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment