Arduino ESP32 with KSZ8081 phy

bbreukelen
Posts: 2
Joined: Thu May 31, 2018 7:39 am

Arduino ESP32 with KSZ8081 phy

Postby bbreukelen » Thu May 31, 2018 7:47 am

Hi,

I'm using an ESP32 with a KSZ8081 phy network board.
I noticed that the LAN8720 and TLK110 are supported in the SDK but how can I add support for the KSZ8081?
I probably only need to change the expected chip id from registers 2 and 3, but the existing libraries are compiled object files which I can't edit.
Did anyone ever successfully use the esp32 with Arduino with a network phy other than the sdk-builtin ones?

Thanks!

Bo

MagnoCube
Posts: 3
Joined: Mon Oct 01, 2018 7:00 am

Re: Arduino ESP32 with KSZ8081 phy

Postby MagnoCube » Mon Oct 01, 2018 7:07 am

Hello Bo,
Soon i will be trying to do the same thing as you tried to do 4 months ago.
I wonder if you have had any progress or hints for me to keep in mind.

Same goes the other way around. If i will manage to get the PHY working i will let you know!

Many thanks,
Stefan

bbreukelen
Posts: 2
Joined: Thu May 31, 2018 7:39 am

Re: Arduino ESP32 with KSZ8081 phy

Postby bbreukelen » Fri Oct 12, 2018 9:54 am

Hi Stefan,

No, I decided to go with another PHY so we changed the hardware.

Good luck,

Bo

MagnoCube
Posts: 3
Joined: Mon Oct 01, 2018 7:00 am

Re: Arduino ESP32 with KSZ8081 phy

Postby MagnoCube » Fri Oct 12, 2018 12:36 pm

I have just received the PCB for testing. I will let you know if i get some results.
(in case you or someone else might need it)

MagnoCube
Posts: 3
Joined: Mon Oct 01, 2018 7:00 am

Re: Arduino ESP32 with KSZ8081 phy

Postby MagnoCube » Tue Jan 08, 2019 11:00 am

Alright, I got everything working. However it is all done in the ESP-idf from Espressif (and not the Arduino core).
Basically i copied the example of the LAN8720 and removed all the setup. (so no internal registers got changed, all stayed on default), and changed all the names to from LAN870 to KSZ8081
Then i changed the PHY-ID to the one specified in the datasheet.

I know this is a dirty workaround. but i had no luck/time to get it done in a nicer way.
The RMII bus still gives an interrupt when the link is up.
Everything works fine, I did not have a single problem regarding Ethernet connection.

I added a image for a more clear picture.
Capture.PNG
Capture.PNG (44.72 KiB) Viewed 517 times
Hope i could help anyone out!

Who is online

Users browsing this forum: No registered users and 5 guests