-
Notifications
You must be signed in to change notification settings - Fork 200
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
Some strangeness in the PWM interface #584
Comments
@sakian, yes, there are a few APIs in the HAL that could probably use an overhaul. I've notice the inconsistencies in the PWM modules myself. If you want to tackle this, I would suggest making a mini-RFC first, outlining what you plan to do. I think that would reduce any wasted effort and also make it easier for reviewers to understand the approach without dealing with all the complications of the actual implementation. |
Thanks, I will look into doing that! More digging has made me realize why only the single channel |
I've been using the PWM interface for a bit now and there's some strangeness in it. I just want to make sure I'm not missing anything before I potentially look to create a PR. Currently, I'm using the ATSAMD51J18A chip and trying to drive two PWM outputs on PA04 and PA05 using TC0. I think this should be possible, but running into a number of issues that made me look closer at the HAL implementation. Weird things I think I'm seeing are:
thumbv6m
andthumbv7em
:thumbv7em
allows you to give it a pin, wherethumbv6m
doesn't. Seems likethumbv6m
should be updated to take a pinout as well (talked about in Add basic support for PWM using TCC on D51/E54 #245).thumbv7em
TCx implementsPwmPin
and notPwm
: The TCx can control two pins, so I think these should implementPwm
?TC0Pinout
defined forPA05
, but none forPA04
even though it's supported by the chip.The text was updated successfully, but these errors were encountered: