Part Number: AM3357
Tool/software: TI-RTOS
Hi Team,
I met one software issue with a RMII design on customers' board. Please help to check as below.
Hardware platform:
Customers’ product board with RMII design.
we have designed an board based AM3357, according to ICEV2.
the difference between our board and ICEV2 is that we have three ethernet port: 2 for PRU-ICSS and 1 for CPSW. there is no pin reuse in our board.
the PHY in our board is
Software environment:
in Uboot and Linux environment, RMII is set by device tree, the port can work, we can ping it success. so there is no hardware problem in our board.
but in RTOS environment, it can't work!
the sdk that we are using is ti-processor-sdk-rtos-am335x-evm-05.00.00.15-Windows-x86-Install
experiment
firstly, we modified the am335x_icev2_pinmux_data.c. the new CPSW discription is shown as
#if defined(BUILDCFG_MOD_CPSW)
static pinmuxPerCfg_t gCpsw0PinCfg[] =
{
{
/* MDIO -> mdio_clk -> M18 */
PIN_MDIO_CLK, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_TYPE_SEL) & (~PIN_PULL_UD_EN & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MDIO -> mdio_data -> M17 */
PIN_MDIO_DATA, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_TYPE_SEL | PIN_RX_ACTIVE) & (~PIN_PULL_UD_EN)) \
) \
},
{
/* RMII1 -> rmii1_crs_dv -> H17 */
PIN_GMII1_CRS, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* RMII1 -> rmii1_rxer -> J15 */
PIN_GMII1_RXER, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* RMII1 -> rmii1_txen -> J16 */
PIN_GMII1_TXEN, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* RMII1 -> rmii1_txd0 -> K17 */
PIN_GMII1_TXD0, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* RMII1 -> rmii1_txd1 -> K16 */
PIN_GMII1_TXD1, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* RMII1 -> rmii1_rxd0 -> M16 */
PIN_GMII1_RXD0, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* RMII1 -> rmii1_rxd1 -> L15 */
PIN_GMII1_RXD1, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* RMII1 -> rmii1_refclk -> H18 */
PIN_RMII1_REFCLK, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_TYPE_SEL | PIN_RX_ACTIVE) & (~PIN_PULL_UD_EN)) \
) \
},
{PINMUX_INVALID_PIN}
};
then we executed the gmake in the cmd window, when finished we import the project NIMU_BasicExample_icev2AM335x_armExampleproject and rebuild it.
after load the program and run we got the following result
It seems that the connection is successed, but the ping form our host computer is failed!
the program is shown as:
SOCCtrlCpswPortMacModeSelect(1, ETHERNET_MAC_TYPE_RMII);
SOCCtrlCpswPortMacModeSelect(2, ETHERNET_MAC_TYPE_RMII);
EMAC_socGetInitCfg(0, &cfg);
cfg.numPorts = 1;
cfg.port[0].phy_addr = 1;//EMAC_CPSW_PORT0_PHY_ADDR_ICE2;
//cfg.port[1].phy_addr = -1;//EMAC_CPSW_PORT1_PHY_ADDR_ICE2;
cfg.macModeFlags = EMAC_CPSW_CONFIG_MODEFLG_FULLDUPLEX| EMAC_CPSW_CONFIG_MODEFLG_IFCTLA;
EMAC_socSetInitCfg(0, &cfg);
I don't know why the ping is failed, please help me, thanks!
