• 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 » C2000™ Microcontrollers » C2000 32-bit Microcontrollers Forum » Looking for guidance on an approach to executing either of two runtime/boot-time selectable images stored in Flash (using OTP, or another technique)
Share
C2000™ Microcontrollers
  • Forums
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
C2000 Resources
  • Product Folder
  • C2000 Training Portal
  • C2000 Technical Training Catalog
  • C2000 Datasheets, App Notes, User Guides
  • C2000 Hardware Design Kits
  • controlSUITE for C2000 Software Library


  • InstaSPIN Resources
  • What is InstaSPIN?
  • Videos and Support


  • InstaSPIN-FOC and InstaSPIN-MOTION Resources
  • What is InstaSPIN-FOC?
  • What is InstaSPIN-MOTION?
  • Product Folder: F28069F, F28068F, F28062F, F28068M, F28069M
  • User’s Guide
  • Technical User’s Manual
  • Tools
  • Forums

    Looking for guidance on an approach to executing either of two runtime/boot-time selectable images stored in Flash (using OTP, or another technique)

    This question has suggested answer(s)
    Greg Oakes
    Posted by Greg Oakes
    on Mar 02 2012 10:35 AM
    Intellectual590 points

    Looking for guidance on an approach to executing either of two runtime/boot-time selectable images stored in Flash (using OTP, or another technique). The two images would potentially be slightly different verions of the same application.

    Envision this involving a standard boot from flash where a very small routine would query for the desired boot version whereafter the desired copy of the application would then be loaded.  Running from Flash may be a possibility, either for the initial small querry routine, or for the application.

    TMS320F28335

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Santosh Athuru
      Posted by Santosh Athuru
      on Apr 03 2012 11:24 AM
      Expert7400 points

      Hi Greg,

      I don't see why you can't do that or I don't understand the question completely. Once the device boots to flash it is in appication domain and customers could put whatever code they want -right? As you mentioned you could use boot-to-flash or boot-to-otp option and have a small routine which is called from the default entry point, this routine finds and starts the right application within flash or can call back any peripheral loader as it seems fit for your applicaiton.

      If you choose to use boot -to-otp option, make sure you validate the function properly before programming it in OTP.

      Please refer to http://www.ti.com/litv/pdf/spru963a - bootROM guide for the device and let us know if you have any queries.

       

      Please let us know if you have any clarifications.

       

      Best Regards

      santosh

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Trey German
      Posted by Trey German
      on Apr 03 2012 12:45 PM
      Genius14440 points

      Greg,

      I'm curious how you intend to decide which image to load?  Unless you only want to boot the second image after a warm boot (i.e. power not removed) RAM is off limits for making the decision.  This leaves a GPIO or a bit in flash.  Keep in mind that flash can only be erased in sectors, so if you are planning on using a bit in flash to make the boot determination you'll have to erase and reprogram a whole sector.

      Trey

      Trey German

      C2000 Applications

      If a post answers your question, please mark it with the "verify answer" button.
      Visit these helpful C2000 Links!
      C2000 TI Wiki Pages
      TI Forum Sitemap
      ControlSUITE
      C2000 Getting Started
      CLA FAQs
      Workshop Material!
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Greg Oakes
      Posted by Greg Oakes
      on Apr 03 2012 16:40 PM
      Intellectual590 points

      The original idea was that one would be the default image and the other used for continued develpment and evaluating the effect of modifications.

      When you say that RAM is off-limits unless we only want to boot the second image after a warm boot, are you stating what may be the obvious, that only booting from RAM can occur in a warm start, and booting from Flash can not occur in a warm start ?

      With regard to the two alternatives, either a GPIO pin would be programmed to be used as an "input", or each time we needed to change the choice of image to load a sector in flash would be re-programmed (including a single image selection bit), and the GPIO input or the bit in flash would be read and used to indicate the image to be loaded.  Can the GPIO Control registers be set up prior to booting ?  What would the control flow look like, including the instruction (and its location) to read the bit in flash or the GPIO input, and the instructions (and their location) which use the bit indication or GPIO indication to load the selected image ?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Trey German
      Posted by Trey German
      on Apr 04 2012 07:48 AM
      Suggested Answer
      Genius14440 points

      Greg,

      When I was talking about RAM I was also referring to using that as a image selection mechanism.  Your application could potentially check a bit in RAM to decide which image to load, but this bit would only be valid after a warm boot.  I'm not referring to actually booting from RAM.

      Given the flexibility you are looking for, I would recommend you use a GPIO to make the boot decision.  From your questions it sounds like you have the impression that there is a mechanism in place to do this dual boot, but this isn't the case.  There is only a single boot to flash vector, so initially there is only one execution path until the chip starts to execute your code.  What you really need is a small flash bootloader which will perform the GPIO check and then branch to one of the images.  If your applications don't use up the entire flash I would recommend you put the bootloader in one sector and the two applications in other sectors.  This will help to keep the code compartmentalized.

      To answer your questions directly:

      No the GPIO registers cannot be setup prior to booting, but your bootloader may set them up just like it were an application when it is trying to make the boot decision.

      Boot flow:

      Power up -> BootROM executes and boots to flash -> Greg's bootloader configures GPIO -> make boot decision -> branch to one of two images in flash -> Greg's main application runs.

      You can use the normal controlSUITE software to write this little bootloader as well as your application.

      Regards,

      Trey

      Trey German

      C2000 Applications

      If a post answers your question, please mark it with the "verify answer" button.
      Visit these helpful C2000 Links!
      C2000 TI Wiki Pages
      TI Forum Sitemap
      ControlSUITE
      C2000 Getting Started
      CLA FAQs
      Workshop Material!
      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