March 28, 2024, 07:40:33 PM

STM32-P107 ethernet - Help needed

Started by ZotDitzMyo, August 29, 2013, 01:44:35 PM

Previous topic - Next topic

ZotDitzMyo

Hello,

I am quite new to all things embedded and am having difficulties getting the ethernet to work on an STM32-P107.

I started from AN3102 from ST which is a lwip demo for the STM3210C-Eval board. I got that running perfectly with Coocox. I am now trying to port this over to the STM32-P107. Only the Phy chip has changed, it should be easy enough right?

From what I can gather, the KSZ8721 is running in RMII mode on the board. I made the following changes to the stm32_eth.h file:
   #define PHY_SR                           0x1F     /*!< Tranceiver Status Register */
   #define PHY_Speed_Status            ((u16)0x0004)    /*!< Configured information of Speed: 10Mbps */
   #define PHY_Duplex_Status           ((u16)0x0010)    /*!< Configured information of Duplex: Full-duplex */

I can flash the stat LEDs on the board so I know my e is in there and I get a solid orange light and a blinking green light on the RJ45 connector. No ping, no http, nothing.

Does anyone have any hints?

thank you!

ZotDitzMyo

In the end, only a proper configuration of the GPIOs made everything work! I forgot that the Cortex chips don't have the Telepathy interface yet, you have to program them explicitely :-)

dcel

Hello,
for ethernet function, what is the configuration of the GPIO

thank you

LubOlimex

Hey dcel,

Which board revision P107 you have and which PHY is on it?

For board revision C with LAN8710A PHY please check this example: https://www.olimex.com/Products/ARM/ST/STM32-P107/resources/STM32_P107_revision_C_examples.zip

For board revision B with Micrel PHY: https://www.olimex.com/Products/ARM/ST/STM32-P107/resources/STM32-P107_DemoSoft.zip

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

msr

Hi,

In REV C board why 6NC2-50MHz was NOT ASSEMBLED?
How the ethernet clock is supposed to be injected?
Can you suggest me a equivalent crystal I can buy from Mouser or Farnell?

Thanks

LubOlimex

Hey msr,

It wasn't assembled since the processor has internal clock. We provided the pads and the part in case somebody wants to test external clock.

The Ethernet connection was tested before shipping the board for sure.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

aftab_s81

Quote from: dcel on April 30, 2014, 09:18:26 AM
Hello,
for ethernet function, what is the configuration of the GPIO

thank you

See this link for details: http://electrodesigns.net/blog/lwip-stm32f107/