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

Verify w5500 chip properly (IDFGH-9158) #10554

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

reinismu
Copy link
Contributor

Datasheet says that 0x4 is only value returned. We should verify that we got correct one.
image

Note: Currently trying to make W5500 work using esp-idf-svc in rust. SPI returns garbage data, but no clear error message is returned. So would be nice if we failed fast here.

@CLAassistant
Copy link

CLAassistant commented Jan 16, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot changed the title Verify w5500 chip properly Verify w5500 chip properly (IDFGH-9158) Jan 16, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 16, 2023
Copy link
Collaborator

@kostaond kostaond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. I just left few minor comments. Please have a look.

components/esp_eth/src/esp_eth_mac_w5500.c Outdated Show resolved Hide resolved
components/esp_eth/src/esp_eth_mac_w5500.c Outdated Show resolved Hide resolved
components/esp_eth/src/w5500.h Outdated Show resolved Hide resolved
@reinismu reinismu requested review from kostaond and removed request for suda-morris January 17, 2023 09:41
@kostaond
Copy link
Collaborator

Thanks for the update. Could you also please squash the commits into one to follow contribution rules?

@suda-morris
Copy link
Collaborator

sha=bb2f346e55f484edc50f68cb26d164d8a79bcf39

@suda-morris suda-morris added the PR-Sync-Merge Pull request sync as merge commit label Jan 18, 2023
@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Resolution: NA Issue resolution is unavailable labels Jan 20, 2023
@espressif-bot espressif-bot merged commit bb2f346 into espressif:master Jan 20, 2023
@espzav
Copy link
Collaborator

espzav commented Apr 18, 2023

Hi @reinismu, please, I have the issue with ethernet MAC W5500 on the latest master (after this PR). I have board with this SPI ethernet chip and it is working right. But after updated IDF to latest master, it fails when initilization - read chip ID returns 0x0 instead of 0x4. Please, could you help me, where can be a problem?

@reinismu
Copy link
Contributor Author

Hi @espzav,
Interesting. Datasheet does say that it will always return 0x4.
I wonder if there are different W5500 chips. What is your w5500 part number?

@espzav
Copy link
Collaborator

espzav commented Apr 18, 2023

Hi @reinismu, I bought this: https://www.tme.eu/cz/en/details/w5500/ethernet-interfaces-integrated-circuits/wiznet/ (I can try another board later, which was assmbled in JLCPCB)

@reinismu
Copy link
Contributor Author

reinismu commented Apr 18, 2023

They link to the same datasheet where it mentions that 0x4 is the returned version.
You could try writing simple program that just reads the version register and see what happens. Maybe commands before corrupt it.

Did you check these discussions?
https://forum.wiznet.io/t/topic/5595
https://forum.wiznet.io/t/topic/9523

@espzav
Copy link
Collaborator

espzav commented Apr 18, 2023

Thank you, I will try it and check the reset state.

@espzav
Copy link
Collaborator

espzav commented Apr 27, 2023

Hi @reinismu,
I tried reset and still returns 0x0. But when I put 100ms delay before ID check, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Sync-Merge Pull request sync as merge commit Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants