K60 Ethernet driver documentation

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

K60 Ethernet driver documentation

997 Views
marlonsmith
Contributor IV

Hi,

I'm writing an ethernet driver for the K60 chip on custom hardware with an external PHY.  Looking through the user guide, there is practically no documentation on how to use the fifo.  After looking through the forums, I've realized I need to create my own tx and rx fifos, but I still don't know how to use them.  Do I need to manage them like circular buffers manually?  Does transmission really start as soon as I place data in the fifo like the user guide says?

Does anyone know if there is any documentation that explains how to create and use the fifos in greater detail?

Thanks!

Marlon

0 Kudos
2 Replies

602 Views
mjbcswitzerland
Specialist V

Hello Marlon

The User Manual includes all details needed to use the Ethernet - study the "Buffer Decriptor" section.

The buffer descriptor are essentially used one after the other and form a circular buffer as you state.

Transmission starts when the ownership of the buffer has been passed to the controller (READY_TX set in the tx control buffer) and the TDAR_TDAR flag is written.

I have attached the Ethernet driver file from the uTasker project which shows you how to configure the controller, various external PHYs and multicast (for IPv6 link local and IGMP). Full project code, including Keil, is available at http://www.utasker.com/forum/index.php?topic=1721.0 including TCP/IP IPv4/IPv6 stack and the uTasker K60 simulator, which will allow you to simulate the K60's Ethernet operation in real-time (including its DMA, interrupt and Ethernet buffer descriptor use) in case you want to learn full details in the most efficient way.

Note also that there are some Ethernet erratas that need to be considered - these are worked around in the referenced code but if you want to re-code things from scratch again you will need to beware of these.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

K60: http://www.utasker.com/kinetis/TWR-K60N512.html / http://www.utasker.com/kinetis/TWR-K60D100M.html / http://www.utasker.com/kinetis/TWR-K60F120M.html

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

0 Kudos

602 Views
marlonsmith
Contributor IV

Hi Mark,

Thanks very much for the detailed answer!  The datasheet for the TI chip I used previously contained simple steps to set up and use the MAC, I was just finding it frustrating with the Freescale user guide as I have to dig through tons of register definitions to figure out how to use it.

I'll look through the code you provided.  The current problem I'm having is that after setting the ready bit in the buffer descriptor and the TDAR flag, there is no activity on the RMII interface.

Marlon

0 Kudos