EMAC receive not working
Re: EMAC receive not working
Success on LAN8720 as well. Lack of CRS/DV was due to non-populated resister R10 on the eval board which is inline between phy and CRS pin on rmii connector. Once I populated that resister, it all just worked.
Rudy, I had already used the mapping of GPIO27 to EMAC_RX_DV in the example but went back and took it out. Turns out that mapping is the default so it is not needed.
So current status is TLK110 and LAN8720 working and ESP32 pingable.
I'll do a pull request on the changes to make the 8720 work.
Robin
Rudy, I had already used the mapping of GPIO27 to EMAC_RX_DV in the example but went back and took it out. Turns out that mapping is the default so it is not needed.
So current status is TLK110 and LAN8720 working and ESP32 pingable.
I'll do a pull request on the changes to make the 8720 work.
Robin
Re: EMAC receive not working
hi robin, hi www220RobinC wrote:Success on LAN8720 as well. Lack of CRS/DV was due to non-populated resister R10 on the eval board which is inline between phy and CRS pin on rmii connector. Once I populated that resister, it all just worked.
Rudy, I had already used the mapping of GPIO27 to EMAC_RX_DV in the example but went back and took it out. Turns out that mapping is the default so it is not needed.
So current status is TLK110 and LAN8720 working and ESP32 pingable.
I'll do a pull request on the changes to make the 8720 work.
Robin
yeap GPIO27 not need.
yes confirm, TLK110 and LAN8720 working and ESP32 pingable.
ok, have closed the request - we have done byself
hey guys - this was a nice teamwork now.
missed three register to set.
Too tired this morning of the long night,
Wanted to make it after lunch,
Www220 was faster
@www220
i use the SW reset, your HW Reset is fine ( perhabs change in my code too to this )
Now we can work on this
now we go lwip examples telnet shell, http and so on?
try just in time to build a callback/function for check packets ect
and want response on a udp or tcp or "fossil"
btw: we have transparent WiFi Hotspot now
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
rudi,搞定gpio的ext_clk或者gpio16的clk_out,论坛里面发个帖子,emac就差这么点了
Re: EMAC receive not working
hi www220,www220 wrote:rudi,搞定gpio的ext_clk或者gpio16的clk_out,论坛里面发个帖子,emac就差这么点了
just in time with LAN8720 there is a 50 MHz clk on board.
on tlk110 eval board from TI there is a 25 MHz on Board ( MII )
to use the tlk110 board with RMII we must change the onboard clk to 50 MHz
i would really much more work on GPIO16 and get from this the clk sig
but we must wait for a solution from esp guys / digital guys.
srcESP_igrr wrote: Regarding the second question about Ethernet clock output, be sure that we saw your question, and we'll let you know as soon as we figure this out. IIRC, we may have to use the APLL to generate the 50MHz clock for the Ethernet.
stateprojectgus wrote: Please be patient. As mentioned in other places, we don't have a good answer for this yet but we want to give you (and other Ethernet PHY users) one.
hope this helps.
and thank you for the missing register and values!
after change the register, the ping was done by help from you, thank you!
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
Hi Rudi. The 50MHz oscillator on the lan8720 eval board is there but not used. The onboard 25MHz crystal is used and the 8720 has the functionality to double the clock for it's reference and output so that a cheap crystal can be used.
I did have to remove the 25MHz crystal and add a 50MHz oscillator to the tlk110 eval board.
Robin
I did have to remove the 25MHz crystal and add a 50MHz oscillator to the tlk110 eval board.
Robin
Re: EMAC receive not working
hi robinRobinC wrote:Hi Rudi. The 50MHz oscillator on the lan8720 eval board is there but not used. The onboard 25MHz crystal is used and the 8720 has the functionality to double the clock for it's reference and output so that a cheap crystal can be used.
I did have to remove the 25MHz crystal and add a 50MHz oscillator to the tlk110 eval board.
Robin
studdy just in time the same theme with further eth phy
there is the same functionally there, the 50 MHz would activate by register and the ref clk 50MHz comes
i think - so we need the generated clk by gpio16 not - and we can use the 25 MHz clk.
just in time studdy and compare datasheets from more eth phys
do you know KSZ8081RNAZA ?
best wishes
rudi
btw:
PR, well done!
- Attachments
-
- 25_50.png (42.59 KiB) Viewed 16143 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
RobinC wrote:Hi Rudi. The 50MHz oscillator on the lan8720 eval board is there but not used. The onboard 25MHz crystal is used and the 8720 has the functionality to double the clock for it's reference and output so that a cheap crystal can be used.
I did have to remove the 25MHz crystal and add a 50MHz oscillator to the tlk110 eval board.
Robin
Hi Robin
good news you get here
now we try to clk the RMII over the gpio16
gpio 16 has now 50 MHz refere´r
bingo !
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: EMAC receive not working
Very cool Rudi. How are you generating the clock?
Re: EMAC receive not working
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);
..
Code: 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:
Code: 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
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Who is online
Users browsing this forum: No registered users and 63 guests