Skip to content
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

W5100Class::softReset() failes always when PoE module equipped. #209

Open
7n2jju opened this issue Dec 5, 2022 · 0 comments
Open

W5100Class::softReset() failes always when PoE module equipped. #209

7n2jju opened this issue Dec 5, 2022 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@7n2jju
Copy link

7n2jju commented Dec 5, 2022

Hardware

  • Arduino Uno (any rev.)
  • Genuine Arduino Ethernet Shield Rev 2, equipped with PoE receiver module

Problem

Chip type detection such as W5100Class::isW5100() W5100Class::isW5500() and so on fails except in case of power on reset of W5500, due to W5100Class::softReset() returns 0. softReset() will succeed always when PoE receiver module is not equipped.

Solution

Increase wait count to 200 ms in W5100Class::softReset(), such as:

uint8_t W5100Class::softReset(void)
{
	uint16_t count=0;

	//Serial.println("WIZnet soft reset");
	// write to reset bit
	writeMR(0x80);
	// then wait for soft reset to complete
	do {
		uint8_t mr = readMR();
		//Serial.print("mr=");
		//Serial.println(mr, HEX);
		if (mr == 0) return 1;
		delay(1);
	} while (++count < 200);
	return 0;
}

I'm not sure it's really OK to 200.

@7n2jju 7n2jju changed the title W5100Class::softReset() failes always when PoE module. W5100Class::softReset() failes always when PoE module equipped. Dec 5, 2022
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants