76 lI2CBusNode = self.device.getNode(
"io.i2c")
78 lIC6 = I2CExpanderSlave(lI2CBusNode, lI2CBusNode.get_slave(
'Expander1').get_i2c_address())
79 lIC7 = I2CExpanderSlave(lI2CBusNode, lI2CBusNode.get_slave(
'Expander2').get_i2c_address())
82 lIC6.set_inversion(0, 0x00)
84 lIC6.set_outputs(0, 0x00)
87 lIC6.set_inversion(1, 0x00)
89 lIC6.set_outputs(1, 0x88)
93 lIC7.set_inversion(0, 0x00)
95 lIC7.set_outputs(0, 0xf0)
98 lIC7.set_inversion(1, 0x00)
100 lIC7.set_outputs(1, 0xf0)
114 lI2CBusNode = self.device.getNode(
"io.i2c")
116 lDAC1 = DACSlave(lI2CBusNode, lI2CBusNode.get_slave(
'DAC1').get_i2c_address())
117 lDAC2 = DACSlave(lI2CBusNode, lI2CBusNode.get_slave(
'DAC2').get_i2c_address())
120 lBISignalThreshold = 0x589D
122 lDAC1.set_interal_ref(
False);
123 lDAC2.set_interal_ref(
False);
124 lDAC1.set_dac(7, lBISignalThreshold);
125 lDAC2.set_dac(7, lBISignalThreshold);
127 secho(
"DAC1 and DAC2 set to " + hex(lBISignalThreshold), fg=
'cyan')
133 Perform a hard reset on the timing master, including
138 - pll and pll configuration
146 lDevice = self.device
147 lBoardType = self.info.boardType
148 lCarrierType = self.info.carrierType
149 lDesignType = self.info.designType
151 echo(
'Resetting ' + click.style(lDevice.id(), fg=
'blue'))
153 lIO = lDevice.getNode(
'io')
158 if not (soft
or lBoardType == kBoardSim):
173 raise click.ClickException(
"No revision associated to UID "+hex(lUniqueID))
176 lI2CBusNode = lDevice.getNode(
"io.i2c")
177 lSIChip = SI534xSlave(lI2CBusNode, lI2CBusNode.get_slave(
'SI5345').get_i2c_address())
178 lSIVersion = lSIChip.read_device_version()
179 echo(
"PLL version : "+style(hex(lSIVersion), fg=
'blue'))
182 if forcepllcfg
is not None:
183 lFullClockConfigPath = forcepllcfg
184 echo(
"Using PLL Clock configuration file: "+style(basename(lFullClockConfigPath), fg=
'green') )
189 raise ClickException(
"Board revision " << lRevision <<
" has no associated clock configuration")
191 echo(
"PLL Clock configuration file: "+style(lClockConfigPath, fg=
'green') )
194 lFullClockConfigPath = expandvars(join(
'${TIMING_SHARE}/config/etc/clock', lClockConfigPath))
196 lSIChip.configure(lFullClockConfigPath)
197 echo(
"SI3545 configuration id: {}".format(style(lSIChip.read_config_id(), fg=
'green')))
202 lI2CBusNode = lDevice.getNode(
"io.i2c")