Skip to content

typo: Assertion error when fractional pll denominator is 0xFFFFF #6

@phrogger

Description

@phrogger

Line 216 in "adafruit_si5351.py" currently says:
assert 0 < denominator < 0xFFFFF # Prevent divide by zero.

Which is an attempt to throw an assertion when the denominator is zero, or out of bounds.
The spec sheet says that 1048575 = 0xFFFFF is the maximum denominator allowed, and is therefore valid.
A denominator greater than 1048575 = 0xFFFFF should be asserted as an error.

The line should be modified to be:
assert 0 < denominator <= 0xFFFFF # Prevent divide by zero.

I have made this change using Feather M4 Express, running CP 4.0.2, driving an Adafruit Si5351A breakout board and verified that the Si5351A works correctly as expected with denominator 0xFFFFF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions