Hi
I think is is related to noise and a 50 MHz oscillator for the EMAC.
I use a ESP32 WROOM with an external 50 MHz oscillator.
I use the IO33 from the ESP32 to enable the PHY and the oscillator. The IO0 is used for EMAC clock in
But as soon I enable the oscillator and PHY, setting IO33 high, the jtag interface stops working.
It happen in the reset_hw function of the PHY (ksz80xx_reset_hw)
As long the oscillator is enabled (sending as clock) jtag fails. As soon it is disabled the jtag runs agian.
Is this related to noise?
Thomas
Enabling EMAC clock makes jtag stop
-
- Posts: 208
- Joined: Fri May 07, 2021 10:35 am
Re: Enabling EMAC clock makes jtag stop
Hi Thomas,
could you please provide more details about your HW design (schematics)?
Thanks
Ondrej
could you please provide more details about your HW design (schematics)?
Thanks
Ondrej
Re: Enabling EMAC clock makes jtag stop
Hi
From ksz80xx_reset_hw
From ksz80xx_reset_hw
Code: Select all
static esp_err_t ksz80xx_reset_hw(esp_eth_phy_t *phy)
{
/* esp_rom_gpio_pad_select_gpio(0);
gpio_set_direction(0, GPIO_MODE_INPUT);*/
phy_ksz80xx_t *ksz80xx = __containerof(phy, phy_ksz80xx_t, parent);
if (ksz80xx->reset_gpio_num >= 0) {
esp_rom_gpio_pad_select_gpio(ksz80xx->reset_gpio_num);
gpio_set_direction(ksz80xx->reset_gpio_num, GPIO_MODE_OUTPUT);
gpio_set_level(ksz80xx->reset_gpio_num, 0);
esp_rom_delay_us(100); // insert min input assert time
gpio_set_level(ksz80xx->reset_gpio_num, 1); // Here the jtag stops working.
-
- Posts: 208
- Joined: Fri May 07, 2021 10:35 am
Re: Enabling EMAC clock makes jtag stop
Thanks for the schematics. I saw your other posts and you had some issues with ESP32 EMAC. It seemed there was some problem with RMII REF CLK. Have you already resolved this issue?
-
- Posts: 208
- Joined: Fri May 07, 2021 10:35 am
Re: Enabling EMAC clock makes jtag stop
Regarding your JTAG problem. I think it is caused by a fact that JTAG TCK and ETH_RXER are both connected. Therefore when you enable RMII REF CLK, the KSZ8081 is "enabled" and pulls down ETH_RXER because there is no RX error and you lost JTAG TCK... Try to de-solder R12. ETH_RXER is not used by ESP-IDF drivers anyway so it can be left unconnected.
Re: Enabling EMAC clock makes jtag stop
Hi
That did the trick. Now it all works, thanks
Yes, the RMII clock is also solved. There where some other electrical issues with wrong resistor values etc.
Thomas
That did the trick. Now it all works, thanks
Yes, the RMII clock is also solved. There where some other electrical issues with wrong resistor values etc.
Thomas
Who is online
Users browsing this forum: No registered users and 37 guests