PWM @ 5MHz

Hi everybody,

I am new in programming a Wixel and i still have some Problems with it ;O)
I would like to generate 3 PWM output to drive some Motors.
I need a base frequency of 1 to 5 kHz to drive the Motors smooth and would like to use e Duty from 0 to 100%. But I have no idea how to Programm it :smiley: !!

I tried to generate the frequency by switching a digital out on/off by countig programm-loops. But the fastes Puls I reach (2 Programmloops), has a time of 120µs which is 12% of 1kHz.

The Example “example_servo_sequence” is not fast too, and I have no idea how to tune it, to get Higher Duty Cycles.

is there any PWM Example or is it just not possible with the wixel?
The Core runs @ 24MHz, so i thought it would work.

I hope anybody can give me a tip!

Best Regarts!


The contents of your post do not match the title. Did you mean 5 kHz in the title? You mention you were able to generate a pulse that was 120 us, which is equal to 8.333 kHz, not 120 Hz. However, it would be better if you used a timer to generate the PWM signals. I recommend you take a look CC2511F32 datasheet in the “Resources” tab on the Wixel’s product page on how to configure the timers:

Timer 1 is capable of producing 3 PWM outputs.

- Jeremy

hey JeremyT;

thanks for reply!
I had even more problems to generate a PWM while using I²C, so i took a I²C LED Driver for my PWM that works very well.