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.
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 » Wed Dec 05, 2012 7:34 am

I'm not sure if tkj means oocd problems, Tectu. The debugging chain itself should be virtually identical between FreeRTOS and ChibiOS. Also the Olimex E407 is fully supported by ChibiOS - I cannot see how any other RTOS can be more easy. I have never used FreeRTOS, so I'd very much appreciate feedback by tkj why he finds FreeRTOS easier.

DeusExMachina wrote:I tried to mix ARMCM4-STM32F407-LWIP with STM32F407-DISCOVERY demos using Thomas connections layout, but I cant win :( I think it's worth to create STM32F407-DISCOVERY-LWIP demo in Chibios distribution, but I am afraid it's too complicated task for me.

It should actually not be so hard. Keep trying - you will learn a lot from it.

  • Start from the default F4DISCOVERY board file.
  • Check which media interface you need, probably RMII which uses a 50MHz clock for its databus
  • Check where you need to generate the 50MHz. Some Ethernet boards have their own generator.
  • Assign the pins in the map file. Remember to use the correct alternate IO.
  • Maybe you need to desolder some conflicting chips.
  • Add your MAC chip to your board file - it is used by the mac driver to autodetect your mac.
  • Debug your mac startup. The driver is nicely written. By finding where it fails, you will get insight what is still wrong.
  • Spend 2 days and few less hair -> You will *definitly* have a working project afterwards.
  • The LWIP and Ethernet stuff can be used *directly* from the other demo. There is nothing specific to it.
  • Always ask questions :-)

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: STM32 Ethernet Demo

Postby DeusExMachina » Wed Dec 05, 2012 1:03 pm

mabl wrote:
  • Start from the default F4DISCOVERY board file.
  • Check which media interface you need, probably RMII which uses a 50MHz clock for its databus
  • Check where you need to generate the 50MHz. Some Ethernet boards have their own generator.
  • Assign the pins in the map file. Remember to use the correct alternate IO.
  • Maybe you need to desolder some conflicting chips.
  • Add your MAC chip to your board file - it is used by the mac driver to autodetect your mac.
  • Debug your mac startup. The driver is nicely written. By finding where it fails, you will get insight what is still wrong.
  • Spend 2 days and few less hair -> You will *definitly* have a working project afterwards.
  • The LWIP and Ethernet stuff can be used *directly* from the other demo. There is nothing specific to it.
  • Always ask questions :-)

OK, I'll try to do it. :)

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 » Wed Dec 05, 2012 1:08 pm

Maybe it's also a possible idea to think about using the Olimex STM32E407. It's a great board:
http://chibios.org/dokuwiki/doku.php?id ... ry_vs_e407

You can easily buy it on ebay.

tkj
Posts: 11
Joined: Tue Oct 30, 2012 11:46 pm

Re: STM32 Ethernet Demo

Postby tkj » Wed Dec 05, 2012 4:42 pm

@mabl, I definitely don't think FreeRTOS is any easier than ChbiOS.
But for now I can only get debugging with our J-link and using CooCox to work with FreeRTOS.
But if it worked for ChibiOS I would definitely use that too!

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 » Wed Dec 05, 2012 6:53 pm

@tki:
If you like you can open a new topic about your issues. I used JLink with the Segger gdbserver and openocd - both worked fine for me and ChibiOS. Your troubles should be easy to solve.

tkj
Posts: 11
Joined: Tue Oct 30, 2012 11:46 pm

Re: STM32 Ethernet Demo

Postby tkj » Wed Dec 05, 2012 8:09 pm

mabl wrote:@tki:
If you like you can open a new topic about your issues. I used JLink with the Segger gdbserver and openocd - both worked fine for me and ChibiOS. Your troubles should be easy to solve.

To me the debugging of ChibiOS also worked in the beginning (demo projects).
But when I started filling my own code and threads into the project it suddenly stopped working.

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: STM32 Ethernet Demo

Postby DeusExMachina » Sun Dec 09, 2012 2:31 pm

After some issues I've got working stm32f4discovery with DP83848. Thanks for mabl and tkj!
I got ARMCM4-STM32F407-LWIP demo, changed link to ST_STM32F4_DISCOVERY board. After, I thoroughly checked board.h, assigning right alternate function values according datasheet.

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 » Sun Dec 09, 2012 2:43 pm

DeusExMachina wrote:After some issues I've got working stm32f4discovery with DP83848. Thanks for mabl and tkj!
I got ARMCM4-STM32F407-LWIP demo, changed link to ST_STM32F4_DISCOVERY board. After, I thoroughly checked board.h, assigning right alternate function values according datasheet.

Great! I'm sure you also learnt a lot ;) Maybe upload your working project files here. Then somebody else can build upon your work.

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

Re: STM32 Ethernet Demo

Postby Giovanni » Sun Dec 09, 2012 3:04 pm

It would be a nice idea to write a small guide for Ethernet on the Discovery.

Giovanni

tkj
Posts: 11
Joined: Tue Oct 30, 2012 11:46 pm

Re: STM32 Ethernet Demo

Postby tkj » Sun Dec 09, 2012 3:08 pm

Giovanni wrote:It would be a nice idea to write a small guide for Ethernet on the Discovery.

Giovanni

Yeah.
If you could upload the project I could combine it with the guide/blog-post I've already made: http://blog.tkjelectronics.dk/2012/08/e ... ernal-phy/


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 11 guests