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
Fix SAMD51 WO_associations #93
Conversation
Hey Richhard, This actually does not resolve the problem for me. I still cannot use pins 3,4 and 11 to set the pwm on them. I think this has something to do with the way the code choses whether to use TC or TCC.
I've seen in the code that the TC is commented out but it seems to me that for SAMD51 the code can still select it: EPioType getPeripheralOfPermutation(int permutation, int pin_position) {
return ((permutation>>pin_position)&0x01)==0x1?PIO_TIMER_ALT:PIO_TIMER;
} I've tried to dig into the code few times so far, but I am really having trouble understanding the functions: This is the output for 3, 9, 11:
|
Hey Antun! I will look at it again. Regarding your question:
I'll go over it again, and simply remove the TC-units from the SAMD51 side of things altogether. To be honest, it is a bug that it assigns the TC-Units in the first place, since I didn't write the code to configure them. |
I think the above is now solved in PR #134 |
Fixes the WO_associations for SAMD51/SAME51, which had erroneously used only 4 channels of TCC0 (which has 6).
Also this patch adds the enable_active_high setting to the 3-PWM driver, in the same way as we have it for the 6-PWM driver.