Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement NXP's recommended PLL setup sequence. #30

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

martinling
Copy link
Member

This follows the sequence described in:
UM10503 Rev 2.4 (Aug 2018), section 13.2.1.1, page 167

This sequence has already been used successfully in greatscottgadgets/hackrf#1106.

The HackRF implementation uses a fixed 204 MHz configuration. In libgreat, the CPU clock configuration can be modified by redefining the weakly-linked platform_clock_source_configurations structure.

This implementation continues to support alternative CPU clock configurations, but restricts the possible CPU clock speeds to either <= 110 MHz or 180-204 MHz when running from PLL1. This is because the CPU must first run at the mid-range of 90-110 MHz for 50us before running above 110MHz, and the recommended technique of doubling the PLL to transition from the mid to high range cannot be applied for frequencies between 110 and 180 MHz.

If unsupported frequencies are specified or the PLL fails to lock, errors will be reported and the system will fall back to the internal oscillator.

This follows the sequence described in:
UM10503 Rev 2.4 (Aug 2018), section 13.2.1.1, page 167
Copy link
Member

@antoinevg antoinevg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean, looks good to me.

@antoinevg antoinevg merged commit 19c1093 into master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants