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);
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.