MK60 and Ethernet Bus Error

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

MK60 and Ethernet Bus Error

2,681 Views
hemant2007
Contributor I

Hello All , I am Using MK60 MCU with ethernet. My physical interface is working with LAN8720. But MAC interface gives ethernet bus error when I tried to port LWIP stack. Can anyone please suggest solution or way to find solution?

Why Ethernet Bus Error occurs ? How to avoid it ?

EBERR bit is set .... How to avoid it?

Labels (1)
0 Kudos
Reply
6 Replies

1,949 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Hemant,

ENET_EIR[EBERR] is set when there is a system bus error during uDMA transfer, in such possible cases as when the ENET tries to fetch data from memory and it appears that this memory is still protected by the MPU (i.e., this memory is not accessible by ENET) and hence EBERR (bus error) is generated by ENET. Try to disable the Memory Protection Unit by setting VLD bit of MPU_CESR to 0 and re-run the test.

BTW, why not try KSDK 1.2? There is a ready port LwIp for MK60D100M in it.


Have a great day,
Kan

Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,949 Views
hemant2007
Contributor I

thanks Kan !

I tried by settings VLD bit of MPU_CESR to 0 and re-run the test but I faced same problem Can you suggest some other solution?

0 Kudos
Reply

1,949 Views
mjbcswitzerland
Specialist V

Hi Hermant

Check the memory aligment of the buffer descriptors and LAN  (some need 16 byte and some 512 byte aligment).

Also check out the uTasker K60 project µTasker Kinetis TWR-K60N512 support  which contains an integrated IPv4/v6 stack - it allows the K60 and its board to be simulated in real-time, including Ethernet operation.

Its Kinetis Ethernet driver includes KSZ8031, KSZ8051, KSZ8081RNA, DP83849I, KSZ8041NL and KSZ8863 PHY support built in (other references available are DP83848, LAN8700, LAN8720, KS8721, KS8721B, ST802RT1B, DM9161AE, RTL8201E, Am79C875VC) and other PHY are simple to add (about 15 minutes work in the simulator). Plus it allows adding further SPI based ENC424J600 Ethernet interfaces and multi-homed network support.

Completely free for non-commercial work, but fully supported here or at its own forum.

Regards

Mark

Kinetis: µTasker Kinetis support

K60: µTasker Kinetis TWR-K60N512 support  / µTasker Kinetis TWR-K60D100M support  / µTasker Kinetis TWR-K60F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos
Reply

1,949 Views
hemant2007
Contributor I

I want to ask whether architecture of ENET peripheral in K60 MCU is Little Endian or Big Endian ?

0 Kudos
Reply

1,949 Views
mjbcswitzerland
Specialist V

Hermant

The buffer descriptors operate in big-endian mode by default.

However, if the enhanced mode of operation is used (advisable also due to checksum offloading features that make the operation much more efficient) the ETHER_DBSWP bit in ECR can be set and then the buffer descriptors operate in little-endian mode. Little-endian mode is more suitable to the Kinetis core and avoids having to convert addresses to big-endian.

Regards

Mark

Kinetis: µTasker Kinetis support

K60: µTasker Kinetis TWR-K60N512 support  / µTasker Kinetis TWR-K60D100M support  / µTasker Kinetis TWR-K60F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos
Reply

1,949 Views
hemant2007
Contributor I

Thanks Mark!!

I want to ask why Babbling Receive Error bit is set? How to avoid it ?

0 Kudos
Reply