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.

ROM bootloader help

Other Parts Discussed in Thread: EK-LM3S3748, LM3S3748

Hi,

I have a working program compiled in CCS running on a LM4F launchpad.

I want to add uart bootloader function such that I can call ROM_UpdateUART() from my application, then use LMFlash or custom code to update my app.

Also want to be able to run the ROM bootloader by holding a GPIO pin at reset so need to change BOOTCFG (how?).

I can't find any examples of using the ROM bootloader at all and there is only very brief mention in the ROM user guide.

Can anyone point me in the right direction please?

Cheers

Richard

  • Hi Richard,

       As far as I know, there are no ROM boot loader example programs. Read the Boot Loader User Guide, for further info.  

    -kel

  • Oh, er thanks.

    How is anyone suppose to find out how to use it then?

    The TivaWare Boot Loader User Guide does not even mention ROM_UpdateUART().

    The Tiva ROM User Guide gives a brief function summary of ROM_UpdateUART(), but nothing about using it.

    The chips individual Data Sheet just gives an overview of the bootloader.

    I've tried guessing.

    What else can I do?

    Richard

  • Hi Richard,

    There is an example program for uart boot loader. You just need to modify it for your purpose. See boot_serial, boot_demo1, and boot_demo2 example programs from the link below.

        http://www.ti.com/tool/sw-ek-lm4f232

    -kel

  • Thanks, but none of these examples use ROM_UpdateUART().

    Or am I missing something here?

  • I can't find any examples of programming BOOTCFG either...

  • Richard Bland said:
    The TivaWare Boot Loader User Guide does not even mention ROM_UpdateUART().

    Agree that TivaWare" Boot Loader USER'S GUIDE SW-BOOTLDR-UG-1.0 doesn't mention ROM_UpdateUART. However, my understanding of the TivaWare Boot Loader User Guide is that is documenting the source code for a boot loader which can be programmed into the user flash, rather than describing the boot loader in the mask programmed ROM.

    Richard Bland said:
    The chips individual Data Sheet just gives an overview of the bootloader.

    Looking at LM4F120H5QR ROM USER’S GUIDE ROM-LM4F120H5QR-UG-730 section 2.2.1 UART Interface, section 2.2.4 Serial Protocol and section 20.2.1.37 ROM_UpdateUART appear to have sufficient information on how to call ROM_UpdateUART from your application. In summary, you just have to:
    - Enable the UART0 peripheral
    - Configure the pins for UART0 Rx and Tx
    - Set the required baud rate for UART0
    - Call ROM_UpdateUART to listen on an update on UART0, which should never return

    While TivaWare 1.0 doesn't contain any examples which use ROM_UpdateUART, StellarisWare contains boards\ek-lm3s3748\boot_demo1\boot_demo1.c and boards\ek-lm3s3748\boot_demo2\boot_demo2.c examples which do call ROM_UpdateUART. While the StellarisWare examples were written for a LM3, the usage of ROM_UpdateUART documented in the LM4F ROM user's guide is the same as in the LM3 examples.

  • Chester - Thank you for finding the Stellarisware examples on the LM3S3748 for me, I would never have found them myself.

    All working fine now - turned out to be a simple error in setting up the uart - just shows how important example software is - reading the data sheets and user guides over and over hunting for that one little bit of misunderstanding can be very demoralising and time-consuming, but four lines of working code says it all!

    Do you happen to know of an example of programming BOOTCFG? I want to be able to force entry to the bootloader when I boot with a gpio pin held low, but I am confused over programming the FMA, FMD, and FMC registers - or can I use ROM_Flash functions?

    Thanks again - this E2E forum has helped me enormously over the last few months.

  • Hi,

        Search the forum. Here is one below. Read about BOOTCFG at your device datasheet. 

        http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/255896.aspx

    -kel