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.
Solved! Go to Solution.
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
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