Skip to main content
sima
Associate III
March 10, 2009
Question

Ideas for calling bootloader from application code?

  • March 10, 2009
  • 4 replies
  • 693 views
Posted on March 10, 2009 at 05:39

Ideas for calling bootloader from application code?

    This topic has been closed for replies.

    4 replies

    sima
    simaAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:05

    But I thought using SRAM was easier and faster.

    I dont't think SRAM gets erased if I jump to the bootloaders Reset_Handler()?

    Or does it get erased by the start up code before main()?

    trevor1
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:05

    Hi

    You could just save the data in backup registers and then reset to run your bootloader. The bootloader will then be able to read the backup registers. This is what I do.

    The backup registers are not cleared by a reset.

    Regards

    Trevor

    sima
    simaAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:05

    Hello all, a boot loader question again :-]

    I want to be able to activate the boot loader from my application code. I have an idea how to do that.

    At reset, the boot loader is called. If the boot loader doesn’t receive any boot loader specific command within X second it calls the application code through it’s reset vector.

    When the application code receives a boot loader specific command it must call the boot loader though the boot loaders reset vector.

    But before the call I save information in SRAM at a specific location to indicate to the boot loader what command was received so the boot loader can continue from that point.

    What do you think of the idea?

    trevor1
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:05

    I'm not sure, I guess it depends on your pre main start-up code -- which will depend on what tools you are using. It should be easy to try.