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 VOLTS] [--scl PIN]
                                         [--sda PIN] [-A I2C-ADDR]
                                         OPERATION ...
-h, --help

show this help message and exit

-V <volts>, --voltage <volts>

configure I/O standard and power supply (range: 1.8..5 V, or 'S<port>' to use sense pin; default: unchanged)

--scl <pin>

bind I²C clock to PIN (default: 'A0', required)

--sda <pin>

bind I²C data 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)