FUSB302GEVB
11
Script
Figure 10. Script Tab
The “Script” tab enables the use of scripts to configure the
FUSB302. Scripts can be added through the GUI using the
editing window on the left of the tab. This edit window
allows for normal copying and pasting to or from any text
file if you want to save or copy your scripts from external
files. Each line of the script should be formatted as follows:
Command, port, I
2
C addr, # bytes, register addr, data1,
..., dataN, optional comment
•
The
Command
is: “r” or “w”
•
The
port
is always 0
•
The
I2C addr
is either 0x44, 0x46, 0x48, or 0x4A
•
The
# bytes
is the number of bytes to read or write
•
The
register addr
is the starting register address
•
The
data1, ..., dataN
are for writing values to registers
•
And
optional comment
is just informational
Each field can be separated with a space (“ ”), a comma
(“,”), or a semicolon (“;”).
An example of reading from 3 consecutive registers:
r 0 0x42 3 0x04 ; read 3 bytes starting at MEASURE
(register address 0x04)
An example of writing to 2 consecutive registers:
w 0 0x42 2 0x0E 0x22 0x55 ; write 2 bytes starting at
MASKA (register address 0x0E)
The Execute button will run all the lines of the script.
The Step button will execute the highlighted line.
The Loop feature will loop the entire script up to 99 times.
Setting Loop count to 0 will loop indefinitely.
Results of the executed script are shown in the box on the
right side of the tab. These results can be copied and pasted
to an external file.
An example of the power delivery loopback test is given
below:
w,0,0x44,1,0x02,0x44; Switches0(PU_EN1, MEAS_CC1)
w,0,0x44,1,0x03,0x01; Switches1(TXCC1)
w,0,0x44,1,0x04,0x31; MDAC
w,0,0x44,1,0x05,0x20; SDAC
w,0,0x44,1,0x0B,0x0F; Configure Power
w,0,0x44,1,0x06,0x10; Control0(Loopback, clear int mask)
w,0,0x44,1,0x43,0x12; SOP1
w,0,0x44,1,0x43,0x12; SOP1
w,0,0x44,1,0x43,0x12; SOP1
w,0,0x44,1,0x43,0x13; SOP2
w,0,0x44,1,0x43,0x82; PACKSYM with 2 bytes
w,0,0x44,1,0x43,0x01; Data1