FNET tftp bootloader and RTCS problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FNET tftp bootloader and RTCS problem

跳至解决方案
1,150 次查看
Macias
Contributor I

Hello,

I've a big problem with fnet bootloader and mqx rtcs. After power on at first starts bootloader and next go to specified address to mqx application. In my mqx app I'm using rtcs but after ENET initialize eth interface starts at 10mbit. When I remove fnet bootloader ethernet alway starts at 100mbits.

My uC: MCF52235

Anyone have similar problem?

Please help.

 

Regards,

Maciek

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
720 次查看
butok
NXP Employee
NXP Employee

Hi Maciek,

Just want to point you to the right place in source code that can cause the issue for you. Please look at fnet_mcf_eth.c => fnet_eth_phy_init():

#if FNET_CFG_CPU_MCF52235

/* Disable ANE that causes problems with some routers. Enable full-duplex and 100Mbps */

fnet_fec_mii_read(ethif, FNET_FEC_MII_REG_CR, &reg_value);

fnet_fec_mii_write(ethif, FNET_FEC_MII_REG_CR, (fnet_uint16)(reg_value & (~FNET_FEC_MII_REG_CR_ANE)|FNET_FEC_MII_REG_CR_DPLX|FNET_FEC_MII_REG_CR_DATARATE));

...

#endif

The Kirin2 is the only platform that uses manual set of the PHY speed - selects 100 Mbps operation and disables autonegotioation (cause of HW issues with some version of chips), others platform use auto-negation.

As I know, if to enable auto negotiation for some reason it was autonegotiated to 10Mbps and Half-Duplex. Most probably it not valid any more for newer versions of chip. Why MQX goes to 10Mbs after FNET on Kirin2, I did not check.

Please write me back what register settings helped to you.

Thanks,

Andrey Butok

在原帖中查看解决方案

0 项奖励
回复
2 回复数
721 次查看
butok
NXP Employee
NXP Employee

Hi Maciek,

Just want to point you to the right place in source code that can cause the issue for you. Please look at fnet_mcf_eth.c => fnet_eth_phy_init():

#if FNET_CFG_CPU_MCF52235

/* Disable ANE that causes problems with some routers. Enable full-duplex and 100Mbps */

fnet_fec_mii_read(ethif, FNET_FEC_MII_REG_CR, &reg_value);

fnet_fec_mii_write(ethif, FNET_FEC_MII_REG_CR, (fnet_uint16)(reg_value & (~FNET_FEC_MII_REG_CR_ANE)|FNET_FEC_MII_REG_CR_DPLX|FNET_FEC_MII_REG_CR_DATARATE));

...

#endif

The Kirin2 is the only platform that uses manual set of the PHY speed - selects 100 Mbps operation and disables autonegotioation (cause of HW issues with some version of chips), others platform use auto-negation.

As I know, if to enable auto negotiation for some reason it was autonegotiated to 10Mbps and Half-Duplex. Most probably it not valid any more for newer versions of chip. Why MQX goes to 10Mbs after FNET on Kirin2, I did not check.

Please write me back what register settings helped to you.

Thanks,

Andrey Butok

0 项奖励
回复
720 次查看
Luis_Garabo
NXP TechSupport
NXP TechSupport


Hi Maciek,

It looks like FNET is modifying the registers for the internal PHY in the MCF52235. I am 99% sure that MQX leaves those registers by default. My recomendation is to review the reference manual for the MCF52235. Identify the PHY registers and then look into the FNET code and see where it is modifying these registers.

I hope this helps you.

Best Regards,

Garabo