cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4x7 MAC problems

chebuzz
Associate
Posted on December 22, 2011 at 07:09

Hello,

I am working on initializing the Ethernet/MAC code on the STM32F4 Discovery, with the STM32F407VG processor.  I have used the example code found on ST's website here: http://www.st.com/internet/mcu/product/252140.jsp&sharpFIRMWARE

That code provides a couple example projects.  The problem I am running into is that none of them seem to work.  I have tried with modified code to match my current setup (RMII to PHY) and I have tried it with the unaltered examples.  Both of them seem to hang on this section of code:

  ETH_DeInit();

  ETH_SoftwareReset();

  while(ETH_GetSoftwareResetStatus() == SET);

So in other words, the MAC never seems to come out of reset.  Has anybody been successful using the MAC code from ST's library?

#stm32-f4-mac-ethernet
4 REPLIES 4
Posted on December 22, 2011 at 15:54

This question sounds familiar, on other parts you must have the Ethernet clock disabled for you to do this.

See if this thread is on point.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Stm32F2 Ethernet start up infinite Loop&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=355]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FStm32F2%20%20Ethernet%20start%20up%20infinite%20Loop&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=355

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
chebuzz
Associate
Posted on December 23, 2011 at 05:24

Well, that did seem to be the problem.  If I moved the line setting up the clocks until after the reset, everything seemed to work fine.

Which brings up the next question, why does ST do it in the opposite order in their driver code?  Perhaps STOne-32 can comment on whether this is a bug or what is going on here.

jsmaia2
Associate
Posted on December 26, 2011 at 22:03

Hi CheBuzz,

I just received my Discovery board I would like to experiment Ethernet on it. Could you share more informations about how you connected the PHY and RJ-45 to the Discovery?

Best regards,

Maia

Posted on December 27, 2011 at 14:16

Could you share more informations about how you connected the PHY and RJ-45 to the Discovery?

Pull a manual for one of the STM32F4 development boards which has Ethernet and examine the schematics.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..