Isidoro,
Before giving up, could you change the clock settings in mcuconf.h and make the PLL work with 2MHz in input instead of 1MHz? That could reduce the jitter.
Giovanni
STM32 Ethernet Demo
- 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
Giovanni,
It was one of the first test I did, shortly before you've suggested that. More, I tried also with a laboratory grade external clock generator in place of the 8MHz crystal (to exclude the latter).
IMHO this issue is closed, at least with this revision (A) of the F4 chip.
Isidoro
It was one of the first test I did, shortly before you've suggested that. More, I tried also with a laboratory grade external clock generator in place of the 8MHz crystal (to exclude the latter).
IMHO this issue is closed, at least with this revision (A) of the F4 chip.
Isidoro
-
rubenswerk
- Posts: 104
- Joined: Wed Feb 22, 2012 11:39 am
Re: STM32 Ethernet Demo
Hm, interesting news.
If you take a look at the MAC description in the manual, when they talk about clock sources:
For MII, the MCO is listed as an option for 25MHz clock.
For the RMII mode, they only talk about using an external oscillator.
This is bad for isioara because a redesign is needed anyways, but hopefully MII can be used.
It should work because as far as I remember, the HSE clock can be routed directly to MCO without going through the PLL.
So a single 25MHz crystal should be fine to clock both the F4 and the MII PHY.
The Micrel PHY might be an interesting choice if it can internally double the 25MHz to work in RMII mode. I have no experience with the Micrels.
Bye, Ruwe
If you take a look at the MAC description in the manual, when they talk about clock sources:
For MII, the MCO is listed as an option for 25MHz clock.
For the RMII mode, they only talk about using an external oscillator.
This is bad for isioara because a redesign is needed anyways, but hopefully MII can be used.
It should work because as far as I remember, the HSE clock can be routed directly to MCO without going through the PLL.
So a single 25MHz crystal should be fine to clock both the F4 and the MII PHY.
The Micrel PHY might be an interesting choice if it can internally double the 25MHz to work in RMII mode. I have no experience with the Micrels.
Bye, Ruwe
Re: STM32 Ethernet Demo
Thanks Ruwe,
of course I read datasheet and reference manual thoroughly, so I had doubts it would work.
But I equally wanted to try... the board is easily 'patchable'.
Isidoro
of course I read datasheet and reference manual thoroughly, so I had doubts it would work.
But I equally wanted to try... the board is easily 'patchable'.
Isidoro
Re: STM32 Ethernet Demo
Just adapted my STM32F4-Discovery demo with stuff from \testhal\STM32F1xx\MAC,
added red LED blink to see frame receive activity and everything works perfectly well
with my Chinese DP83848I PHY board
So Giovanni - good work with your MAC driver
Next step - lwIP...
added red LED blink to see frame receive activity and everything works perfectly well
with my Chinese DP83848I PHY board
So Giovanni - good work with your MAC driver
Next step - lwIP...
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
-
rubenswerk
- Posts: 104
- Joined: Wed Feb 22, 2012 11:39 am
Re: STM32 Ethernet Demo
Hello,
I also got my Chinese DP83848 board today, and I'd like to combine it with F4 discovery and ChibiOS this weekend.
What is a good starting point for the adaptation?
Shall I start with the lwip demo for the Olimex board and re-configure it for the Discovery board?
As far as I understood Jacon, I can take the Discovery demo and add parts of makefile and main.c from \testhal\STM32F1xx\MAC.
Of course I need to set the correct port configuration in board.h.
What else do I have to change?
Jacon, if it would be ok for you to post your adaptations, this would simplify my first steps into the world of F4 ethernet.
Have a nice weekend!
Ruwe
I also got my Chinese DP83848 board today, and I'd like to combine it with F4 discovery and ChibiOS this weekend.
What is a good starting point for the adaptation?
Shall I start with the lwip demo for the Olimex board and re-configure it for the Discovery board?
As far as I understood Jacon, I can take the Discovery demo and add parts of makefile and main.c from \testhal\STM32F1xx\MAC.
Of course I need to set the correct port configuration in board.h.
What else do I have to change?
Jacon, if it would be ok for you to post your adaptations, this would simplify my first steps into the world of F4 ethernet.
Have a nice weekend!
Ruwe
- 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
Probably starting from the existing demo is a good idea, make sure to update the Makefile and take the mcuconf.h from an F4 demo, clock parameters are different.
I just received an Olimex STM32-P407 (donated by Matthias), I will add a lwIP demo for that one too.
Giovanni
I just received an Olimex STM32-P407 (donated by Matthias), I will add a lwIP demo for that one too.
Giovanni
Re: STM32 Ethernet Demo
Hi Ruwe,
Hardware changes:
- R50 (0 Ohm) removed from Discovery board,
- analog poti moved from PC1 to PC2
- USART2's TX/RX moved from PA2,PA3 to PD5,PD6, respectively.
- DP83848 connection in RMII mode is possible in only one way - described in your previous post
Enclosed pls find all changed files from original Giovanni's demo.
They add functionality from \testhal\STM32F1xx\MAC to normal STM32F4-Discovery demo functions,
removing all previous functions (SPI driven) impossible now.
Ethernet activity is signaled with green LED on RJ45 socket & red LED on Discovery board.
Red LED is turned steady on during Test thread activity,too.
Have a nice try
Jacek
Hardware changes:
- R50 (0 Ohm) removed from Discovery board,
- analog poti moved from PC1 to PC2
- USART2's TX/RX moved from PA2,PA3 to PD5,PD6, respectively.
- DP83848 connection in RMII mode is possible in only one way - described in your previous post
Enclosed pls find all changed files from original Giovanni's demo.
They add functionality from \testhal\STM32F1xx\MAC to normal STM32F4-Discovery demo functions,
removing all previous functions (SPI driven) impossible now.
Ethernet activity is signaled with green LED on RJ45 socket & red LED on Discovery board.
Red LED is turned steady on during Test thread activity,too.
Have a nice try
Jacek
- Attachments
-
- ChibiOS_trunk_STM32F4_Ethernet.zip
- (17.52 KiB) Downloaded 491 times
Last edited by Jacon on Mon Apr 02, 2012 11:16 pm, edited 2 times in total.
-
rubenswerk
- Posts: 104
- Joined: Wed Feb 22, 2012 11:39 am
Re: STM32 Ethernet Demo
Thanks so much to you guys. Very active community here!
I linked this thread in the mikrocontroller.net discussion board, because the MCO question was still unanswered there.
I will let you know about my progress.
I linked this thread in the mikrocontroller.net discussion board, because the MCO question was still unanswered there.
I will let you know about my progress.