Clock setting for PWM operation

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

Clock setting for PWM operation

ソリューションへジャンプ
528件の閲覧回数
emdev
Contributor III

Hello,

I can obtain PWM signal output by reference evkbimxrt1050_pwm example.

But when I operate not only PWM but also I2C, I2C has always error.

And I found that below code is cause of problem.

CLOCK_SetDiv(kCLOCK_AhbDiv, 0x2);

If I use below code(which can be found BOARD_BootClockRUN()), I2C can operate well.

CLOCK_SetDiv(kCLOCK_AhbDiv, 0x0);

I want to use PWM and I2C simultaneously.

Would you recommend how I can set PWM properly?

Thanks in advance.

 

ラベル(1)
0 件の賞賛
1 解決策
502件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well. I apologize for my delayed reply.

For I2C I suggest you select USB1PLL as clock source as the I2C example uses. The limitation of the LPI2C clock is that it must be lower or equal to 66MHz.
For the PWM I suggest you keep the default configuration from  BOARD_BootClockRUN() avoiding the modification of the AHB divider.

If you have more questions do not hesitate to ask me.
Best regards,
Omar

元の投稿で解決策を見る

0 件の賞賛
1 返信
503件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well. I apologize for my delayed reply.

For I2C I suggest you select USB1PLL as clock source as the I2C example uses. The limitation of the LPI2C clock is that it must be lower or equal to 66MHz.
For the PWM I suggest you keep the default configuration from  BOARD_BootClockRUN() avoiding the modification of the AHB divider.

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 件の賞賛