2018-01-02 05:58 AM
Hello everyone,
I have STM32F107RC MCU connected RMII mode to PHY => KSZ8081RNBIA
PHY's clock source is 50 MHZ oscilattor connected to XI pin and ETH_RMII_REF_CLK (PA1)
I tried source MCU with HSI (8MHz) and also external 16 MHZ HSE source.
I created a cubex library and tried lots of things. PHY address 0 and 1, changed PHY_SR macro (default 0x10) to 0x1E. Also I inserted code below according to PHY datasheet for RMII. What am I missing? I really miss DP83848 PHY.
Is there anyone worked with Micrel clocked by external oscilattor? Is my reference clock to MCU correct or acceptable?
HAL_ETH_ReadPHYRegister(&heth, 0x1F, &phyreg);
if((HAL_ETH_WritePHYRegister(&heth, 0x1F, phyreg | 0x0080)) != HAL_OK) { HAL_UART_Transmit_IT(&huart1,(uint8_t *)''1F write ok'',11); } else { HAL_UART_Transmit_IT(&huart1,(uint8_t *)''1F write fail'',13); }I couldnt see any link, blink, movement on RJ45 both Leds. Also from debug uarth writing registers returning false.
#stm32f107-phy-micrel-ethernet #reset_n #ksz8081 #ksz8081rnbi #stm32f107-with-rmii #rmii-with-50-mhz-external-oscilatorSolved! Go to Solution.
2018-01-03 06:03 AM
Resolved!
@STRAP-IN OPTIONS
I connected pin 18 to VCC and set bit 7 of 0x1F register. Do it at file stm32f1xx_hal_eth.c after delay function shown below.
/* Delay to assure PHY reset */
HAL_Delay(PHY_RESET_DELAY);Pinging worked after I added
MX_LWIP_Process();function on while(1) loop in main.
*RST# pin of PHY was pulled up and GPIO of Reset Pin must be set.
https://community.st.com/tags#/?tags=stm32f107%20phy%20micrel%20ethernet
2018-01-03 06:03 AM
Resolved!
@STRAP-IN OPTIONS
I connected pin 18 to VCC and set bit 7 of 0x1F register. Do it at file stm32f1xx_hal_eth.c after delay function shown below.
/* Delay to assure PHY reset */
HAL_Delay(PHY_RESET_DELAY);Pinging worked after I added
MX_LWIP_Process();function on while(1) loop in main.
*RST# pin of PHY was pulled up and GPIO of Reset Pin must be set.
https://community.st.com/tags#/?tags=stm32f107%20phy%20micrel%20ethernet