Skip to content

Conversation

@LinjingZhang
Copy link
Collaborator

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

@LinjingZhang LinjingZhang force-pushed the improve-uart-gpio-test branch from 0252a1c to f71e928 Compare April 11, 2025 15:27
@LinjingZhang
Copy link
Collaborator Author

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>
@LinjingZhang
Copy link
Collaborator Author

Hi
I forget to merge it before my vacation, so please review again once you have time.
Adapt a bit the test cases for XMC4Arduino.

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.


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);
Copy link
Member

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?

Copy link
Collaborator Author

@LinjingZhang LinjingZhang Jun 6, 2025

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?

@LinjingZhang LinjingZhang merged commit cdc55ea into main Jun 6, 2025
@LinjingZhang LinjingZhang deleted the improve-uart-gpio-test branch June 6, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants