cancel
Showing results for 
Search instead for 
Did you mean: 

ST32F217 never pass ''while (ETH_GetSoftwareResetStatus() == SET);''

andrey23
Associate II
Posted on April 03, 2012 at 10:42

Hello all!

I writed an app for ST32F Next, i change target in keil to ST32F207IG and try to make it work on my custom ST32F217 board with STE100P PHY controller in MII mode. But controller cant pass ethernet initialization function, its stop on

1.
while
(ETH_GetSoftwareResetStatus() == SET);

My GPIOs initialized properly, i quess. What kind of problem i see? How to solve it? #st32f217
10 REPLIES 10
Posted on April 03, 2012 at 15:31

I believe it relates to when clocks are enabled.

[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=519]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=519

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andrey23
Associate II
Posted on April 04, 2012 at 06:39

Thank you clive1, but im not sure that is the reason. Why program forks for ST32F207 and dont work with ST32F217?

Posted on April 04, 2012 at 07:45

If it works on the same board design with a F207 and not with a F217, then perhaps you need to check mundane things like the soldering.

If you're talking about different boards, then you'll need to review the connectivity and placed parts.

I mentioned clocks, because if things aren't clocking right in synchronous circuits, then things stop working or lock up.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andrey23
Associate II
Posted on April 04, 2012 at 10:07

Thank you. Ill try to check it all.

andrey23
Associate II
Posted on April 11, 2012 at 13:32

So, the SR (software reset) bit is always set, no one helps. I was tryed to move eth clock enabling after loop:


/* Enable ETHERNET clock */

//RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx |

// RCC_AHB1Periph_ETH_MAC_Rx, ENABLE);



/* Reset ETHERNET on AHB Bus */

ETH_DeInit();


/* Software reset */

ETH_SoftwareReset();


/* Wait for software reset */

while
(ETH_GetSoftwareResetStatus() == SET);

/* Enable ETHERNET clock */

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx |

RCC_AHB1Periph_ETH_MAC_Rx, ENABLE);

But after enabling clocks SR bit is set and never clear. Why that works for ST32F207 MCU?
pweber
Associate II
Posted on June 08, 2012 at 17:00

Hello huston007,

I was wondering if you ever got this to work?  I am having the exact same problem with a stm32f407 device and am thinking that I have the same issue that you were facing.

If you wouldn't mind sharing what you did to make this work I'd appreciate it.

Thanks,

Pat

andrey23
Associate II
Posted on June 22, 2012 at 10:59

As i knew, this problem mean that microcontroller cant connect to PHY. I dont know what problem exactly was it, may be wrong PHY working or an mistake in code or connections - i check that all and cant find anything. 

I solve this problem by using another PHY DP83848 and ST32F207, as in example. Thats works. Had no time to find this problem.

bouhoula
Associate II
Posted on April 08, 2013 at 18:09

Hello, did you manage to find the problem causing this infinite loop?

I'm facing the very same problem with my stm3240g_eval board.

Thanks in advance.

Posted on April 08, 2013 at 18:22

This problem usually points to no clock. Note that the MAC needs not only the internal clock enabled, but also external clock present. On the EVAL board, it's most probably not soldering problems (as was probably on the boards of the earlier posters), but either incorrectly placed respective jumpers, or incorrectly configured clock output (MCO1 is assumed to output the 25MHz clock).

JW