Keil Logo

ARM: MDK 5 Networking Problems on STM324x9I-EVAL


Information in this knowledgebase article applies to:

  • MDK 5 Networking Component, RTE EMAC driver for STM32F4xx, STM324x9I-EVAL

SYMPTOM

We are trying to setup a networking project on the STM324x9I-EVAL board. We use the DRV_DP83848C driver which is part of the Run-time environment.

Everything in RTE_Device.h, the DP83848C is connected using the MII interface and is configured correctly.

Although none of the functions called in PHY_DP83848.c and EMAC_STM32F4xx.c return any error values, the ISR ETH_IRQHandler is never reached. As a result, the board sends data, but does not receive it.

CAUSE

Because R43 is not populated on the board, the the STM32F4 pin PI10 can be set HIGH inadvertently. The RTE_Device.h file assigns the PHY signal ETH_MII_RX_ER to PI10. When that pin is HIGH, the PHY will report constant false receive errors, and all received frames are lost.

Other PHY signals MII_COL and MII_CRS are also not connected by default to STM32F4 pins, and cause no trouble for the EMAC when full-duplex mode is in use, because then the signal state for the EMAC is: don’t care. But pin configuration could cause similar issues, if the pins get used in another context.

RESOLUTION

The RTE configuration for pin PI10 needs to be avoided or undone, so that the EMAC hardware does not use it as ETH_MII_RX_ER signal.

Because modifying the RTE driver files is not recommended, reverting the pin configuration is the most preferred solution for this problem. To do this, in your program which uses a middleware 5.x pack, include the following files:

#include "RTE_Device.h"
#include "GPIO_STM32F4xx.h"

and configure the pin RTE_ETH_MII_RX_ER_PIN away from the EMAC peripheral to its actual alternative usage just after the call to net_initialize(). For example:

net_initialize ();
GPIO_PinAF( RTE_ETH_MII_RX_ER_PORT, RTE_ETH_MII_RX_ER_PIN, GPIO_AF_SYSTEM ) ;

If your program uses a middleware 6.x pack, include the following file:

#include "RTE_Device.h"

and configure the pin RTE_ETH_MII_RX_ER_PIN away from the EMAC peripheral like this:

net_initialize ();
HAL_GPIO_DeInit( RTE_ETH_MII_RX_ER_PORT, ( 1UL << RTE_ETH_MII_RX_ER_PIN ) ) ;

After that the EMAC will no longer detect false errors and correctly forwards received data to the application.

MORE INFORMATION

  • Refer to section "2.13 Ethernet" in the STM324x9I-EVAL User Manual

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Friday, February 24, 2017


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.