how do i know if a clock is enabled already?

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

how do i know if a clock is enabled already?

ソリューションへジャンプ
1,118件の閲覧回数
5angxr
Contributor III

If I need to init ADC and QDC,  and they both use XBARA, and `CLOCK_EnableClock(kCLOCK_Xbar1);` is invoked twice.

Would it be a problem that kCLOCK_Xbar1 enable twice? Is there a function I can use to know if the module already has been enabled before I try to enable the module?

0 件の賞賛
返信
1 解決策
1,048件の閲覧回数
Habib_MS
NXP Employee
NXP Employee

Hello @5angxr,

It is not a problem to use "CLOCK_EnableClock(kCLOCK_Xbar1);" twice, this because the clock will be enabled.

Also, to know if the clock is enabled you can see the bits 22 and 23 in the register called "CCM Clock Gating Register 2" where is in the chapter 14.7.23 in the RM. As shows the next image:

Habib_MS_0-1723070379468.png

 

Also, if you experience any issue, do not hesitate to let me know.

BR

Habib

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,074件の閲覧回数
Habib_MS
NXP Employee
NXP Employee

 

Hello @5angxr,

Sorry for taking a while to get back to you. In order to support you better, can you provide me which RTxxxx you are currently using?

BR

Habib

0 件の賞賛
返信
1,064件の閲覧回数
5angxr
Contributor III
RT1042
0 件の賞賛
返信
1,049件の閲覧回数
Habib_MS
NXP Employee
NXP Employee

Hello @5angxr,

It is not a problem to use "CLOCK_EnableClock(kCLOCK_Xbar1);" twice, this because the clock will be enabled.

Also, to know if the clock is enabled you can see the bits 22 and 23 in the register called "CCM Clock Gating Register 2" where is in the chapter 14.7.23 in the RM. As shows the next image:

Habib_MS_0-1723070379468.png

 

Also, if you experience any issue, do not hesitate to let me know.

BR

Habib

0 件の賞賛
返信