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.

spma074: Serial Boot Loader example questions

Thanks to Amit I have replicated the example spma074 but have a question about the state of the target.

When I download an app from Host GUI thru programmer to target, target immediately executes app upon completion of the dl.

But after a power cycle I must press the target reset button before the target app code executes. So it would appear that the target stays in the bootloader upon power up rather than going to the app. I also tried disconnecting the GPIO pin used to force the target into Bootloader, but thats not it.

I suspect it is in the tmc_device_recovery_code, in the setting of the HWREGs(probably FLASH_BOOTCFG). Is there a good description of how hw_flash.h can be used? I have looked in data sheet for TM4C1294, BootLoader Users Guide(spmu301a), and ROM Users Guide (spmu363a) but no luck so far in setting up FLASH_BOOTCFG beyond this single example.

I'd like to be able to jump from app into ROM bootloader (example already jumps from ROM bootloader to app upon completion -> basically I'd like to sw trigger the jump to bootloader as opposed to using GPIO pin) and to have app run from power up rather than stay in bootloader waiting for reset button.

Thanks,

-Phil B

  • I'd suspect this post would be resolved faster & be more useful to (so many) here if you migrated it to Amit's "sticky" - which was intended as a, "Central Spot/Repository for Boot-Load Issues."

    It's good that you signaled your read/review of Amit's (simply terrific) SPMA074 (Boot-Loader in detail) and your comments & questions therein (that sticky post) would make far more sense!

  • Hello Phil

    If you have just used the binary codes without any modification, then did you try to connect the GPIO pin to 3.3V via a pull up resistance before powering up?

    Also what is the exact nature of information that you require on FLASH_BOOTCFG?

    Regards
    Amit
  • cb1,
    Sorry about the misplaced post. That was not my intent.

    Amit,
    I will try the GPIO pin pulled up. But I thought that the SBL GUI on default would not have engaged the GPIO pin so it should be the correct state. (But I havent looked at the state with a probe so will try the pull up)

    ok, so to rephrase my additional question:

    What would the code be to jump into the ROM bootloader from the app (bypassing the use of the GPIO pin).
    I found this in the boot_demo1.c but it states this is for flash based bootloader rather than ROM based bootloader.

    void
    JumpToBootLoader(void)
    {
    //
    // Disable all processor interrupts. Instead of disabling them
    // one at a time, a direct write to NVIC is done to disable all
    // peripheral interrupts.
    //
    HWREG(NVIC_DIS0) = 0xffffffff;
    HWREG(NVIC_DIS1) = 0xffffffff;

    //
    // Return control to the boot loader. This is a call to the SVC
    // handler in the boot loader.
    //
    (*((void (*)(void))(*(uint32_t *)0x2c)))();
    }

    Maybe this jump can be used for either bootloader or maybe its just a different address than 0x2c?
    Thanks,
    -Phil
  • ok, pulling up the GPIO pin allows the app to run from power up. Thanks!
  • May I argue for the migration/pull of this thread into its (more appropriate) forum (sticky) thread?

    Left here - valuable as it is - it will shortly rotate away into oblivion. Poster's read/review of Amit's Bootloader Detail thread - combined w/his good effort - produced a successful Boot-Load in (near) record time! That's sure to be useful to others - thus deserves to be memorialized w/in Amit's sticky Boot-Load thread. (atop this forum)

  • cb1,
    Is that something I can do? I'm not sure how, other than copy and paste the previous comments from here?
  • Phil B. - you've been great - I've made the request - you (thread's originator) agreed - let's see if your effort & victory can be placed where it becomes so much more obvious & convenient to many...
  • Hello Phil

    The code to jump to boot loader could be a lot of other things. As an example, some of the TivaWare examples on boot loader with display, use the touch on the display to jump to boot loader. A magic packet on Ethernet could be another example.

    Regards
    Amit
  • Hello Phil,

    You can copy paste the comments from your post to the following post started by cb1.

    e2e.ti.com/.../471520

    Regards
    Amit