Skip to content

boards/same54-xpro: don't source peripheral clocks from main clock#13414

Merged
benpicco merged 1 commit into
RIOT-OS:masterfrom
benpicco:boards/same54-xpro/peripheral-clocks
Feb 21, 2020
Merged

boards/same54-xpro: don't source peripheral clocks from main clock#13414
benpicco merged 1 commit into
RIOT-OS:masterfrom
benpicco:boards/same54-xpro/peripheral-clocks

Conversation

@benpicco

Copy link
Copy Markdown
Contributor

Contribution description

Use the dedicated 48 MHz clock as a source for the peripheral clocks.
This was already done for I2C to allow it to work despite the 120 MHz main clock.

Not running the peripherals off the main clock will allow for dynamic re-clocking of the main clock in the future, without affecting the operation of the peripherals.

It also gives more flexibility to the main clock selection in general.

Testing procedure

SPI and UART should continue to work as before.
(Tested with ATREB215-XPRO connected to EXT3 on same54-xpro)

Issues/PRs references

none

Use the dedicated 48 MHz clock as a source for the peripheral clocks.
This was already done for I2C to allow it to work despite the 120 MHz
main clock.

Not running the peripherals off the main clock will allow for dynamic
re-clocking of the main clock in the future, without affecting the
operation of the peripherals.

It also gives more flexibility to the main clock selection in general.
@benpicco benpicco added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: boards Area: Board ports labels Feb 19, 2020
@benpicco benpicco requested a review from dylad February 19, 2020 16:56
@benpicco benpicco added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label Feb 19, 2020
@dylad dylad added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines labels Feb 19, 2020
@dylad

dylad commented Feb 19, 2020

Copy link
Copy Markdown
Member

I'll give this PR a try ASAP on hardware.

@dylad dylad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested on SAME54-XPRO.
ACK

@dylad dylad added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Feb 21, 2020
@dylad dylad added this to the Release 2020.04 milestone Feb 21, 2020
@dylad

dylad commented Feb 21, 2020

Copy link
Copy Markdown
Member

Here we go.
edit: Murdock doesn't want...

@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 21, 2020
@dylad

dylad commented Feb 21, 2020

Copy link
Copy Markdown
Member

Vera is very annoying...

@benpicco

Copy link
Copy Markdown
Contributor Author

I thought she had been neutered by #13403

@dylad

dylad commented Feb 21, 2020

Copy link
Copy Markdown
Member

@benpicco Should we ignore it and go ahead without green button ?

@benpicco

Copy link
Copy Markdown
Contributor Author

@dylad how can we go ahead without a green merge button? What is that sorcery?

@dylad

dylad commented Feb 21, 2020

Copy link
Copy Markdown
Member

Not sorcery but the button is alive but white instead of green ;) Travis doesn't seem to be that mandatory.

@benpicco benpicco merged commit 261ede7 into RIOT-OS:master Feb 21, 2020
@benpicco

Copy link
Copy Markdown
Contributor Author

Anarchy!

@benpicco benpicco deleted the boards/same54-xpro/peripheral-clocks branch February 21, 2020 22:25
@benpicco

Copy link
Copy Markdown
Contributor Author

Hmm now UART doesn't work when waking up from standby (set 2 in tests/periph_pm).
Yet I2C is working after wake-up when sourced from DFLL48 🤔

@benpicco

benpicco commented Feb 24, 2020

Copy link
Copy Markdown
Contributor Author

Ah looks like this is due to Errata 2.8.3 DFLLVAL.FINE Value When DFLL48M Re-enabled

When I follow the work-around procedure the DFLL48 ends up at the right frequency after wake-up again and thus the UART gets the right baud rate.

9c936ae will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants