EmbeddedRelated.com
Forums

Embedded Ethernet

Started by pozz September 22, 2017
There are many MCUs with embedded Ethernet (MAC). It seems most of the 
open-source examples are lwip-based.

I have to design a board with one RS485 port and one Ethernet port. It 
could be seen as a serial-to-Ethernet converter, where the protocol on 
RS485 is proprietary. On Ethernet side I will contact a server (cloud) 
with a protocol that must be defined.

At the moment, I don't need to implement a server, only a simple client.

Do you suggest some hw/fw platforms that you think are better than others?
Il 22/09/2017 17:52, pozz ha scritto:
> There are many MCUs with embedded Ethernet (MAC). It seems most of the > open-source examples are lwip-based. > > I have to design a board with one RS485 port and one Ethernet port. It > could be seen as a serial-to-Ethernet converter, where the protocol on > RS485 is proprietary. On Ethernet side I will contact a server (cloud) > with a protocol that must be defined. > > At the moment, I don't need to implement a server, only a simple client. > > Do you suggest some hw/fw platforms that you think are better than others?
something based on wiznet chips ? I think there is some ready solution from them
On 22/09/17 17:52, pozz wrote:
> There are many MCUs with embedded Ethernet (MAC). It seems most of the > open-source examples are lwip-based.
Yes - LWIP is very popular, and works well.
> > I have to design a board with one RS485 port and one Ethernet port. It > could be seen as a serial-to-Ethernet converter, where the protocol on > RS485 is proprietary. On Ethernet side I will contact a server (cloud) > with a protocol that must be defined. > > At the moment, I don't need to implement a server, only a simple client. > > Do you suggest some hw/fw platforms that you think are better than others?
We have used Kinetis K64F, with LWIP. But a lot will depend on the other features you need, speed, development resources, etc. Don't skimp on the ram size for the microcontroller you get - it's a lot easier to use big buffers than to try to fine-tune them to exactly what you think you need.
On Fri, 22 Sep 2017 17:52:01 +0200, pozz wrote:

> There are many MCUs with embedded Ethernet (MAC). It seems most of the > open-source examples are lwip-based. > > I have to design a board with one RS485 port and one Ethernet port. It > could be seen as a serial-to-Ethernet converter, where the protocol on > RS485 is proprietary. On Ethernet side I will contact a server (cloud) > with a protocol that must be defined. > > At the moment, I don't need to implement a server, only a simple client. > > Do you suggest some hw/fw platforms that you think are better than others?
How are you connecting to this "cloud" server? Simple TCP or UDP or is it some type of web services? What are your encryption requirements? What type of processing power do you need for this protocol to be defined? What ethernet speed do you need / want? What is your power budget? -- Chisolm Republic of Texas
Il 22/09/2017 20:31, Joe Chisolm ha scritto:
 > On Fri, 22 Sep 2017 17:52:01 +0200, pozz wrote:
 >
 >> There are many MCUs with embedded Ethernet (MAC). It seems most of the
 >> open-source examples are lwip-based.
 >>
 >> I have to design a board with one RS485 port and one Ethernet port. It
 >> could be seen as a serial-to-Ethernet converter, where the protocol on
 >> RS485 is proprietary. On Ethernet side I will contact a server (cloud)
 >> with a protocol that must be defined.
 >>
 >> At the moment, I don't need to implement a server, only a simple client.
 >>
 >> Do you suggest some hw/fw platforms that you think are better than 
others?
 >
 > How are you connecting to this "cloud" server?  Simple TCP or UDP or 
is it
 > some type of web services?
I can choose. I know UDP is much smaller than TCP, but I should add some 
TCP-features on top of UDP: mainly ack and retransmissions. So I can 
argue TCP is overall better than UDP.

 > What are your encryption requirements?
Another question? ;-)


 > What type of processing power do you need for this protocol to be 
defined?
"processing power for the protocol"? It should be very simple, maybe 
MQTT. I would avoid HTTP.


 > What ethernet speed do you need / want?
I think this depends only to the PHY used... right?


 > What is your power budget?
No problem.


I usually use Atmel/Microchip SAM Cortex-M MCUs. I saw SAM E70 and 
similar devices. They have an internal MAC controller with RMII 
interface for external PHY. There are some examples with lwip.

