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.

TM4C1294NCPDT: How to set ETH LED diodes

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL

Hello,

I am not able to set ETH LEDs(inside RJ45 connector) as I would expect. 

During inicialization I have setted ETH LEDs to signalizace "Link OK" and "RX/TX activity" by command :

EMACPHYExtendedWrite(EMAC0_BASE, 0, 0x025, 0x201); -- > it works,but LEDs are just ON or OFF according to status. No blinking

I have tried to set register „Ethernet PHY LED Control“ - MR24 (EPHYLEDCR) at addres 0x018 for blinking LEDs at 5Hz, but it do not work (no reacition for setting of this parameter.

Please can you help me how to set this register for blinking ETH LEDs?

  • Hi Jonas,

      Did you use EMACPHYWrite or EMACPHYExtendedWrite to write to the EPHYLEDCR? The EPHYLEDCR is MR24 which should be accessed using EMACPHYWrite(). Just wanted to make sure if the correct one is used. 

      Can you try EMACPHYWrite(EMAC0_BASE, 0, 0x018, 0x0400); // 5Hz blink rate

      It will be good if you have a scope to measure the blink rate and perhaps play with different blink rates.

  • Hi Charles,

    it is do not work. Now I set these parameters just after ethernet inicialization ( so I do it just once, not in loop).

    EMACPHYExtendedWrite(EMAC0_BASE, 0, 0x025, 0x201); // LED signalization link OK, RX/TX activity

    EMACPHYWrite(EMAC0_BASE, 0, 0x018, 0x0400); // 5Hz blink rate

    and LEDs are just ON or OFF(according to status), no blinking.

    When I erase setting of these parameters LEDs are just ON forever.

    My ethernet LEDs are at port PF0 and PF4.

    Do you have some complete code example where is this setting? I know that new kits EK-TM4C1294XL already have this setting in controller from production. Can you share a setting from this kit? I use the same LEDs like on this kit.

    Thank you in advance for your help

    Jonas M.

  • Hi,

      The TivaWare Ethernet examples such as enet_lwip or enet_io does not modify the blink rate register. The only thing that was done for these examples on the PF0 and PF4 are the multiplex configuration. The default blink rate is 5Hz. When I run the example, I could see the LED0 (going ON and OFF repeatedly) reflecting the TX/RX status but the LED1 is always ON. The LED1 is configured to show the link OK status. I tend to think the Link OK status will just remain high once the link is established and unaffected by the blink rate. If I change the blink rate I don't really see the LED0 blinking any faster or slower. The LED1 will still remain high.

      Can you run your code on the LaunchPad and do you see any difference?

  • Hello,

    thank you for help.

    Problem is fixed, my actual code :

    GPIOPinConfigure(GPIO_PF0_EN0LED0);
    GPIOPinConfigure(GPIO_PF4_EN0LED1);
    GPIOPinTypeEthernetLED(GPIO_PORTF_BASE, GPIO_PIN_0 | GPIO_PIN_4);
    EMACPHYExtendedWrite(EMAC0_BASE, 0, 0x025, 0x80); // LEFT led link OK, RIGHT led blinking at RX/TX activity
    EMACPHYWrite(EMAC0_BASE, 0, 0x018, 0x0400); // 5Hz blink rate

    Problem was in configuratuon of ENOLEDs.

    Now one LED shows LINK status and second blink at RX/TX activity.

    Thank you again.

    BR

    Jonas M.