STM32 Ethernet Demo

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Post Reply
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: STM32 Ethernet Demo

Post by mabl »

Hello Ruwe,

I'm interested in the Discovery extension board you mentioned. The last time I looked into this I think I concluded that it is NOT possible, since some pins used for ethernet are already allocated to other resources. Are you sure this is not just an external SPI ENC28J60 Ethernet MAC?

@Givoanni: Great news, the code also looks beautiful. Unfortunately I'll be in Australia for the next 4 weeks with minimal Internet and hardware access. Once I'm back I can give it a thorough testing though. I found the LwIP chargen example with multiple concurrent connections to be a quite good test case.

I've appended my current state of the wrapper code - It's da__ ugly and has several debuging artifacts - but runs stable under production use for over 8 weeks now.
Attachments
ethernet_lld.zip
(39.23 KiB) Downloaded 789 times
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 Ethernet Demo

Post by Giovanni »

Hi Mabl,

Thanks for the update, I can use it as example, that MAC has a lot of registers.

About the STM32F4-Discovery, I saw a post on the ST forum stating that attaching an external PHY is possible also if some of the pins are used by on-board devices. Probably it is possible to keep the on-board devices not initialized and there is no interference.

Somebody should really start selling a MB for the discovery.

Giovanni
rubenswerk
Posts: 104
Joined: Wed Feb 22, 2012 11:39 am

Re: STM32 Ethernet Demo

Post by rubenswerk »

Hello mabl,

this is a German discussion board, but if you look at this thread:

http://www.mikrocontroller.net/topic/237223#new

and check the posts of dennisp. There is an ebay link to a cheap DP83848 board which works with the STM32F4 Discovery (although it is not explicitly designed for it). He also links to a sample project.

In another thread he shows his connection scheme and explains that the MEMS sensor of the discovery board cannot be used when connecting Ethernet.

http://www.mikrocontroller.net/topic/243066#2477720

This is the ebay board:
http://www.ebay.de/itm/ws/eBayISAPI.dll ... 8088049977

As the ebay link is only valid for 1 month after end of auction, here's the seller information and product name:
Seller: waveshare
Article: DP83848 Ethernet Physical Transceiver RJ45 connector control interface Board Kit


Also, check the post of hp-freund from 08.01.2012 00:38. He shows an connection schematic and another lwip sample project.

I would appreciate to have something similar with ChibiOS.

Regards, Ruwe
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 Ethernet Demo

Post by Giovanni »

The work on the MAC driver is in progress and, as Mabl wrote, the temporary driver is already done and working in a production environment.

Expect an "official" lwIP demo in 2.4.1 or 2.4.2.

Giovanni
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: STM32 Ethernet Demo

Post by mabl »

Hello Ruwe,

great, that's really interesting. Thank you for the link, I'm German anyway - so no problems there. I just bought the board - always wanted to have a PHY at hand. Since the F4 MAC is nearly identical to the F107 I see no big problem on using it with the F4.

I'm sure you guys will have a neat MAC demo running in a month when I'm back to Europe.
jcbarlow
Posts: 21
Joined: Sun Jul 03, 2011 6:48 am

Re: STM32 Ethernet Demo

Post by jcbarlow »

rubenswerk wrote:This is the ebay board:
http://www.ebay.de/itm/ws/eBayISAPI.dll ... 8088049977

As the ebay link is only valid for 1 month after end of auction, here's the seller information and product name:
Seller: waveshare
Article: DP83848 Ethernet Physical Transceiver RJ45 connector control interface Board Kit


That vendor seems to be in China. They do have an English web site with some interesting looking stuff. For instance this: http://www.wvshare.com/column/STM32_DevelopmentBoard.htm which might be a viable test platform. I've never dealt with these folks. I only know what I read on the web.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 Ethernet Demo

Post by Giovanni »

The driver code is complete now but untested, any help in testing would be very appreciated, in theory the driver should be able to replace the wrapper and work immediately. The driver should also be mostly independent from the PHY used.

Of course there are bugs to be found :-)

Thanks for all the work on the wrapper to those involved, I pulled a lot of code from there, basically I just renamed some stuff and removed dependencies on the ST code (and that was mainly about MAC initialization).

Giovanni
brian360
Posts: 27
Joined: Wed Dec 08, 2010 5:47 pm

Re: STM32 Ethernet Demo

Post by brian360 »

This is good news! Unfortunately, the company I was working on the STM32 with went out of business and I got a new job at a new company, so I no longer have an STM32 development board with Ethernet to test it :( But I'm glad to see a native driver evolve out of the wrapper! I'm definitely going to recommend ChibiOS/RT for new projects at my new company :)
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 Ethernet Demo

Post by Giovanni »

Hi Brian,

I hope you are fine with your new job, thanks for pushing ChibiOS :-) your code and all the enhancements from others helped a lot.

About the driver, it apparently works now but I just ran few tests on a STM32F107 with a STE101P PHY, it appears to receive frames. Please help testing the driver and give feedback.

Giovanni
gfortaine
Posts: 5
Joined: Mon Feb 27, 2012 7:57 pm

Re: STM32 Ethernet Demo

Post by gfortaine »

Hello,

I have read with interest this thread.

On my side, I have just received my STM32 F-2 Ethernet Board and I would greatly appreciate to port ChibiOS/RT on it :

http://www.ebay.com/itm/ws/eBayISAPI.dl ... 0638488534

Especially, I have read with interest the Web page entitled "Porting ChibiOS/RT for Dummies" :

http://www.chibios.org/dokuwiki/doku.ph ... port_guide

and I have asked the manufacturer the board pinout :

STM32 F2 Ethernet pinout.zip
(44.52 KiB) Downloaded 620 times


However, I still don't know where to start. Could somebody provide some help, if possible, please ? The closest board port that I have found is the one from snowcap
electronics (it also uses a STM32 F2) :

https://github.com/snowcap-electronics/ ... L_BOARD_V1

I look forward to your answer,

Best Regards,

Guillaume FORTAINE
Post Reply