Is there an RJ45 connector with integrated magnetics and PHY in order to 
reduce PCB space? I don't think there MCUs with integrated MAC+PHY.
pozz wrote:
> There are many MCUs with embedded Ethernet (MAC). It seems most of > the open-source examples are lwip-based. > > I have to design a board with one RS485 port and one Ethernet port. > It could be seen as a serial-to-Ethernet converter, where the > protocol on RS485 is proprietary.
You mean the bits on the wire? RS485 is RS485 because it's an actual standard.
> On Ethernet side I will contact a > server (cloud) with a protocol that must be defined. > > At the moment, I don't need to implement a server, only a simple > client. > > Do you suggest some hw/fw platforms that you think are better than > others?
Can you use a USB to Ethernet converter? It won't be very fast but it'll be Ethernet. -- Les Cargill
> Is there an RJ45 connector with integrated magnetics and PHY in order to
Plenty. MC001515 MC001514 JXD2-0010NL LMJ2138814S0L1T1C and many more...
> reduce PCB space? I don't think there MCUs with integrated MAC+PHY.
TM4C129X family from TI Wiznet W7500
sâmbătă, 23 septembrie 2017, 08:38:18 UTC+3, raimond....@gmail.com a scris:
> > Is there an RJ45 connector with integrated magnetics and PHY in order to > > Plenty. > > MC001515 > MC001514 > JXD2-0010NL > LMJ2138814S0L1T1C > and many more... > > > reduce PCB space? I don't think there MCUs with integrated MAC+PHY. > > TM4C129X family from TI > Wiznet W7500
I mean W7500P whith the "P" standing for "PHY".
On 23/09/17 00:01, pozz wrote:
> Il 22/09/2017 20:31, Joe Chisolm ha scritto: > > On Fri, 22 Sep 2017 17:52:01 +0200, pozz wrote: > > > >> There are many MCUs with embedded Ethernet (MAC). It seems most of the > >> open-source examples are lwip-based. > >> > >> I have to design a board with one RS485 port and one Ethernet port. It > >> could be seen as a serial-to-Ethernet converter, where the protocol on > >> RS485 is proprietary. On Ethernet side I will contact a server (cloud) > >> with a protocol that must be defined. > >> > >> At the moment, I don't need to implement a server, only a simple > client. > >> > >> Do you suggest some hw/fw platforms that you think are better than > others? > > > > How are you connecting to this "cloud" server?  Simple TCP or UDP or > is it > > some type of web services? > I can choose. I know UDP is much smaller than TCP, but I should add some > TCP-features on top of UDP: mainly ack and retransmissions. So I can > argue TCP is overall better than UDP.
You certainly /can/ argue that! TCP/IP has many advantages over UDP. The key ones are that it saves you worrying about reinventing the wheel here. With UDP, you never know if your data got transferred - so you need application layers to handle that. With TCP/IP, you know that either the data is transferred correctly, or you end up with a timeout and broken connection. It keeps it a lot simpler. Also, TCP/IP is /far/ easier and more reliable when you have routing, firewalls, VPNs, ssh tunnels, and all the other types of connections that make IP networking so flexible and fun. So use UDP if you need an absolute minimal system with minimal traffic and latencies, but within a simple local LAN only. Otherwise, go for TCP/IP.
> > > What are your encryption requirements? > Another question? ;-) > > > > What type of processing power do you need for this protocol to be > defined? > "processing power for the protocol"? It should be very simple, maybe > MQTT. I would avoid HTTP. > > > > What ethernet speed do you need / want? > I think this depends only to the PHY used... right? >
No, you need a MAC that handles the speed, as well as the PHY. The MAC is usually in the microcontroller. For most flash-based microcontrollers, MAC speeds will be 100 Mbit - Gbit MACs are more common on bigger and faster embedded processors. If you are thinking bare metal or FreeRTOS, you are probably thinking 100 Mbit - if you want Gbit, you are probably thinking Linux. Obviously you will also need a faster processor for Gbit to make sense. (There is no problem using 100 Mbit devices on an otherwise Gbit network.)
> > > What is your power budget? > No problem. > > > I usually use Atmel/Microchip SAM Cortex-M MCUs. I saw SAM E70 and > similar devices. They have an internal MAC controller with RMII > interface for external PHY. There are some examples with lwip. >
That will probably be fine. I haven't use Atmel's ARM devices, but I believe they are a perfectly reasonable choice.
> Is there an RJ45 connector with integrated magnetics and PHY in order to > reduce PCB space? I don't think there MCUs with integrated MAC+PHY.
You want the MAC inside the MCU. But you want an external PHY unless you are desperate for board space. There are a few MCU's with internal PHY's, but these cost more than separate chips and have poorer performance (power, speed, etc.). Basically, the type of die stackup you want for an MCU and a MAC is geared towards fast, low-power digital switching. But the PHY is quite high power and analogue, and is best done with a different die stackup and feature size. Thus if you put both on the same die, you have serious compromises. External PHY's can be very small, if you can handle the package types. RJ45 with magnetics and LEDs are easily available. They cost a little more than separate parts, but not much more.
On 09/23/2017 06:02 AM, David Brown wrote:
> On 23/09/17 00:01, pozz wrote: >> Il 22/09/2017 20:31, Joe Chisolm ha scritto: >>  > On Fri, 22 Sep 2017 17:52:01 +0200, pozz wrote: >>  > >>  >> There are many MCUs with embedded Ethernet (MAC). It seems most of >> the >>  >> open-source examples are lwip-based. >>  >> >>  >> I have to design a board with one RS485 port and one Ethernet >> port. It >>  >> could be seen as a serial-to-Ethernet converter, where the >> protocol on >>  >> RS485 is proprietary. On Ethernet side I will contact a server >> (cloud) >>  >> with a protocol that must be defined. >>  >> >>  >> At the moment, I don't need to implement a server, only a simple >> client. >>  >> >>  >> Do you suggest some hw/fw platforms that you think are better than >> others? >>  > >>  > How are you connecting to this "cloud" server?  Simple TCP or UDP >> or is it >>  > some type of web services? >> I can choose. I know UDP is much smaller than TCP, but I should add >> some TCP-features on top of UDP: mainly ack and retransmissions. So I >> can argue TCP is overall better than UDP. > > You certainly /can/ argue that!  TCP/IP has many advantages over UDP. > The key ones are that it saves you worrying about reinventing the wheel > here.  With UDP, you never know if your data got transferred - so you > need application layers to handle that.  With TCP/IP, you know that > either the data is transferred correctly, or you end up with a timeout > and broken connection.  It keeps it a lot simpler.
One issue is that (iirc) TCP's 'guarantee' uses only a 16-bit checksum, which might not be long enough for high speed data on less than stellar connections. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net