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.

CCS/TM4C1294NCPDT: ROM based bootloader

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

Tool/software: Code Composer Studio

I am using TIVA TM4C1294NCPDT controller and TivaWare_C_Series-2.1.4.178. (I am using Launchpad_EK-TM4C1294XL)

Here I can see the flash based boot loader example (UART and demo)

Where can I get the rom based boot loader example?

In flash based boot loader I am having following issue,

1. During app code up gradation, if power fails or any cable disconnection occurs, then we need to download the boot loader via CCS after that only uart boot loader is working via LM flash programming.

If ROM based boot loader is used do I come out of this issue?

Regards,

Iyyappan.V

  • Hello Iyyappan,

    There isn't exactly a ROM boot loader example because the ROM boot loader is invoked based on the device flash memory being empty. So all you need to do is clear the flash of your device with Uniflash or LM Flash Programmer, and then try the same methods of boot loading as you did with the Flash version.

    Note that with the ROM bootloader, you won't be able to make special configurations to the boot loader, it's just a generic boot loader that you can invoke on parts without flash programmed (like all new devices received).

    You would have more issues with power loss with a ROM boot loader as with a Flash boot loader you can add a fail safe like a button to trigger boot loader operation to re-attempt the boot loader process if it was interrupted and incomplete due to power loss.

  • Thankyou Mr.Ralph Jacobi.

    Can you give some sample code for fail safe option. Because during app code download partial code is flashed and so app code is not running. At the same time boot loader code also not invoked.

    Regards

    Iyyappan

  • Hello Iyyappan,

    We don't have an example that already has the GPIO force update enabled in it, but this feature is included in the bl_config.h file and is very easy to enable so I think you will be fine to test this.

    If you have any application code that invokes the boot loader as well, then make sure that CheckForceUpdate is used as that API will both check for the Flash condition as well as the GPIO.

    But for the flash boot loader in general, ENABLE_UPDATE_CHECK will configure the Flash boot loader to check for the GPIO, and so if you didn't corrupt your flash boot loader, you can force the update via GPIO that way.

    As far as enabling it, look for and toggle on these elements, and set it for one of your switches to test it out:

    //*****************************************************************************
    //
    // Enables the pin-based forced update check.  When enabled, the boot loader
    // will go into update mode instead of calling the application if a pin is read
    // at a particular polarity, forcing an update operation.  In either case, the
    // application is still able to return control to the boot loader in order to
    // start an update.  For applications which need to perform more complex
    // checking than is possible using a single GPIO, a hook function may be
    // provided using BL_CHECK_UPDATE_FN_HOOK instead.
    //
    // Depends on: None
    // Exclusive of: None
    // Requires: FORCED_UPDATE_PERIPH, FORCED_UPDATE_PORT, FORCED_UPDATE_PIN,
    //           FORCED_UPDATE_POLARITY
    //
    //*****************************************************************************
    #define ENABLE_UPDATE_CHECK
    
    //*****************************************************************************
    //
    // The GPIO module to enable in order to check for a forced update.  This will
    // be one of the SYSCTL_RCGC2_GPIOx values, where "x" is replaced with the port
    // name (such as B).  The value of "x" should match the value of "x" for
    // FORCED_UPDATE_PORT.
    //
    // Depends on: ENABLE_UPDATE_CHECK
    // Exclusive of: None
    // Requries: None
    //
    //*****************************************************************************
    #define FORCED_UPDATE_PERIPH    SYSCTL_RCGC2_GPIOB
    
    //*****************************************************************************
    //
    // The GPIO port to check for a forced update.  This will be one of the
    // GPIO_PORTx_BASE values, where "x" is replaced with the port name (such as
    // B).  The value of "x" should match the value of "x" for
    // FORCED_UPDATE_PERIPH.
    //
    // Depends on: ENABLE_UPDATE_CHECK
    // Exclusive of: None
    // Requries: None
    //
    //*****************************************************************************
    #define FORCED_UPDATE_PORT      GPIO_PORTB_BASE
    
    //*****************************************************************************
    //
    // The pin to check for a forced update.  This is a value between 0 and 7.
    //
    // Depends on: ENABLE_UPDATE_CHECK
    // Exclusive of: None
    // Requries: None
    //
    //*****************************************************************************
    #define FORCED_UPDATE_PIN       4
    
    //*****************************************************************************
    //
    // The polarity of the GPIO pin that results in a forced update.  This value
    // should be 0 if the pin should be low and 1 if the pin should be high.
    //
    // Depends on: ENABLE_UPDATE_CHECK
    // Exclusive of: None
    // Requries: None
    //
    //*****************************************************************************
    #define FORCED_UPDATE_POLARITY  0