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.
User avatar
Giovanni
Site Admin
Posts: 13084
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: STM32 Ethernet Demo

Postby Giovanni » Sat Mar 12, 2011 12:57 pm

Hi,

I am trying to execute your demo but it goes into an unhandled exception almost immediately after start, the LED does not have the time to complete a single cycle.

Is this the same behavior you are experiencing?

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: STM32 Ethernet Demo

Postby mabl » Sat Mar 12, 2011 1:08 pm

Indeed, it does not do this when I also execute the webserver thread. If no lwip is started then the mac detects at least the link and does not crash... Naturally I cannot ping the board then.

brian360
Posts: 27
Joined: Wed Dec 08, 2010 5:47 pm
Location: Seattle, WA, USA

Re: STM32 Ethernet Demo

Postby brian360 » Sat Mar 12, 2011 8:52 pm

I've got the Olimex STM32 Ethernet board on order, too, so hopefully I'll be able to help out and test as well soon.

I will note that I am running lwip-1.4.0-RC1 now rather than the included version of lwip in ChibiOS. Enabling stack overflow detection in ChibiOS helped greatly for debugging, as well.

User avatar
Giovanni
Site Admin
Posts: 13084
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: STM32 Ethernet Demo

Postby Giovanni » Sat Mar 12, 2011 9:40 pm

Thanks Brian,

I have to admit I am a bit lost in that ST driver.

Giovanni

brian360
Posts: 27
Joined: Wed Dec 08, 2010 5:47 pm
Location: Seattle, WA, USA

Re: STM32 Ethernet Demo

Postby brian360 » Sat Mar 12, 2011 11:48 pm

Don't worry, me too :) A native mac driver would most certainly improve readability of the code, that's for sure. It would also help to abstract the phy layer, too.

The mac lld driver & initialization code was largely ported from ST's sample code of an STM32F107 LwIP demo (AN3102 http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/an3102.zip) and the ChibiOS AT91 mac driver implementation. The file "stm32_eth.c" obviously is ST's own driver code and equally hard-to-follow.

Improvements most certainly are welcome, and I'll help out anywhere I can :)

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: STM32 Ethernet Demo

Postby mabl » Thu Apr 07, 2011 8:33 am

Some information regarding the olimex board: The schematics on the websites are outdated! I had problems using the SD slot, as it was impossible to use them according the the old schematics. They still have not updated their website - therefore I attached [1] (pdf extension is not allowed here..) the schematic I got from their support.

PS: Any progress regarding the ethernet?

[1] http://leute.server.de/mabldata/etc/STM ... ematic.pdf

User avatar
Giovanni
Site Admin
Posts: 13084
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: STM32 Ethernet Demo

Postby Giovanni » Thu Apr 07, 2011 8:39 am

Thanks, I noticed the problem with the schematic, it made impossible to use the SD slot.

About the Ethernet, I prefer to write a native driver rather that mess with the ST library, may be Brian will update us about the status of the transition driver.

Giovanni

brian360
Posts: 27
Joined: Wed Dec 08, 2010 5:47 pm
Location: Seattle, WA, USA

Re: STM32 Ethernet Demo

Postby brian360 » Thu Apr 07, 2011 5:16 pm

Hi,

I did receive my Olimex board and do have the Ethernet working with my project. The ST wrapper driver didn't really need any changes beyond what you had already posted. I will separate out my project files, try to figure out what is different about my project and the uploaded project, and update the branch with a working demo for the Olimex board this weekend.

- Brian

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: STM32 Ethernet Demo

Postby mabl » Thu Apr 07, 2011 5:46 pm

Wow, that would be awesome! Thank you very much! :)

User avatar
Giovanni
Site Admin
Posts: 13084
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: STM32 Ethernet Demo

Postby Giovanni » Thu Apr 07, 2011 6:54 pm

Great news, thanks Brian.

Note that the HAL in 2.3.1 supports the PLL3 initialization and the generation of the 50MHz through the MCO pin, part of that ad-hoc initialization code probably is no more required.

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 3 guests