mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
add comment about using clk_gpout0 enable bit (Fixes #413)
This commit is contained in:
parent
607b42006a
commit
5384b6b4d3
1 changed files with 4 additions and 0 deletions
|
|
@ -70,6 +70,8 @@ bool clock_configure(enum clock_index clk_index, uint32_t src, uint32_t auxsrc,
|
|||
// propagating when changing aux mux. Note it would be a really bad idea
|
||||
// to do this on one of the glitchless clocks (clk_sys, clk_ref).
|
||||
else {
|
||||
// Disable clock. On clk_ref and clk_sys this does nothing,
|
||||
// all other clocks have the ENABLE bit in the same position.
|
||||
hw_clear_bits(&clock->ctrl, CLOCKS_CLK_GPOUT0_CTRL_ENABLE_BITS);
|
||||
if (configured_freq[clk_index] > 0) {
|
||||
// Delay for 3 cycles of the target clock, for ENABLE propagation.
|
||||
|
|
@ -101,6 +103,8 @@ bool clock_configure(enum clock_index clk_index, uint32_t src, uint32_t auxsrc,
|
|||
tight_loop_contents();
|
||||
}
|
||||
|
||||
// Enable clock. On clk_ref and clk_sys this does nothing,
|
||||
// all other clocks have the ENABLE bit in the same position.
|
||||
hw_set_bits(&clock->ctrl, CLOCKS_CLK_GPOUT0_CTRL_ENABLE_BITS);
|
||||
|
||||
// Now that the source is configured, we can trust that the user-supplied
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue