Stm32f4discovery and Embest Base Board
Posted: Mon Nov 25, 2013 11:27 am
I have been porting ChibiOS to the Stm32f4discovery and the Embest DM-STF4BB Base Board to get Ethernet capability.
I couldnt work out why the code was waiting for MAC Software Reset flag to clear down in mac_lld_start().
I rechecked the clock routing and then I noticed STM32_MAC_ETH1_CHANGE_PHY_STATE in mac_lld_init(). The PHYS was being powered down, shutting off the clock in RMII mode (the LAN8720 on the Base Board is only RMII capable).
I'm not sure all PHYS devices do this, but I wonder if a conditional #ifdef BOARD_PHY_RMII on the STM32_MAC_ETH1_CHANGE_PHY_STATE check in mac_lld_start()may be an idea to catch this case.
Of course I may have been particularly dim
I couldnt work out why the code was waiting for MAC Software Reset flag to clear down in mac_lld_start().
I rechecked the clock routing and then I noticed STM32_MAC_ETH1_CHANGE_PHY_STATE in mac_lld_init(). The PHYS was being powered down, shutting off the clock in RMII mode (the LAN8720 on the Base Board is only RMII capable).
I'm not sure all PHYS devices do this, but I wonder if a conditional #ifdef BOARD_PHY_RMII on the STM32_MAC_ETH1_CHANGE_PHY_STATE check in mac_lld_start()may be an idea to catch this case.
Of course I may have been particularly dim