control-si535x
¶
CLI reference¶
glasgow run control-si535x¶
Access registers of Skyworks Si535x programmable clock generators.
usage: glasgow run control-si535x [-h] [-V SPEC] [--scl PIN] [--sda PIN]
[--i2c-address 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)
- --i2c-address <addr>¶
I2C address of the controller (default: 0x60)
glasgow run control-si535x configure-si5351¶
usage: glasgow run control-si535x configure-si5351 [-h] [--enable OUTPUTS]
FILE
- file¶
ClockBuilder Pro CSV configuration to configure
- -h, --help¶
show this help message and exit
- --enable <outputs>¶
comma-separated list of outputs to enable after configuration (for “Powered-up with Output Disabled” mode)
glasgow run control-si535x read¶
usage: glasgow run control-si535x read [-h] ADDRESS [COUNT]
- address¶
register address
- count¶
number of registers to read
- -h, --help¶
show this help message and exit
glasgow run control-si535x write¶
usage: glasgow run control-si535x write [-h] ADDRESS DATA
- address¶
register address
- data¶
data to write, as hex bytes
- -h, --help¶
show this help message and exit
API reference¶
- exception glasgow.applet.control.si535x.Si535xError¶
- class glasgow.applet.control.si535x.Si535xInterface(logger: Logger, i2c_iface: I2CControllerInterface, i2c_address: int = 0x60)¶
- async read(address: int, count: int | None = None) int | bytes ¶
Read a register or several consecutive registers starting at
address
.Returns an
int
ifcount is None
, andbytes
otherwise.- Raises:
I2CNotAcknowledged – If communication fails.
- async write(address: int, *values: int)¶
Write a register or several consecutive registers starting at
address
.- Raises:
I2CNotAcknowledged – If communication fails.
- static parse_file(file: TextIO) list[tuple[int, int]] ¶
Parse a ClockBuilder Pro CSV register file.
Returns a list of 2-tuples
(register, value)
.- Raises:
Si535xError – If the file contains invalid data.
- async configure_si5351(sequence: list[tuple[int, int]], enable: int | None = None)¶
Configure a Si5351A/B/C device.
Accepts a list of 2-tuples
(register, value)
(as returned byparse_file()
) and a bit maskenable
where a 1 in a position n enables n-th output.- Raises:
I2CNotAcknowledged – If communication fails.