This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear team:
After my customer set up the mapping according to the instructions in the above post, he checked that the 1.2V of the PHY chip can be output normally, and the 50MHz crystal oscillator can also be output to the development board normally, but connecting to the computer will display: unrecognized network, Ping unsuccessful, Ping: transmission failed. General failture;
Add a breakpoint in the transmission / reception interrupt, and it is found that there is no transmission / reception interrupt;
PHY RESET is pulled up.
Software
initialization of GPIO
// RMII GPIO_setPinConfig(GPIO_105_ENET_MDIO_CLK); GPIO_setPinConfig(GPIO_106_ENET_MDIO_DATA); GPIO_setPinConfig(GPIO_114_ENET_MII_RX_DATA0); GPIO_setPinConfig(GPIO_53_ENET_MII_RX_DATA1); GPIO_setPinConfig(GPIO_113_ENET_MII_RX_ERR); // GPIO_setPadConfig(113U, GPIO_PIN_TYPE_STD); // GPIO_setDirectionMode(113U, GPIO_DIR_MODE_OUT); // GPIO_writePin(113U, 0); GPIO_setPinConfig(GPIO_112_ENET_MII_RX_DV); GPIO_setPinConfig(GPIO_121_ENET_MII_TX_DATA0); GPIO_setPinConfig(GPIO_122_ENET_MII_TX_DATA1); // // MDIO Signals // // GPIO_setPinConfig(GPIO_105_ENET_MDIO_CLK); // GPIO_setPinConfig(GPIO_106_ENET_MDIO_DATA); GPIO_setPinConfig(GPIO_45_ENET_MII_TX_EN); GPIO_setPinConfig(GPIO_73_ENET_RMII_CLK);
Mac part:
Compared with the mii program in the routine, rmii only changes the following in the phymode Ethernet_init(pucMACArray) function:
\\ initInterfaceConfig.phyMode = ETHERNET_SS_PHY_INTF_SEL_MII;
to:
initInterfaceConfig.phyMode = ETHERNET_SS_PHY_INTF_SEL_RMII;
Where could this problem be?
Best regards,
Green
Green,
I'm going to let my SW colleague reply first. If it turns out some HW support is needed then I'll jump in.
Regards,
Cody
Green,
Did you take a look at the "ethernet_ex9_revmii_example_revmii_side" example provided within C2000Ware?
It does some configuration specific for RevMII
//
//This configures external 25MHZ clock as the source for RevMII
//
initInterfaceConfig.clockSel = ETHERNET_SS_CLK_SRC_INTERNAL;
//
//This is the MDIO address used to access the internal RevMII registers
//Local PHY
//
initInterfaceConfig.localPhyAddress = REVMII_LOCAL_PHY_ADDRESS;
//
//This is the PHY address for the Remote PHY
//
initInterfaceConfig.remotePhyAddress = REVMII_REMOTE_PHY_ADDRESS;
Best Regards
Siddharth
Hi Siddharth:
I don't know much about Ethernet. Is "RMII" and "revmii" the same interface?
My customer told me that these two interfaces are not the same interface. He wants to know what else needs to be changed to change the lwip project in C2000WARE from mii mode to rmii mode besides changing the mode and GPIO pin multiplexing?
Hi,
Sorry, I misread it as revmii instead of rmii.
The changes suggested by the customer seem to be correct. Will take a look if something is missing and get back to you.
Best Regards
Siddharth
Hi Siddharth:
Thank you for your attention, and wait for your update.
Best regards,
Green
Otherwise, customer wonder whether this question is related to MDIO and MCLK of EMAC?
The MDC clock described in MAC_MDIO_Address register is about 1.0~2.5MHZ:
Should the clock signal on the MDC pin be a continuous periodic signal?
The customer tests his program, as long as the clock signal can be measured on the MDC pin when the read and write PHY registers are initialized, and then there is no signal (continuously low).
In addition, he found a related post, which describes that when MII and RMII are enabled in the PINMUX window, MDIO and MCLK are not selected. They must be selected manually.
Green,
Apart from the above mentioned changes, RMII clock source has to be configured.
The CLK_SRC_SEL field of EMACSS_CTRLSTS register is used to decide the source of the RMII clock (external or internal).
Pls refer the section "RMII Mode Clocking" from the TRM - https://www.ti.com/lit/ug/spruii0c/spruii0c.pdf
Best Regards
Siddharth
Hi Siddharth:
Customer feedback that he set the external clock as RMII clock source, and the 50MHz clock signal can be detected at ENET_RMII_CLK pin.
Chip can send data normally and data signal can be detected by oscilloscope, also data can be detected at RX port. But adding a breakpoint at the RX interrupt has no effect.
Best regards,
Green
Green,
Which PHY is the customer using?
Is the issue that the interrupts are not occuring ? Is the customer able to send/receive data?
Best Regards
Siddharth
Hi Siddharth:
Customer replied:
He is using LAN8720 for PHY, and it sometimes(occasionally) send/receive data normal using loopback routine.
Best regards,
Green
Green,
Not sure what could be the issue. You can request the customer to look at the LAN8720 forum to see if there is any specific configuration needed for LAN8720. Also came across this post where it mentions that the default address is different
https://blog.fearcat.in/a?ID=01800-a6e5d3be-e6d8-48d1-a312-96318ea362d3
Best Regards
Siddharth