FNET tftp bootloader and RTCS problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FNET tftp bootloader and RTCS problem

Jump to solution
1,140 Views
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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
710 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
711 Views
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 Kudos
Reply
710 Views
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