I am working on a TI's TM4C1294XL LaunchPad with KEIL and I had a problem at the begining. I installed all the drivers for both USB and KEIL then I succesfully upload TI's blinky example to board it worked without a problem. After that I add some very basic code, in the default program it only blinks the PN0 user LED and I add some code to blink PN1 additionally but nothing has changed. PN0 LED still blinking but PN1 is not. I tried to blink other onboard LEDS PF0, PF4 but the result is same. Here is the code:
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "driverlib/debug.h"
#include "driverlib/gpio.h"
#include "driverlib/sysctl.h"
/**
* @brief Program main function
* @param void
* @retval none
*/
int main(void)
{
volatile uint32_t ui32Loop;
/* Enable PORTN peripheral access */
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
/* Check if the peripheral access is enabled. */
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPION))
{
}
/* Enable the GPIO pin for the LEDS (PN0, PN1). Set the direction as output, and
enable the GPIO pin for digital function. */
GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_0);
GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_1);
while(1)
{
/* Turn on the LEDS. */
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, 0x01);
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0x01);
/* Delay for a bit. */
for(ui32Loop = 0; ui32Loop < 1200000; ui32Loop++)
{
}
/* Turn off the LEDS. */
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, 0x00);
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0x00);
/* Delay for a bit. */
for(ui32Loop = 0; ui32Loop < 1200000; ui32Loop++)
{
}
}
}
I have been working on ST's microcontrollers for over 2 years but I never have that kind of problem. Is it possible to problem caused by some write protection feature?