EMAC receive not working
Re: EMAC receive not working
to do on Olimex ESP32 EVB REV-A
with LAN8710A
have not remove RM3
have cut the “pullup” line between LAN8710A and RM3
so we can use the “pullup” later for other gpio by connect on the pin
steps:
we must
1) cut RM3 single line (LAN8710A) CRS_DV pulled up node
2) remove R21 ( pulled up )
3) cut GPIO18 line (backside ) from RM3 (LAN8710A CRS_DV) line
4) connect on header 19(“CRS_DV”) ,26(“I2C_SDA”) by wire
pics:
====
before cut RM3 single line
and here steps
controll:
you will see only a fine cut on the RM3 sinlge line
R21 was removed
GPIO18
we can use it later by connect a wire and connect to a pinheader pin
so we save the gpio18 for later. we can connect the gpio18
then on backside where we cut the line from CRS_DV
this node to GPIO18 has also disturbed
now i will remove the flying osz and
i will use “GPIO16” as int CLK again and
will update infos here at weekend
best wishes
rudi
with LAN8710A
have not remove RM3
have cut the “pullup” line between LAN8710A and RM3
so we can use the “pullup” later for other gpio by connect on the pin
steps:
we must
1) cut RM3 single line (LAN8710A) CRS_DV pulled up node
2) remove R21 ( pulled up )
3) cut GPIO18 line (backside ) from RM3 (LAN8710A CRS_DV) line
4) connect on header 19(“CRS_DV”) ,26(“I2C_SDA”) by wire
pics:
====
before cut RM3 single line
and here steps
controll:
you will see only a fine cut on the RM3 sinlge line
R21 was removed
GPIO18
we can use it later by connect a wire and connect to a pinheader pin
so we save the gpio18 for later. we can connect the gpio18
then on backside where we cut the line from CRS_DV
this node to GPIO18 has also disturbed
now i will remove the flying osz and
i will use “GPIO16” as int CLK again and
will update infos here at weekend
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
Good details Rudi. Guess Olimex needs to do a new spin on the board.
Robin
Robin
Re: EMAC receive not working
Made a little "ESP32 Etherbase" ethernet proto board for the devkit-c. Working well with the LAN8720A.
Robin
Robin
- Attachments
-
- IMG_0644.JPG (2.37 MiB) Viewed 22245 times
-
- IMG_0641.JPG (2.2 MiB) Viewed 22245 times
Re: EMAC receive not working
使用了lan8720+外部晶振?如何避免gpio0进入下载模式的?
Re: EMAC receive not working
Yes, lan8720 with 50Mhz crystal. I use GPIO17 from the stock master tree used in phy_device_power_enable() to connect to the enable pin on the crystal. I also had to add a 100 ohm resister between the crystal and the ESP32 to prevent current drain that lowered the clock voltage.
Robin
Robin
Re: EMAC receive not working
rtc_plla_ena(1, 1, 0, 0, 0); // 50 MHzrudi ;-) wrote:hi robinRobinC wrote:Very cool Rudi. How are you generating the clock?
try this:Code: Select all
.. #include "soc/emac_ex_reg.h" extern void rtc_plla_ena(bool ena, uint32_t sdm0, uint32_t sdm1, uint32_t sdm2, uint32_t o_div); ..
think there is a small mistake in the paramsCode: Select all
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO16_U, FUNC_GPIO16_EMAC_CLK_OUT); REG_SET_FIELD(EMAC_EX_CLKOUT_CONF_REG, EMAC_EX_CLK_OUT_H_DIV_NUM, 0); REG_SET_FIELD(EMAC_EX_CLKOUT_CONF_REG, EMAC_EX_CLK_OUT_DIV_NUM, 0); REG_CLR_BIT(EMAC_EX_CLK_CTRL_REG, EMAC_EX_EXT_OSC_EN); REG_SET_BIT(EMAC_EX_CLK_CTRL_REG, EMAC_EX_INT_OSC_EN);
but try this:
best wishesCode: Select all
// f_out = f_xtal * (sdm2 + 4) / (2 * (o_div + 2)) // = 40.000.000,00 * (1 + 4) / (2 * ( 0 + 2) ) // = 40.000.000,00 * ( 5) / (2 * ( 2) ) // = 40.000.000,00 * ( 5) / (4 ) // = 200.000.000,00 / ( 4 ) // = 50.000.000,00 // = 50 MHz // param0= ena // param1=smd2 // param2=o_div // param3=? // param4=? rtc_plla_ena(1, 1, 0, 0, 0); // 50 MHz // rtc_plla_ena(1, 5, 1, 0, 0); // 60 MHz // rtc_plla_ena(1, 0, 2, 0, 0); // 20 MHz ( glass clear)
rudi
这个函数一直卡死无法返回,不知道原来测试时需要修改其他地方的代码吗?
Re: EMAC receive not working
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
就是按照这个写的,现在是apll使能失败,不知道是不是使用了新版本的idf的缘故,现在我用的idf2.0rudi ;-) wrote:@www220
hope this helps
https://esp32.com/viewtopic.php?start=20&t=813#p6100
best wishes
rudi
Re: EMAC receive not working
/* wait for calibration end */
while (!(I2C_READREG_MASK_RTC(I2C_APLL, I2C_APLL_OR_CAL_END))) {
/* use ets_delay_us so the RTC bus doesn't get flooded */
ets_delay_us(1);
}
这个循环一直跳不出去
while (!(I2C_READREG_MASK_RTC(I2C_APLL, I2C_APLL_OR_CAL_END))) {
/* use ets_delay_us so the RTC bus doesn't get flooded */
ets_delay_us(1);
}
这个循环一直跳不出去
Who is online
Users browsing this forum: No registered users and 64 guests