2011-09-28 06:10 AM
Hello @ all,
I have acquired a Reva Board with STM32 daughter board ( ftp://www.raisonance.com/pub/Support/RKit-ARM/STM32F107-DB_Schematics.pdf ). 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 */ System_Setup(); USART_Configuration(); GPIO_Blink(); printf(''\r\nSystem initialisiert''); /* Initilaize the LwIP stack */ LwIP_Init(); /* Initilaize the webserver module */ IAP_httpd_init(); 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 */ LwIP_Pkt_Handle(); } GPIOE->ODR ^= GPIO_Pin_10; /* Periodic tasks */ System_Periodic_Handle(); } return 0; } Here is the initialization for the Ethernet connection: http://paste.ideaslabs.com/show/YrkKXYO6SG 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. Greets