Page 7 of 26
Re: STM32 Ethernet Demo
Posted: Thu Feb 23, 2012 12:13 pm
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.
Re: STM32 Ethernet Demo
Posted: Thu Feb 23, 2012 12:23 pm
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
Re: STM32 Ethernet Demo
Posted: Thu Feb 23, 2012 2:24 pm
by rubenswerk
Hello mabl,
this is a German discussion board, but if you look at this thread:
http://www.mikrocontroller.net/topic/237223#newand 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#2477720This is the ebay board:
http://www.ebay.de/itm/ws/eBayISAPI.dll ... 8088049977As 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
Re: STM32 Ethernet Demo
Posted: Thu Feb 23, 2012 2:35 pm
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
Re: STM32 Ethernet Demo
Posted: Thu Feb 23, 2012 2:38 pm
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.
Re: STM32 Ethernet Demo
Posted: Fri Feb 24, 2012 6:52 am
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.
Re: STM32 Ethernet Demo
Posted: Sat Feb 25, 2012 10:29 am
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
Re: STM32 Ethernet Demo
Posted: Sat Feb 25, 2012 7:50 pm
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

Re: STM32 Ethernet Demo
Posted: Sun Feb 26, 2012 12:36 pm
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
Re: STM32 Ethernet Demo
Posted: Mon Feb 27, 2012 9:21 pm
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 :
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_V1I look forward to your answer,
Best Regards,
Guillaume FORTAINE