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.

tiva c launchpad TM4C123G, issue to load the program using debug

hi everybody,

i was practicing with the UART1 in my TIVAC TM4C123G , so when i load my program in keil, the board have  been proggramed without error's, and i saw the result in a terminal serial, good, but when i .

wanted to load other program in my tivac , keil show me this errors, warnings...

so i can't load programs in my tiva... this is actually setup.

when i was setup UART1 and called function's accidently i made mistakes such as:

void initUART( void ) {
............................. SYSCTL->RCGC1 = 0x02;                                 // uart 1                 
..............................SYSCTL->RCGC2|=0x04;                                // port c
..............................GPIOC->AFSEL=0x30;                                     // alter function  UART1  PC5 PC4
..............................GPIOC->PCTL=0x220000;                            // mux function 2 en 5 2 en 4
..............................GPIOC->DEN=0x30; // pin 5 pin4 3 2 1 0
                                                                                                                     // config de la uart
..............................UART1->CTL&=~0x01; // uart 0ff
                                                                                                                    // bauds
..............................UART1->IBRD=104;                       // 9600 baudios 80M 520 16M 104 +0.166666
..............................UART1->FBRD=10;                       // 9600 baudios 80M 53 16M 10

..............................UART1->LCRH=0x70; // 8 bits normal
..............................UART1->CTL|=0x01; // uart on
}

int main(void){
............................config();
............................initUART();
............................sprintf(&Buffer[0],"Hello world");
.............................while( 1 ){
...............................................GPIOF->DATA= 0x08;
...............................................writePort(&Buffer[0]);
...............................................delay();
...............................................GPIOF->DATA= 0x00;
...............................................delay();
.............................................}// end while loop
}// end main

void writePort(char *Buffer){
.........................while( *Buffer != NULL ){
.....................................putC(*Buffer);
......................................Buffer++;
..........................}
}

void putC(char c){

....................while( (UART1->FR & 0x20 ) == 1);

....................UART1->DR=c;
}

in this lastly condition in the while loop must be ****  while( (UART1->FR & 0x20 ) != 0 );  *****

i think that  i modified the JTAG debug... ( PORTC )

i have thought in proggraming use LM FLASH programmer but i haven't experience.....

so can someone helpme please ?? thanks

  • Hello Javier,

    I am not familiar with Keil, but in general it sounds like you locked the device. You can unlock your LaunchPad by using LM Flash Programmer. Go to "Other Utilities" and use the "Debug Port Unlock" feature for your TM4C MCU. Follow the steps very closely, and then your board should be programmable.

    Also after you do that, make sure to download TivaWare from http://www.ti.com/tool/SW-TM4C and use that instead. You won't easily lock up your MCU using our TivaWare API's :) - and also we do not support direct register programming, so if you run into any other issues, you'll want to be using TivaWare.