I installed a satellite and can initialize the devices on both the satellite and the master with the startup kernel successfully (e. g. I see that the red leds of the Urukul units turn off once I initialize them). Afterwards I tried to check that I can get an output on the TTLs and Urukul channels. For the TTL I used the following program and check with a voltmeter:
class Idle(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl4")
@kernel
def run(self):
self.core.break_realtime()
logger.info("A")
self.ttl4.on()
logger.info("B")
delay(5*s)
logger.info("C")
self.ttl4.off()
logger.info("D")
delay(5*s)
logger.info("E")
self.ttl4.on()
logger.info("F")
delay(5*s)
logger.info("G")
self.ttl4.off()
logger.info("H")
self.core.wait_until_mu(now_mu())
Instead of a different voltage every 5 seconds and the corresponding slow log messages, I get no voltage change and all messages (A-H) appear instantly on the dashboard console. Then the program never exits and I have to delete it. If I try the reverse and read a TTL instead, it also hangs at the line where some response is expected:
class Idle(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl0")
@kernel
def run(self):
self.core.break_realtime()
logger.info("A")
self.ttl0.gate_rising(80*ns)
logger.info("B")
try:
logger.info("B1")
self.ttl0.count(now_mu())
logger.info("B2")
except RTIOOverflow:
logger.info("B3")
pass
logger.info("C")
So I see A, B and B1 immediately in the console and then it hangs indefinitely. I see similiar behaviour for the Urukuls. What is the problem here? All of these devices are on the master, so I am confused why the satellite should change something. I also checked the device_db entries of these devices before the switch and now and did not find any difference. This is the current device_db entry for the core and TTL devices:
device_db = {
"core": {
"type": "local",
"module": "artiq.coredevice.core",
"class": "Core",
"arguments": {"host": core_addr, "ref_period": 1e-09},
},
"core_log": {
"type": "controller",
"host": "::1",
"port": 1068,
"command": "aqctl_corelog -p {port} --bind {bind} " + core_addr
},
"core_cache": {
"type": "local",
"module": "artiq.coredevice.cache",
"class": "CoreCache"
},
"core_dma": {
"type": "local",
"module": "artiq.coredevice.dma",
"class": "CoreDMA"
},
"i2c_switch0": {
"type": "local",
"module": "artiq.coredevice.i2c",
"class": "PCA9548",
"arguments": {"address": 0xe0}
},
"i2c_switch1": {
"type": "local",
"module": "artiq.coredevice.i2c",
"class": "PCA9548",
"arguments": {"address": 0xe2}
},
}
# master peripherals
device_db["ttl0"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000000},
}
device_db["ttl1"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000001},
}
device_db["ttl2"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000002},
}
device_db["ttl3"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000003},
}
device_db["ttl4"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000004},
}
device_db["ttl5"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000005},
}
device_db["ttl6"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000006},
}
device_db["ttl7"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000007},
}