program-stusb4500-nvm

CLI reference

glasgow run program-stusb4500-nvm

Read and write the NVM inside the STUSB4500 USB-PD initiator.

The file format used is the .txt generated by the STSW-STUSB002 GUI utility provided by ST.

usage: glasgow run program-stusb4500-nvm [-h] [-V SPEC] [--scl PIN]
                                         [--sda PIN] [-A I2C-ADDR]
                                         OPERATION ...
-h, --help

show this help message and exit

-V <spec>, --voltage <spec>

configure I/O port voltage to SPEC (e.g.: '3.3', 'A=5.0,B=3.3', 'A=SA')

--scl <pin>

bind the applet I/O line 'scl' to PIN (default: 'A0', required)

--sda <pin>

bind the applet I/O line 'sda' to PIN (default: 'A1', required)

-A <i2c-addr>, --i2c-address <i2c-addr>

I²C address of the STUSB4500; typically 0b0101000 (default: 0x28)

glasgow run program-stusb4500-nvm read

usage: glasgow run program-stusb4500-nvm read [-h] [-f FILENAME]
-h, --help

show this help message and exit

-f <filename>, --file <filename>

write NVM contents to FILENAME

glasgow run program-stusb4500-nvm write

usage: glasgow run program-stusb4500-nvm write [-h] [-f FILENAME]
-h, --help

show this help message and exit

-f <filename>, --file <filename>

write NVM with contents of FILENAME

API reference

class glasgow.applet.program.stusb4500_nvm.StUsb4500NvmInterface(logger: Logger, i2c_iface: I2CControllerInterface, i2c_address: int = 0x28)