Stm32f4discovery and Embest Base Board

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
shinelikerain
Posts: 15
Joined: Mon Nov 25, 2013 11:10 am

Stm32f4discovery and Embest Base Board

Post by shinelikerain »

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 :-(
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Stm32f4discovery and Embest Base Board

Post by Giovanni »

Hi,

If I remember well somebody already ported to that board, try a search in the forum, there are several topics regarding the MAC driver.

I need to study what you are suggesting becasue it is not immediately clear for me but the code is working on many boards with diferent PHYs.

Giovanni
rubenswerk
Posts: 104
Joined: Wed Feb 22, 2012 11:39 am

Re: Stm32f4discovery and Embest Base Board

Post by rubenswerk »

Hi,
the same applies for RMII phy KSZ8031.
STM32_MAC_ETH1_CHANGE_PHY_STATE has to be disabled for this phy.
Bye, RuWe
thomash505
Posts: 5
Joined: Sun Jan 05, 2014 7:09 am

Re: Stm32f4discovery and Embest Base Board

Post by thomash505 »

Hey,
I am doing the same thing and trying to get LWIP to work with the embest bb. Is there example code to get the MAC subsystem to work with the LAN8720 PHY? I have set STM32_MAC_ETH1_CHANGE_PHY_STATE to FALSE and changed the PHY_ID to be appropriate for the LAN8720, but the code won't progress past initialisation.

Any ideas?

Thanks, Thomas.
Post Reply