-
Notifications
You must be signed in to change notification settings - Fork 613
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
[Edison Arduino] Illegal arguments for construction of _exports_Pwm on IO 10/11 (PWM swizzler) #52
Comments
According to our platform config that's not a valid pwm pin. See: https://github.com/intel-iot-devkit/mraa/blob/master/src/intel_edison_fab_c.c#L1118 |
Ok, I'm confused now: there is a PWM |
Yes but the edison has limited PWM channels. You have to mess with the PWM swizzler jumpers, to change the PWM signal from one of the other pins to the one without. |
Ok, so you're saying that the board shouldn't have been printed with this indicator? |
Sorry, I feel like a only half understand what you're trying to say. It's going to be very frustrating to explain to users that 11 just doesn't do PWM on the Edison. |
The boards are made with jumpers to retain arduino uno compatibility, however there are only 4 PWM channels and they have to be switched using hardware jumpers labelled "swizzler". By defauly 10 & 11 are not active and we feel it's less confusing to just refuse to do PWM in those cases (since we have no way of knowing whether the jumper was switched). Page 9 of this https://www.adafruit.com/datasheets/P2180UserGuide.pdf explains the different configurations the swizzers can be in. The only thing we could realistically do is make pin10&11 attempt to use PWM2 & PWM3 although that will end up toggling pin6&9 if the board is not configured correctly. If you feel that's more useful behaviour then I'm open to making that change. Note that using pin10&11 this way would require moving the second jumper on J11 to 4-5 and the second jumper on J12 to 4-5. |
I don't feel confident in my understanding of the problem space to make this call, so I say leave it as is and I'll figure out some way to make it clear to library code users. |
FWIW, I would vote for just closing this one - we state clearly in the docs that we only support PWM on default swizzler pins and anything else (e.g. allowing to use 10 and 11) would indeed require something outside of the library control - a user action on swizzler config - which IMHO is more dangerous than beneficial. Same as right now someone could be confused by not being able to drive PWM on pins 10 and 11, they would be confused by GPIO pins being activated unexpectedly. And as long as the former could only cause frustration (until the documentation is read), the latter could cause some actual damage, that's why I believe the current approach is safer thus better. |
There is nothing to be done in software space. |
Environment:
Error:
(blurr => edison)
The text was updated successfully, but these errors were encountered: