-
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 Failed on a new platform because the voltage cannot drop so quick #63
Comments
I am bit confused with lines a-d above. Could you possible to provide each separately and the behaviour actual/expected? |
sorry for unclear description. There's 2 ways to fix the issue.
2nd way (I called plan B) |
@mray19027 |
@soramame21 what platform are you testing this on? This is the first time we've seen this issue. It may be worth adding a corner case test to catch this. Either way if the platform cannot meet the current testing infrastructure it needs to have a warning on its platform page about limitations on its AnalogIn speed. |
@BlackstoneEngineering This is a pre-release platform working with 5v not 3.3v. the ci-test-shield is modified specially, it's quite different from others. I think we may not need to make further investigation on it. I'd like to close this issue. What is your comment or suggestion? |
@BlackstoneEngineering I close it now. if it's necessary to go deeper, we can reopen it. |
I got a AnalogIn test failure.
Log analysis
TEST_ASSERT_MESSAGE(ain.read() > prev_value,"Analog Input did not increment. Check that you have assigned valid pins in mbed_app.json file")
at 1st loop infor(x = 0; x<5; x++)
in AnalogInput_Test().A. The log with more printf, the failed point is marked by <<
Fax plan A & B
dout_pin bits are cleared at line a, at this moment the voltage is still high cannot drop quickly.
A 100ms delay loop is added at line b. to wait for the voltage going down. If I remove the line b, and run to line c, at this moment x=0, then
prev_value
will be a big value > followed ain.read() to hit the TEST_ASSERT_MESSAGE().but I'm not sure how many targets will have this voltage dropping slow issue. it seems like that the most of targets don't need the 100ms wait to run AnalogIn test case. so I made another fix.
It's not necessary to add line b delay loop, but line d.
Because the root cause is that the voltage output is not turned off at end of previous test, so I just add line d to stop voltage output at end of AnalogInput_Test().
B. ci-test-shield\TESTS\API\AnalogIn\AnalogIn.cpp, with fixed code
The text was updated successfully, but these errors were encountered: