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.

TM4C123GH6PM: configuration issue

Part Number: TM4C123GH6PM

Tool/software:

Hi!!

I am trying to implement bootloader for TM4C123GH6PM at first i tried to make changes in the example project given in Tiva series (demo_serial example project) from UART0 to UART1 in bl_config.h file as shown and flashed the bin file tried to flash boot_demo1 using LM Flasher via UART but it is not flashing what might be the issue??? All the changes that i have made is configuring the UART from 0 to 1 but it is not working.

regards,

ANIL.

// Selects the clock enable for the UART peripheral module
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UARTx_BASE
//
//*****************************************************************************
#define UART_CLOCK_ENABLE     SYSCTL_RCGCUART_R1

//*****************************************************************************
//
// Selects the base address of the UART peripheral module
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_CLOCK_ENABLE
//
//*****************************************************************************
#define UARTx_BASE     UART1_BASE

//*****************************************************************************
//
// Selects the clock enable for the GPIO corresponding to UART RX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_RXPIN_BASE, UART_RXPIN_PCTL and UART_RXPIN_POS
//
//*****************************************************************************
#define UART_RXPIN_CLOCK_ENABLE     SYSCTL_RCGCGPIO_R2

//*****************************************************************************
//
// Selects the base address for the GPIO corresponding to UART RX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_RXPIN_CLOCK_ENABLE, UART_RXPIN_PCTL and UART_RXPIN_POS
//
//*****************************************************************************
#define UART_RXPIN_BASE     GPIO_PORTC_BASE

//*****************************************************************************
//
// Selects the port control value for the GPIO corresponding to UART RX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_RXPIN_CLOCK_ENABLE, UART_RXPIN_BASE and UART_RXPIN_POS
//
//*****************************************************************************
#define UART_RXPIN_PCTL     0x2

//*****************************************************************************
//
// Selects the pin number for the GPIO corresponding to UART RX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_RXPIN_CLOCK_ENABLE, UART_RXPIN_BASE and UART_RXPIN_PCTL
//
//*****************************************************************************
#define UART_RXPIN_POS     4

//*****************************************************************************
//
// Selects the clock enable for the GPIO corresponding to UART TX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_TXPIN_BASE, UART_TXPIN_PCTL and UART_TXPIN_POS
//
//*****************************************************************************
#define UART_TXPIN_CLOCK_ENABLE     SYSCTL_RCGCGPIO_R2

//*****************************************************************************
//
// Selects the base address for the GPIO corresponding to UART TX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_TXPIN_CLOCK_ENABLE, UART_TXPIN_PCTL and UART_TXPIN_POS
//
//*****************************************************************************
#define UART_TXPIN_BASE     GPIO_PORTC_BASE

//*****************************************************************************
//
// Selects the port control value for the GPIO corresponding to UART TX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_TXPIN_CLOCK_ENABLE, UART_TXPIN_BASE and UART_TXPIN_POS
//
//*****************************************************************************
#define UART_TXPIN_PCTL     0x2

//*****************************************************************************
//
// Selects the pin number for the GPIO corresponding to UART TX pin
//
// Depends on: UART_ENABLE_UPDATE
// Exclusive of: None
// Requires: UART_TXPIN_CLOCK_ENABLE, UART_TXPIN_BASE and UART_TXPIN_PCTL
//
//*****************************************************************************
#define UART_TXPIN_POS     5

//*****************************************************************************

  • I don't really see an issue with your bl_config.h file. 

    i tried to make changes in the example project given in Tiva series (demo_serial example project) from UART0 to UART1 in bl_config.h file as shown

    After you build the bootloader for UART1, did you first program this bootloader to the flash using JTAG interface? This bootloader must resides at 0x0. 

    and flashed the bin file tried to flash boot_demo1 using LM Flasher via UART but it is not flashing

    Do you have a USB to Serial adapter on UART1 for your custom board? The LaunchPad has a built-in USB to Serial adapter for UART0 that is part of the ICDI debug probe. Therefore, the boot_serial example will run of box on the LaunchPad.  For your custom board you must have a USB to Serial adapter in order to run the serial bootloader example using LM Flash Programmer. 

    Did you use the correct COM port? You can check the Windows Device Manager to find out under which COM port your USB to Serial adapter is enumerated.

    To further aid your debugging, a scope or a logic analyzer will be handy to probe the UART1TX and UART1RX pins on the MCU side as well as the corresponding pins from the adapter.

  •  Thanks for your reply Charles!!!

    After you build the bootloader for UART1, did you first program this bootloader to the flash using JTAG interface? This bootloader must resides at 0x0. 

    Yes! i have flashed the bootloader at first using JTAG which resides at 0x0.

    Do you have a USB to Serial adapter on UART1 for your custom board? I am using USB to serial adapter(MOXA) 

    And one more thing is that I have tried with UART0 there also it is not working how to debug this issue???

    I am using TM4C123GH6PM controller... every time it is throwing an error as shown above for both the UART's

  • And one more thing is that I have tried with UART0 there also it is not working how to debug this issue???

    I am using TM4C123GH6PM controller... every time it is throwing an error as shown above for both the UART's

    Can you show your Windows Device Manager which COM port your MOXA is enumerated with?

    Can you show your LM Flash Programmer configuration as below. I want to use what you specify on the LM flash programmer is matching the Windows Device Manger. Below is only my setting. My COM port will be different than yours. 

    Can you show a scope cap or Logic Analyzer cap for the TX and RX pins from MOXA and the MCU?

    Can you run the stock boot_serial on the LaunchPad? Can you first get it to work?