Other Parts Discussed in Thread: DP83826E, DP83826I, AM2434
Hello,
we are using the MCU PLUS SDK 08.04.00.01.
On our board we have the DP83826-Ethernet Phy. We use the LEDs directly connected to the PHY: LED0 for Rx/Tx and LED2 for Link/100Mbit-signaling.
There is the DP83826E-driver available inside the SDK and I guess it's also usable for the DP83826-derivate.
So I tried setting it up like this:
ETHPHY_DP83826E_LedSourceConfig ledConfig; ETHPHY_DP83826E_LedBlinkRateConfig_s ledBlinkConfig; /* ACT-LED */ ledConfig.ledNum = ETHPHY_DP83826E_LED0; ledConfig.mode = ETHPHY_DP83826E_LED_MODE_LINK_OK_AND_BLINK_ON_RX_TX; ETHPHY_command(ðPhyConfig_, ETHPHY_CMD_CONFIGURE_LED_SOURCE, (void *)&ledConfig, sizeof(ledConfig)); /* LK-LED */ ledConfig.ledNum = ETHPHY_DP83826E_LED2; ledConfig.mode = ETHPHY_DP83826E_LED_MODE_SPEED_100BTX; ETHPHY_command(ðPhyConfig_, ETHPHY_CMD_CONFIGURE_LED_SOURCE, (void *)&ledConfig, sizeof(ledConfig)); ledBlinkConfig.rate = ETHPHY_DP83826E_LED_BLINK_RATE_200_MS; ETHPHY_command(ðPhyConfig_, ETHPHY_CMD_CONFIGURE_LED_BLINK_RATE, (void *)&ledBlinkConfig, sizeof(ledBlinkConfig));
unfortunately the LED2 stays off. I also tried setting it to ETHPHY_DP83826E_LED_MODE_LINK_OK, but also no success.
I checked the driver-implementation and can't see why it should not work.
I then checked the data sheet and also I cannot identify the problem.
The driver seems to init the LEDCFG-register correctly and the LED2_GPIO_CFG (which is set to 0008h = LED2 as default anyway) too.
Then I tried setting the LEDCFG2 (0x469)-register directly to 0xFFFF to check if the PHY would work and we may have a problem in hw. but then suddenly the LED turns on. so the LED2_drv_val set to 1 works.
I am not sure if I need to configure something special additionally but the data sheet does not tell to take any more action neither does the criver inside the SDK provide any more options on this.
Could it also be that the PHY itself has a bug here?
Our new layout is based on this implementation and it is important that this one works correctly.
Best regards
Felix