AnsweredAssumed Answered

STM32F107 ans ST100 PHY

Question asked by f.a on Sep 28, 2011
Hello @ all,

I have acquired a Reva Board with STM32 daughter board ( ). Raisonance don't provide some Ethernet examples for their board, so I started to port the LwIP IAP Demo for ST3210C to the Reva board. I must say I am new with this controller and I have no experience with Ethernet PHY's.

There are the steps which I have tried:
- checked the IO's between STM32 and PHY (st3210C uses an other PHY), the IO initialization seems to be correct
- initialized the Ethernet interface in MII mode
- flatten the whole app (no buttons, no ST3210-C Code, just LwIP, printf and http server App)
- used HSE for MCO Clock (25Mhz) to feed the PHY
- used Static IP and DHCP
Running the code brings not the desired result. Y-LED is blinking what means a collision is available but the biggest problem is, I have tried to read the ST100 register, but have got just "ones"
Here is the main code:
int main(void)

    int PhyVar, c;
    /* Setup STM32 system (clocks, Ethernet, GPIO, NVIC) and STM3210C-EVAL resources */

    printf("\r\nSystem initialisiert");

    /* Initilaize the LwIP stack */

    /* Initilaize the webserver module */
    for(c = 0; c < 20; c++) {
        PhyVar = ETH_ReadPHYRegister(0x01, c);
        printf("\r\nReg %d: \t %d", c, PhyVar);

    /* Infinite loop */
    while (1)
      /* check if any packet received */
      if (ETH_GetRxPktSize()!=0)
        /* process received eth packet */
        GPIOE->ODR ^= GPIO_Pin_10;
      /* Periodic tasks */

  return 0;

Here is the initialization for the Ethernet connection:

Reva STM32 daughter board is very easy, they are n jumpers to connect the PHY and the uC. Do someone has an idea what could be wrong, especially why i can read just ones from the PHY. IO's seems to be well initialized in the code.