-
Notifications
You must be signed in to change notification settings - Fork 6
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
analog write does not work on various pins #5
Comments
So I tracked this back to mbed. It seems like the pin map for the peripheral is incomplete, so when you try and use these pins for PWM, mbed throws an error, not a hard fault, halting the user app. From what I can make out on the datasheet, the following is the summary for user facing pins:
Actions for this is are as follows:
|
Okay, further to my previous comment, it seems like the pins that aren't mapped in mbed use TC clocks, rather than TCC clocks (See section 7.1 of the datasheet). This means that the code for PWMOut WILL NOT work on the above pins, as the implementation assumes TCC. It may be time to drop mbed for CPlay IO. |
@pelikhan I don't have the cycles to write the replacement driver at the moment. In the meantime, it might be best to disable analog out operations on those pins. |
Some clarification to my original comment after reading the datasheet again...
So, this means that we would have a net gain of 3 "analogue out" pins, rather than the 5 I originally stated. |
This is a follow up of microsoft/pxt-adafruit#604
Test sample:
Result:
The text was updated successfully, but these errors were encountered: