Hello,
I am studying how to use FlexIO PWM in the SDK sample project "flexio_pwm".
I am using "TWR-KE18F" board.
When I tried to run, it was not working according to the specified frequency. (See the figure below.)
↑Frequency specified in ↑Actual frequency measured
code (flexio_pwm.c) with Memory high coder.
I imagined that the frequency specified in the code would be the PWM control frequency.
DEMO_FLEXIO_FREQUENCY == PWM actual frequency
However, the actual frequency was not same.
100 Hz ≠ 800 Hz
Why are the frequencies not matching?
How can I control PWM at a specified frequency?
Best regards.
Hi Toshiyuki,
SOSC clock comes from on board 8M crystal. It is not 1M.
Regards,
Jing
Hi Jing,
Thank you for your quick reply.
Your advice was very helpful.
I have a question about the SOSC clock.
The SOSC clock settings on the MCUXpresso IDE are as follow.
It looks like 1M is set.
Is this 1M invalid?
Is there anything else to set?
OR
Only 8M can be set for SOSC?
Best regards.
Hi,
SOSC clock is from XTAL. The range of external oscillator is from 32k to 40M. Please check the table 42 in datasheet.
You can modify this value in MCUXpresso CFG Tools.
Regards,
Jing