Page 1 of 1

STM32F4 and ethernet (using enc28j60)

Posted: Sat Jan 18, 2014 3:41 am
by roli
Hi!
I am newbie when it comes to embedded development and I've recently moved from Arduino to an STM32F4 (discovery). And it's been fun until now. I've been trying to add ethernet support to my project for the past few days without luck. I've been using FreeRTOS until now and some research has shown that it has terrible networking support. A lot of googling suggested that I try Chibi OS instead.

Of course I want to be sure before I lose another few days of my time. So basic questions: Does the Chibi Os port for the STM32F4 include all the networking stuff? Does it support enc28j60 out of the box? And if not - what it missing? And of course - did anyone actually implement this before and can save me some time?

Re: STM32F4 and ethernet (using enc28j60)

Posted: Sat Jan 18, 2014 9:37 am
by Giovanni
Hi,

ChibiOS includes networking, there are several demos of ChibiOS with lwIP. On the STM32F4 the networking is done using the internal MAC unit, there is no need of an enc28j60 just an external PHY.

The Discovery board does not have the PHY, you may consider getting something like this one: https://www.olimex.com/Products/ARM/ST/ ... e-hardware

Giovanni

Re: STM32F4 and ethernet (using enc28j60)

Posted: Sat Jan 18, 2014 1:01 pm
by roli
Great.
But I already have the discovery board and the enc28j60 so I would really love to put these two things together. So is there any way to easily modify those examples to use my enc28j60 instead of an external PHY?

Re: STM32F4 and ethernet (using enc28j60)

Posted: Sat Jan 18, 2014 1:15 pm
by Giovanni
Such a demo is not available you would have to interface the enc28j60 to lwIP yourself.

Giovanni

Re: STM32F4 and ethernet (using enc28j60)

Posted: Sat Jan 18, 2014 4:10 pm
by roli
I understand that.

But I did find a lwip port for exactly this combination. So lwip+stm32f4+enc28j60 - http://homepage2.nifty.com/yees/LwIP/LwIP140_V000.zip . Could it be possible to somehow put these things together?

Re: STM32F4 and ethernet (using enc28j60)

Posted: Sat Jan 18, 2014 5:05 pm
by Giovanni
It would be definitely possible, lwIP already works in ChibiOS, you need to create the layer between lwIP and the enc28j60 (using the existing SPI driver for example).

Giovanni

Re: STM32F4 and ethernet (using enc28j60)

Posted: Fri Oct 07, 2016 2:58 pm
by kjwiik
roli wrote:I understand that.

But I did find a lwip port for exactly this combination. So lwip+stm32f4+enc28j60 - http://homepage2.nifty.com/yees/LwIP/LwIP140_V000.zip . Could it be possible to somehow put these things together?


Have you succeeded in porting?

Kaj