Hi
Somebody could help me I'm using PWM on CTIMER2 but it doesn't work. I'm using this configuration:
Solved! Go to Solution.
Hi Oscar,
I saw that for the CTIMER2 you're using the MATCH3 register, in the reference manual 17.6.12 in the Table.340 there's
the next note:
And also in the SDK, if you check the CTIMER_SetupPwmPeriod if the MATCH 3 is used the function return fail.
In the OM4006 there's no output pin for the PWM, so if you want to have more PWM, I suggest to check the SCTIMER. There's also an example about it in the SDK.
I hope this will help you.
Best Regards,
Alexis Andalon
Hi Oscar Niño,
Overall your code seems fine, but could you please share how are you configuring the pin?
Also are you using the OM40006?
If you plan to use the multiple channels of each timer as outputs to the pwm, you need to know that the channels using the same timer will have the same frequency, you can only change the duty cycle.
Best Regards,
Alexis Andalón
Hi Alexis
I'm using my own board but I got the OM40006 board too. I need to use 6 or 7 PWM outputs, I have use TIMER 1 Match 0,1,2 and Timer 3 Match 0, 1. Justo Timer 2 doesn't work.
Here how I configured pins:
and:
Hi Oscar,
I saw that for the CTIMER2 you're using the MATCH3 register, in the reference manual 17.6.12 in the Table.340 there's
the next note:
And also in the SDK, if you check the CTIMER_SetupPwmPeriod if the MATCH 3 is used the function return fail.
In the OM4006 there's no output pin for the PWM, so if you want to have more PWM, I suggest to check the SCTIMER. There's also an example about it in the SDK.
I hope this will help you.
Best Regards,
Alexis Andalon
Hi Alexis Andalon
Thank you so much, I didn't see that part of code, so I supposse there si no way to use match 3 Chanel on my own board rigth? My interest is because that means we have to do a modification of PCB.
Best Regards
That's correct, the CTIMER_MATCH3 is used to store the PWM cycle, so it can't be used a a PWM ouput.
Best Regards,
Alexis Andalon
Thank you so much Alexis.