Hi all,
I noticed that void BOARD_BootClockRUN(void) disables clock gates before configuring the module clocks in the SDK. Could someone explain the reason?
For example, uart module
Best regards,
Doris
Solved! Go to Solution.
Hi @MCW
Thank you for your interest and my apologies for the delayed respose!
The main reason is to safely change the clock mux settings for a clock. Take for example the LPUART clock figure you attached: Yes, LPUART clocks are shut down, but after that the mux settings for LPUART clocks are changed. This is my interpretation according to section 14.6.1.7 Clock Switching Multiplexers of the RT1060 RM, there are some asynchronous muxes, that could cause undersired clock glitches.
Also the BOARD_BootClockRUN(void) is auto generated by the Config Tool's Clock Tool, if a clock is disabled in the Clocks tool diagram, it is expected that will be disabled on the generated code.
I hope this could help you!
Diego
Hi @MCW
Thank you for your interest and my apologies for the delayed respose!
The main reason is to safely change the clock mux settings for a clock. Take for example the LPUART clock figure you attached: Yes, LPUART clocks are shut down, but after that the mux settings for LPUART clocks are changed. This is my interpretation according to section 14.6.1.7 Clock Switching Multiplexers of the RT1060 RM, there are some asynchronous muxes, that could cause undersired clock glitches.
Also the BOARD_BootClockRUN(void) is auto generated by the Config Tool's Clock Tool, if a clock is disabled in the Clocks tool diagram, it is expected that will be disabled on the generated code.
I hope this could help you!
Diego