Reason for disable of clock gate before setting the module clock

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Reason for disable of clock gate before setting the module clock

跳至解决方案
456 次查看
MCW
Contributor III

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

MCW_0-1743427134097.png

Best regards,

Doris

 

标记 (2)
0 项奖励
回复
1 解答
423 次查看
diego_charles
NXP TechSupport
NXP TechSupport

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. 

diego_charles_0-1744233665417.png

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

 

 

在原帖中查看解决方案

1 回复
424 次查看
diego_charles
NXP TechSupport
NXP TechSupport

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. 

diego_charles_0-1744233665417.png

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