i tried doing it with this code.
but it doesnt work on the board
/*
* main.c
*/
#include "tm4c123gh6pm.h"
#include "xdc/std.h"
#include "hw_gpio.h"
#include "hw_memmap.h"
#include "hw_sysctl.h"
#include "hw_types.h"
#include "gpio.h"
#include "rom.h"
#include "sysctl.h"
#include "stdint.h"
#include "stdbool.h"
#include "pin_map.h"
int
main(void)
{
volatile unsigned long ulLoop;
//volatile unsigned long status;
//
// Enable the GPIO port that is used for the on-board LED.
//
SYSCTL_RCGC2_R = SYSCTL_RCGC2_GPIOE;
//
// Do a dummy read to insert a few cycles after enabling the peripheral.
//
ulLoop = SYSCTL_RCGC2_R;
//
// Enable the GPIO pin for the LED (PF3). Set the direction as output, and
// enable the GPIO pin for digital function.
//
GPIO_PORTE_DIR_R = 0x08;
GPIO_PORTE_DEN_R = 0x08;
//SYSCTL_RCGC2_R = SYSCTL_RCGC2_GPIOF;
GPIO_PORTF_DIR_R = 0x00;
GPIO_PORTF_DEN_R = 0x08;
//status=GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_3);
//
// Loop forever.
//
while(1)
{
if ((GPIO_PORTF_DATA_R & 0x08) == 0x08)
{
//
// Turn on the LED.
//
GPIO_PORTE_DATA_R |= 0x08;
//
// Delay for a bit.
//
for(ulLoop = 0; ulLoop < 200000; ulLoop++);
//
// Turn off the LED.
//
GPIO_PORTE_DATA_R &= ~(0x08);
//
// Delay for a bit.
//
for(ulLoop = 0; ulLoop < 200000; ulLoop++);
}
else
GPIO_PORTE_DATA_R &= ~(0x08);
}
}