-
Notifications
You must be signed in to change notification settings - Fork 3
Improve uart gpio test #25
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
Conversation
0252a1c to
f71e928
Compare
|
I searched and recalled what open-drain output mode is: set the pin to HIGH in open-drain mode puts the pin in a high-impedance state. To pass the test, it assumes the presence of an internal/external pull-up resistor on the line to ensure the pin is set to high. That is why I consider disable HIGH check for that test case. |
Signed-off-by: zhanglinjing <Linjing.Zhang@infineon.com>
…endrain test. Signed-off-by: zhanglinjing <Linjing.Zhang@infineon.com>
Signed-off-by: zhanglinjing <Linjing.Zhang@infineon.com>
Signed-off-by: zhanglinjing <Linjing.Zhang@infineon.com>
0a8053d to
bb27453
Compare
|
Hi I searched and recalled what open-drain output mode is: set the pin to HIGH in open-drain mode puts the pin in a high-impedance state. To pass the test, it assumes the presence of an internal/external pull-up resistor on the line to ensure the pin is set to high. |
|
|
||
| digitalWrite(TEST_PIN_DIGITAL_IO_OUTPUT, HIGH); | ||
| TEST_ASSERT_EQUAL_MESSAGE(HIGH, digitalRead(TEST_PIN_DIGITAL_IO_INPUT), "Input Pin should be set to HIGH"); | ||
| digitalWrite(TEST_PIN_DIGITAL_IO_OUTPUT, HIGH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the setup, there should be some pull-up resistor no? Or we plan also to test the floating pin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tested it, I just used the jumper to connect the two pins like in the description, without any additional resistor:
/* test_digitalio_single.cpp
*
- This test is used to verify the functionality of the Digital IO module.
- only one board is needed with TEST_PIN_DIGITAL_IO_OUTPUT pin connected to
- TEST_PIN_DIGITAL_IO_INPUT pin for the test cases to work as expected.
*/
XMC fails if check the high state since it is floting?
By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---
CONTRIBUTING.md also tells you what to expect in the PR process.
Description
some documentation or minor fix after running the test for xmc4arduino 4.x
Related Issue
None
Context