f) The third and final tab, “Messages”, allows the user to quickly identify the function
of a group of I3C commands. In the current example, only two messages are
presented. The SDR_BCAST is an automated message that the master sends to say
SDR mode is being used. Then we see the DAA event we executed, listed as DAA for
Dynamic Address Assignment.
g) Now that you have been able to assign an address to the slave device, you can send
I3C commands to it over the SCL/SDA wires. For example, to read the provisional ID
of the slave device (previously programmed through the slaveDevice.setup()
operation), you will need to send a direct read command to the slave device with the
direct command code “GETPID”.
To do so, navigate back to the “Params” tab at the top of the GUI window and add
the following code to your Test Procedure:
#This demonstrates a direct read CCC
print("Reading provisional IDs of slave devices on the bus...")
slaveAddrs = [mySlave]
resultsBySlaveAddr = masterDevice.doDirectReads('GETPID', slaveAddrs, 10)
for slaveAddr in slaveAddrs:
bytesFromSlave = resultsBySlaveAddr[slaveAddr]
print("slaveAddr: 0x%02X bytesFromSlave: %s" % (slaveAddr, bytesFromSlave))