Part Number: EK-TM4C123GXL
I have attached my code below. In which I was trying to put breakpoints but not able to do so. What should be the reason??
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_nvic.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/systick.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
volatile uint32_t g_ui32Index;
volatile uint32_t g_ui32GPIOa;
void Delay(uint32_t ui32Seconds)
{
//
// Loop while there are more seconds to wait.
//
while(ui32Seconds--)
{
//
// Wait until the SysTick value is less than 1000.
//
while(MAP_SysTickValueGet() > 1000)
{
}
//
// Wait until the SysTick value is greater than 1000.
//
while(MAP_SysTickValueGet() < 1000)
{
}
}
}
void IntGPIOa(void)
{
//
// Set PE1 high to indicate entry to this interrupt handler.
//
MAP_GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_1, GPIO_PIN_1);
// Wait two seconds.
//
Delay(2);
//
// Save and increment the interrupt sequence number.
//
g_ui32GPIOa = g_ui32Index++;
//
// Set PE1 low to indicate exit from this interrupt handler.
//
MAP_GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_1, 0);
}
void UART0_init(uint32_t SysClock)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTConfigSetExpClk(UART0_BASE,SysClock, 115200,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));
UARTStdioConfig(0, 115200, SysClock);
}
void UART_SendData(unsigned char c)
{
UARTCharPut(UART0_BASE, c);
}
char UART_GetData()
{
char d;
d = UARTCharGet(UART0_BASE);
return (d);
}
int main(void)
{
uint32_t ui32SysClock;
char Tx;
SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);
ui32SysClock = SysCtlClockGet();
UART0_init(ui32SysClock);
UARTprintf("Enter the data\n");
while(1)
{
Tx = UART_GetData();
UART_SendData(Tx);
}
MAP_SysTickPeriodSet(MAP_SysCtlClockGet());
MAP_SysTickEnable();
MAP_IntMasterEnable();
MAP_IntEnable(INT_GPIOA_TM4C123);
MAP_IntPrioritySet(INT_GPIOA_TM4C123, 0x00);
}