AnsweredAssumed Answered

Strange bug with STM32F407's MAC

Question asked by huang.tuchen.001 on Mar 21, 2014
Latest reply on Mar 24, 2014 by huang.tuchen.001
I'm developing a system using STM32F407ZGT with a PHY DP83848 using RMII interface. A 50MHz oscillator was used for the RMII_REF_CLK. I ran the FreeRTOS+LWIP demo application from ST's websize and encountered a strange problem:
1) Firstly, because external 50MHz oscillator was used so I comment the configuration code for PA8 (MCO1). But the initialization failed and the program was stuck in 'while(ETH_GetSoftwareResetStatus()==SET)' line. I measured the 50MHz clock and found that after PA7 was configured as RMII_CLK the amplitude of the 50MHz clock drop to a half !
2) When I added the configuration code for PA8 in the ETH_GPIO configuration function before PA7 was configured, everything is OK !!! I just added the following lines for PA8, but didn't output the clock to PA8!!

  /* Configure MCO (PA8) */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
This is really strange! PA8 was not used in my system. It should have nothing to do with the system. I found many posts in BBS talking about the 'while(ETH_GetSoftwareResetStatus()==SET)' problem. Is it a bug for STM32?