-
Notifications
You must be signed in to change notification settings - Fork 17
current E5 PWM implementation is LIMITED (was 'broken') #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
there seems to be an interaction of some kind where pins PC4 through pC7 have half the frequency of pins PC0 through PC3. This is probalby the waveform generator module [it needs to be disabled in the startup code, probably]. PD0 though PD3 won't be able to have PWM. PD4 through PD7 work fine, but if PD6 and PD7 are used for serial, there won't be any PWM out. Still working on PWM for E series. |
Randomly ran across this comment when looking for E5 PWM examples. One thing that might explain why PC4 and PC5 might not behave the same is that the REMAP pin docs state that OCA and OCB will be OR-modulated between TCC4 and TCC5. No idea if that's what you're seeing, but thought I'd mention it as a possibile debugging path. |
thanks, will do |
a few observations: |
using 'NORMAL' vs 'SINGLE SLOPE PWM' seems to help correct the problems with bit-select and signal output. however, 'NORMAL' only does one pulse per count overflow, so you get symmetrical 1khz output instead of PWM 2khz output (but it works correctly on all pins when selected). |
it appears that timer 5 PWM timer output on pins 6 and 7 basically doesn't happen, and similarly the output from timer 4 isn't being used on pins 4-7 on the E series. modes for the waveform extension affect PWM output directly. In short, there are only 6 usable PWM outputs for TC4 and TD5. |
In the interrim, the default 32E5 mapping will only support PWM on the following pins: 3 - port D pin 4 |
work in progress.
The text was updated successfully, but these errors were encountered: