• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Boot Loader
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Boot Loader

    Boot Loader

    This question has suggested answer(s)
    Dan Nelson
    Posted by Dan Nelson
    on Apr 29 2012 23:13 PM
    Intellectual290 points

    I'm not having any joy with the boot loader on the LM3S9D92 evaluation kit.  It's not responding to any commands sent to it.

    I'm trying to use it on uart0 on PA0 and PA1.  (I've cut the tracks that go to the 10 way header on the dev board, so that's not a problem.)  I know that I've got a connection to my loading processor because I've written a couple of programs that prove that the two devices are talking to each other over this port.  I'm using a baud rate of 115200, although I've tried 9600 as well.

    I've tried to go into the ROM boot loader three different ways.  The first was by configuring the BOOTCFG register, which proved somewhat difficult but I managed to get it to work.  Also did a mass erase of the FLASH and assumed this would put it in boot loader mode on reset.  Thirdly I tried the following code which I found through Google:

    (*((void (*)(void))(*(unsigned long *)0x2c)))();

    I've assumed that one of the above methods would work to start the ROM boot loader.

    I've tried to 'ping' from my loading device by sending 0x20 at some regular interval.  Nothing.  Don't see anything on the oscilloscope either.  Thought maybe it needed a full packet with checksum and size so I sent a 0x03,0x20,0x20 string with no result.  Have also tried a 0x23 'get status' command with no reply.

    Thanks

    Dan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Dan Nelson
      Posted by Dan Nelson
      on Apr 30 2012 03:56 AM
      Intellectual290 points

      How do you actually do a callback to the ROM bootloader?  I can see that  (*((void (*)(void))(*(unsigned long *)0x2c)))(); will only go to the svcall vector that in all the example code only goes to a default function that while loops.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Dan Nelson
      Posted by Dan Nelson
      on Apr 30 2012 20:55 PM
      Intellectual290 points

      Okay, I've got it working.  Thought that because it was autobauding that I should send a few regularly spaced bits with some 0x55 packets first.  That seemed to do the trick.

      Would still like to know how to do a callback to the ROM boot loader.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Erick Macias
      Posted by Erick Macias
      on May 02 2012 17:35 PM
      Suggested Answer
      Intellectual1860 points

      Hello Dan,

      The ROM bootloaders are called using the following functions (Included in Stellarisware/driverlib/rom.h):

      - ROM_UpdateSSI

      - ROM_UpdateI2C

      - ROM_UpdateEthernet

      - ROM_UpdateUSB

      - ROM_UpdateUART

      The peripheral chosen for the bootlader must be fully initialized when the function gets called.

      I'll discuss an example of the Ethernet ROM bootloader below.

      The Ethernet ROM bootloader is called using the ROM_UpdateEthernet(), once the Ethernet peripheral has been fully initialized ( MAC + PHY).

      The boot_demo_eth code example provides the necessary steps to initialize the Ethernet peripheral. See the modified boot_demo_eth.c attached.

      0652.boot_demo_eth.c

      Steps required to a Ethernet ROM bootloader:

      - Initialize clock to 50 MHz ( Note: The clock frequency can be changed to suit your application)

      - PinoutSet() : Set the device pinout for the appropriate board

      - SetupForEthernet()

      - Configure SysTick for 100 Hz Interrupt

      - Configure the Ethernet LEDs

      - Get the MAC address and store it in putMACAddr[]

      - Initialize the lwIP TCP/IP Stack

      - Set up UDP PCB to allow the Ethernet to acknowledge the magic packet LMFlash sends at the beginning of an bootload update

      - Enable Interrupts

      - Wait until LMFlash sends the magic packet, making g_bFirmwareUpdate value to true

      - Disable Interrupts

      - Execute ROM_UpdateEthernet(ROM_SysCtlClockGet())

      The boot_demo_eth assumes there a bootloader in the memory location 0x0000-0x1800, thus the main application is programmed starting in address 0x1800. There are two options to successfully update the bootloader:

      1. (Recommended) In the case the board will only be updated using the ROM bootloader, having a flash bootloader at location 0x0000 is not necessary. The linker file for the IDE you are using must be changed to define FLASH memory to start at 0x00000000, instead of 0x00001800, and finish in memory location 0x0003ffff (length = 0x40000). There are several IDEs supported by Stellaris, and each one has a different linker file:

      - CCS: *.cmd

      - IAR: *.icf

      - Keil: *.sct

      2. Download a bootloader with LMFlash Programmer (i.e. boot_serial code example), then program the boot_demo_eth in memory location 0x1800. When the board boots up it initially goes to memory location 0x0000, the Serial flash bootloader in Stellarisware initially jumps to 0x00001800 and check if the memory value is 0xFFFF. If it is 0xFFFF, it goes back to the Serial boot loader and initializes the Serial peripheral and waits for an update. In this case the memory value is not 0xFFFF, thus the main application will execute and callback the ROM Ethernet bootloader.

      All the ROM bootloaders (included in Stellarisware/driverlib/rom.h) update the board starting in memory location 0x00000000. The Ethernet flash bootloader always updates the application starting in 0x00001800(specified in the boot_eth application) . The other four flash bootloaders (UART, I2C, SSI, and USB) allow the user to choose the memory location to download the main application during the application update.

      Let me know if you have further questions.

      - Erick

      ---------------------------------------------------------------------------------------------------------
      Please click the Verify Answer
      button on this post if it answers your question.
      ---------------------------------------------------------------------------------------------------------

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Chakra Divi
      Posted by Chakra Divi
      on Dec 20 2012 06:29 AM
      Prodigy30 points

      Hello Erick,

      Im using SSI to update the application. In this process, i called the bootloader using ROM_UpdateSSI. After this i could not communicate to the bootloader. Im sending COMMAND_PING command - but bootlader is not responding. Do we need to modify command before sending to it, append with number of commands ? How should i prepare a packet to communicate with the bootloader ?

      Thanks - Chakra

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use