esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

www220
Posts: 34
Joined: Wed Dec 21, 2016 7:21 am

esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby www220 » Mon Feb 06, 2017 3:36 pm

使用emac时使用了外部的有源晶振,gpio0作为EXT_OSC_CLK,rst重启时总是进入下载模式,如何避免?

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby ESP_Sprite » Tue Feb 07, 2017 1:54 am

Yo will need to make sure the level on GPIO0 is high after reboot, otherwise the ESP32 enable download mode. Are you sure that whatever you have connected to this pin doesn't also pull it low when the ESP32 is reset?

www220
Posts: 34
Joined: Wed Dec 21, 2016 7:21 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby www220 » Tue Feb 07, 2017 5:46 am

gpio0管脚作为50m的emac外部信号输入,50m信号上电就会产生,rst期间可能会被gpio判断为低电平,有其他解决方案吗?比如有什么方法可以强制进入flash.启动模式

Espressif_Kelly
Posts: 8
Joined: Tue Nov 24, 2015 2:19 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby Espressif_Kelly » Tue Feb 07, 2017 7:44 am

Hi,

You can add an external pull-up resistor of GPIO0 to make sure that it won't be pulled down by EXT_OSC_CLK.

If problem still exists, please let us know.

Thanks.

www220
Posts: 34
Joined: Wed Dec 21, 2016 7:21 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby www220 » Tue Feb 07, 2017 9:55 am

该现象不是每次都出现,大概有1/3的机会会进下载模式,接了10k的上拉电阻,效果不明显,上拉阻值多少合适

www220
Posts: 34
Joined: Wed Dec 21, 2016 7:21 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby www220 » Tue Feb 07, 2017 10:11 am

晶振用的是有源晶振,没有示波器不确定波形以及峰谷电压,正常启动后,emac可以工作,晶振频率应该没有问题

www220
Posts: 34
Joined: Wed Dec 21, 2016 7:21 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby www220 » Thu Feb 09, 2017 3:38 am

有解决方案吗?

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby ESP_Sprite » Thu Feb 09, 2017 10:16 am

I'm gonna respond in English; if you cannot understand the explanation because of that please tell me and I will have someone translate it into Chinese.

Just to check if I understand it correctly: You have an external 50MHz clock source and want to feed that signal into GPIO0 to feed the Ethernet MAC inside the ESP32, right? The problem is that GPIO0 on startup also is a bootstrap pin: making it low on reset (power-on, external or RTC watchdog SoC reset) makes the ESP32 boot into UART download mode. With a 50MHz sine applied to this pin, there is a chance this happens inadvertently, as you saw.

Unfortunately, we haven't got a tested way around these issues yet. What you could try is to add a mosfet or something to the GPIO0 line, which normally pulls it high. The gate of the mosfer could then be connected to a different GPIO, so the ESP32 can dis-engage it once it's running.

www220
Posts: 34
Joined: Wed Dec 21, 2016 7:21 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby www220 » Thu Feb 09, 2017 1:38 pm

等待你们官方的emac使用电路吧,时钟信号上面加控制电路,想着都怕怕,原本是问问你们有没有什么其他的手段可以使esp32强制进入flash运行模式,如果只有强制上拉这一条路,那也没有办法 :(

Espressif_Kelly
Posts: 8
Joined: Tue Nov 24, 2015 2:19 am

Re: esp32使用emac时,gpio0作为EXT_OSC_CLK,如何避免进入下载模式

Postby Espressif_Kelly » Mon Feb 13, 2017 3:52 am

Hi,

Please help confirm if GPIO0 is connected to output of the oscillator or clkout of the phy?

You can try to connect GPIO0 to clk output of the oscillator and make enable pin of the oscillator can be controlled by ESP32. When ESP32 is powered on or reset, EN_OSC should be low at first and once applications run, EN_OSC will be pulled high.

Who is online

Users browsing this forum: No registered users and 63 guests