Page 1 of 1

KSZ8863RLL Switch & ESP-32

Posted: Thu Oct 31, 2019 1:27 pm
by krajaan
Hi,

I have a PCB with a 3-port ethernet switch KSZ8863RLL (http://ww1.microchip.com/downloads/en/D ... 02335B.pdf) and an esp32 WROVER connected to it via RMII and MDIO interface, and I need to establish an internet connection with the esp. The switching itself is working by default. By connecting a computer to Port 2 of the switch and Port 1 to an external switch, the computer correctly receives an IP from a DHCP server and is connected to the internet.

However, the esp cannot obtain an IP address. By using a logic analyzer to view the activity on the RMII pins, I am able to see that there is periodic traffic on the EMAC TXD0 and TXD1 pins of the esp. More specifically, the esp transmits something exactly every 15 seconds, but I am unable to find what this interval means or what the data it is trying to transmit is. In the end, a DHCP Discover/Request by the esp never reaches the DHCP server, although tcpip_adapter is initialised and DHCP client started (confirmed via log output).

Does anyone have experience with switches and can point me in the right direction?

Re: KSZ8863RLL Switch & ESP-32

Posted: Tue Nov 05, 2019 2:04 pm
by krajaan
Solved it.

Bit 3 of register 198 was set to default value 0, which selects an external clock for P3 RMII clock. Because we use the internal clock, it needed to be set to 1. This solved our problem.

Re: KSZ8863RLL Switch & ESP-32

Posted: Sun Feb 02, 2020 1:03 pm
by skteh76
Hello krajaan,

Currently I'm working with KSZ8863RLL as Ethernet switch with ESP32 too.
Previously, I have used LAN8720A as Ethernet Phy and the clocking is following the reference design provided by sautter https://sautter.com/blog/ethernet-on-es ... g-lan8720/
The design is using external oscillator due to GPIO0 (EMAC_TX_CLK) bootstrap condition.
Would you mind sharing how the clocking is setup in your case for the ethernet?
Were you using external oscillator or configure KSZ8863RLL to generate the 50MHz?
If using KSZ8863RLL to generate it, how to avoid the clock from causing the GPIO0 fail in bootstrap condition?

Thank you,