-
Notifications
You must be signed in to change notification settings - Fork 36
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
AnalogIn test requires that analog input pins also support digital output function #1
Comments
I think it is a fair assumption that all pins can be digital IO. This assumption is an underlying assumption made in the mbed SDK, so having a ping that cannot do GPIO would be an SDK implementation error, not a test case? @sg- care to comment on this one? |
My previous though was that a resistor ladder would provide the coverage needed and avoid this case where analog pins are not digital capable |
Will consider changing to resistor ladder for next revision. But how often is it the case that a pin can do analog in but not digital out? |
I think that most mcus these days probably do offer both analog and digital capabilities on the same pin. But there are definitely potential cases where they do not - most probably on high-precision ADCs. In my opinion, a simple circuit that isolates the feature under test (analogin, not analogin + digitalout) would be preferred. |
I do not disagree, the problem is we're pretty far down the path to getting these produced, making any HW changes would delay the release of the CI Test Shield by 1-2 months. Is this worth it? Also, wouldnt adding a resistor ladder across A0-5 messup the analogout test? Or are you proposing a resistor ladder across A0-3 with A4-5 being loopback? |
As a solution I have added the 'assumptions' tests, which will check the assumptions made in the tests. In this case the |
@maclobdell are the assumptions tests an acceptable solution? |
Marking as resolved. |
Formatted code, removed TEST_ASSERT(true), fixed bugs, added comments
Need an alternative way to test analog pins when they don't support digital output for some rare cases. A resistor ladder is preferred such that a different value can be read on each analog pin. This would confirm that the analog pins are configured correctly for individually measuring on each pin.
Alternatively, have a way to fly-wire the pwm-capable digital signals (selectable) to a capacitor to ground, then to the resistors in parallel to the analog pins.
The text was updated successfully, but these errors were encountered: