3. EDITING THE TEST PROCEDURE
Now that all the necessary components have been added to the test procedure, you are ready to send
your first I3C commands using the SV4E-I3C module and control the masterDevice and slave. The
example below will demonstrate how to set a dynamic address to a slave device, read back the address,
and then perform a direct read of the slave’s provisional ID.
a) First, navigate to the bottom of the “Test Procedure” pane and notice that there are
already three commands in the editor (as shown in the previous two figures). The
first one, masterDevice.setup(), is used to initialize the master device already on the
bus by default. The second one, i3cDataCapture1.start(), is used to start the capture
of the I3C bus waveform and its analysis. Finally, the third one, slaveDevice.setup(), is
used to initialize the slave device we added in the previous section.
b) The code listed below will allow you to assign a dynamic address to the connected
slave device and print out the resulting address. Simply add the following lines to the
“Test Procedure” editor pane situated at the bottom of the main GUI window:
#Reset all Dynamic Addresses
print("Resetting all dynamic addresses on bus...")
masterDevice.resetAllDynamicAddresses()
#Do dynamic address assignment
print("Assigning dynamic addresses...")
masterDevice.assignDynamicAddresses()
#Get the slave's newly assigned dynamic address through software
print("Reading addresses of individual devices on bus...")
mySlave = slaveDevice.getDynamicAddress()
print("slaveAddr: 0x%02X " % (mySlave))
For more details on how to use these and other available methods, please consult
the “Help” pull-down menu entry from the main Introspect ESP GUI window, or
“right click” on the component in question in the component window to open the
pop-up help file, as described previously.