energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
795 stars 671 forks source link

[energia0101e0013] : TM4C1294 ethernet working, LINK and ACTIVITY Leds not working #518

Closed techsteph closed 9 years ago

techsteph commented 9 years ago

Hello,

I've managed to get Ethernet working with Energia 0013 by applying the fix to Etherner.h and tested the UdpNtpClient but neither the ACTIVITY_LED and LINK_LED are working.

I've checked in pin_energia.h and found:

define ACTIVITY_LED GPIO_PK6_EN0LED1

define ACTIVITY_LED_BASE GPIO_PORTK_BASE

define ACTIVITY_LED_PIN GPIO_PIN_6

define LINK_LED GPIO_PK4_EN0LED0

define LINK_LED_BASE GPIO_PORTK_BASE

define LINK_LED_PIN GPIO_PIN_4

In TI's user guide: D3 and D4 are connected to GPIOs PF4 and PF0, which can be controlled by user’s software or the integrated Ethernet module of the microcontroller.

Thanks a lot in advance for your support. ./Steph

techsteph commented 9 years ago

Update:

I was checking the wrong pins_energia.h !! The file in \energia-0101E0013\hardware\lm4f\variants\launchpad_129 has what I believe are the proper values;

define ACTIVITY_LED GPIO_PF4_EN0LED1

define ACTIVITY_LED_BASE GPIO_PORTF_BASE

define ACTIVITY_LED_PIN GPIO_PIN_4

define LINK_LED GPIO_PF0_EN0LED0

define LINK_LED_BASE GPIO_PORTF_BASE

define LINK_LED_PIN GPIO_PIN_0

but I still have the issue...

PS: I'm using a Tiva™ C Series TM4C1294 Connected LaunchPad

spirilis commented 9 years ago

Looks like the Ethernet library has a function called "enableActivityLed()", so try that.

Ethernet.enableActivityLed(); Also Ethernet.enableLinkLed();

From Ethernet.cpp:

void EthernetClass::enableLinkLed()
{
        ROM_GPIOPinConfigure(LINK_LED);
        GPIOPinTypeEthernetLED(LINK_LED_BASE, LINK_LED_PIN);
}

void EthernetClass::enableActivityLed()
{
        ROM_GPIOPinConfigure(ACTIVITY_LED);
        GPIOPinTypeEthernetLED(ACTIVITY_LED_BASE, ACTIVITY_LED_PIN);
}
techsteph commented 9 years ago

Works like a charm now ; I thought it was enabled by default. Thanks very much Eric. ./Steph