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.

TM4C1294KCPDT: Loading Firmware through UART using LM Flash Programmer

Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: TM4C1294NCPDT, EK-TM4C1294XL

Tool/software:

Dear Team,

We are using TM4C1294KCPDT based customized board for one our application which uses TCP/IP communication and RS-232 Communication. For this application both LAN and RS-232 communication works well and the communication is consistent. The RS 232 driver is connected to UART0 pins in MCU. We would like to use Rs-232 Port (through UART0) to load the firmware by avoiding JTAG. I have used the bootloader example which I already implemented in other custom board using TM4C1294NCPDT couple of years back where I used LM flash programmer to load the software through Serial. It worked well there and I am trying to replicate the same in this project, I am getting error message in LM flash programmer saying baud rate could not sync to target.

I am attaching the below bootloader code which will execute when some Switch is pressed for some time used to enter boot mode. The same code worked in TM4C1294NCPDT in previous project so that I could load the firmware through LM flash programmer and could not able to get it done in TM4C1294KCPDT. The schematics are same regarding MCU UART Pins. Only difference is currently I am using RS-232 Port connected to UART0 to load the firmware but in previous I used FT232 USB to UART chip to UART0 MCU Pins. I verified the baud rate too in code and LM flash programmer. 

Is that anything I am missing?

void UpdateFW(void)   -----> It will be executed when boot switch is pressed for 5 Seconds
{
SysCtlDelay(200000);

// Disable all Interrupts
ROM_IntMasterDisable();
ROM_SysTickIntDisable();
ROM_SysTickDisable();

HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;
HWREG(NVIC_DIS2) = 0xffffffff;
HWREG(NVIC_DIS3) = 0xffffffff;
HWREG(NVIC_DIS4) = 0xffffffff;

// Configure UART0 for PA0 and PA1 for Serial Bootloader
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

ROM_UARTConfigSetExpClk(UART0_BASE, g_ui32SysClock, 115200 ,(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));

ROM_IntEnable(INT_UART0);
//ROM_UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);

ROM_SysCtlDelay(g_ui32SysClock / 3);

ROM_IntMasterEnable();

ROM_UpdateUART();
}

 

Regards,

Arjun Devadass

Director - Technology

ELDAPS Technology Solutions Pvt Ltd

  • Hi Arjun,

    Only difference is currently I am using RS-232 Port connected to UART0 to load the firmware but in previous I used FT232 USB to UART chip to UART0 MCU Pins. I verified the baud rate too in code and LM flash programmer. 

     I'm not sure if there is a RS232 driver issue on your PC side. 

      In LM flash programmer you should disable Auto Baud Support. 

      Are you able to run the example C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\boot_demo_uart_rom in TivaWare SDK as-is? Do you have the same issue?  This example will jump to the ROM bootloader by calling ROM_UpdateUART. 

      I will suggest you run both the example as well your own code on a LaunchPad. This way, we can better narrow down the problem area. 

      Please also try the command line sflash.exe. Do you have the same issue as LM Flash Programmer?

  • Thanks Charles,

    I am using RS-232 to USB converter to interface to my PC and it works well because i could read RS-232 data from application which I use as debug log. Hope that will not be the issue. Let me check with demo code once in Launchpad. If its working then PC side should be fine. Will get back to you soon.

    Regards,

    Arjun Devadass

    Director - Technology

    ELDAPS Technology Solutions Pvt Ltd