|
From: | marcus |
Subject: | Re: [lwip-users] Ethernet package through SPI interface |
Date: | Tue, 8 Mar 2016 02:01:30 -0700 (MST) |
Hi Sir :
I really appreciate all of your reply!
Now, I can transmit package through SPI interface to my server.
Thanks for your help!
Best regards,
Marcus
From: Ajay Bhargav [via lwIP] [mailto:ml-node+[hidden email]]
Sent: Tuesday, March 08, 2016 9:50 AM
To: MARCUS.LU 呂昀駿
Subject: Re: Ethernet package through SPI interface
Hi,
Microchip’s Enc28j60 is another example of spi Ethernet controller and is used widely. You can also easily get a sample driver on GitHub or available drivers
list of LwIP. That can be a good start for a reference driver.
Regards,
Ajay Bhargav
From:
[hidden email]
Sent: Sunday, March 6, 2016 6:49 PM
To: [hidden email]
Subject: Re: [lwip-users] Ethernet package through SPI interface
Simon,
Sorry to jump in. I think what you wrote needs some clarification to those that do not understand it in full.
In a normal Ethernet connection we have the ETH connector from one side and the micro or TCP stack on the other side.
From the ETH connector it is connected to a transformer, normally referred to as the "magnetics", from
the magnetics it is connected to the ETH PHY or ETH switch with a PHY interface, from the PHY or switch it is connected
to the micro via RMII/MII Interface.
It may be connected differently if you have a none standard PHY or some other interface.
The ETH PHY is connected from one side to the magnetics and from the other side it has a MAC interface.
The interface is either via RMII/MII while control of the PHY is via MDIO/SIO etc...
At the micro side normally the MAC interface has DMA and MDIO.
The ETH driver on the micro side handles the setting of the MAC interface / settings (speed, duplex etc...)
All the above is not related to MAC address but rather the interface only.
LwIP or any other TCP stack need to read/or data to/from the MAC interface. This is the hardware driver that connects
the LwIP with the hardware.
If one wants to run LwIP over RS232, SPI or any other interface it simply needs to write the driver that gives LwIP the
ability to read/write data to/from that interface.
If one connects LwIP to SPI (for example) as the interface the MAC interface is NOT used. There is a need for a driver for
SPI to LwIP (data read/wright) and a driver or some code to initialize the SPI.
For example:
http://ww1.microchip.com/downloads/en/DeviceDoc/ksz8851snl_ds.pdf
The above link is for a microchip PHY that has an SPI interface rather than the common ETH MAC interface.
As one can see that from one side it has an SPI interface and from the other side it has 4 differential lines to be connected
to the ETH magnetics.
I hope now it is clear :-)
BR,
Noam.
-----Original Message-----
From: lwip-users-bounces+noam=[hidden email] [mailto:lwip-users-bounces+noam=[hidden
email]] On Behalf Of
[hidden email]
Sent: Sunday, March 06, 2016 2:52 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Ethernet package through SPI interface
SergeV wrote:
> I several times came across references that SPI is used in place of
> RMII, to communicate over LAN. Frankly I'm in doubt this is possible
> at all
You're not interfacing the LAN through SPI (BTW, you're not doing that with RMII, either, you interface the PHY). Instead, you interface a MAC through SPI when
your uC does not have one (or you need to use a different one). This MAC then connects to the LAN - either directly or through a PHY.
Simon
_______________________________________________
lwip-users mailing list
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
If you reply to this email, your message will be added to the discussion below:
http://lwip.100.n7.nabble.com/Ethernet-package-through-SPI-interface-tp25669p25986.html
To unsubscribe from Ethernet package through SPI interface,
click here.
NAML
************************************************************************* This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. [Delta Electronics, INC. Taiwan] ************************************************************************* |
[Prev in Thread] | Current Thread | [Next in Thread] |