2009-03-09 09:39 PM
Ideas for calling bootloader from application code?
2011-05-17 04:05 AM
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?2011-05-17 04:05 AM
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 Trevor2011-05-17 04:05 AM
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()?2011-05-17 04:05 AM
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.