Reason for disable of clock gate before setting the module clock

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Reason for disable of clock gate before setting the module clock

ソリューションへジャンプ
464件の閲覧回数
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 解決策
431件の閲覧回数
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 返信
432件の閲覧回数
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