This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

software reset which allows remap

Hi

Target : AT91R40008
Bootloader : own
Main : will be someone else's

What is the best s/w only way to 'unmap' ?

I need main to be able to drop into my bootloader which starts by remapping stuff, and I want the bootloader to assume that SRAM is at 0x300000 (in case main has screwed up the remapped ones) for remapping purposes, just as it has to during a genuine powerup.

But if I just jump directly from main to my (flash boot) reset vector, it can't use 0x300000 because it's been mapped already.

I could maybe force a watchdog reset which would apparently do this job, but is there a cleaner way ?

Parents
  • To my knowledge, there are no other internally trigged reset, unless you can possibly abuse a brownout reset.

    Create a variable that isn't cleared on reset. Fill it with a magic value when you manually request a watchdog reset.

    At startup, check if it was a watchdog reset or a normal reset. If a watchdog reset, check your variable for a magic value. After the check, clear the variable so a "real" watchdog reset doesn't get falsely detected as a forced watchdog reset.

Reply
  • To my knowledge, there are no other internally trigged reset, unless you can possibly abuse a brownout reset.

    Create a variable that isn't cleared on reset. Fill it with a magic value when you manually request a watchdog reset.

    At startup, check if it was a watchdog reset or a normal reset. If a watchdog reset, check your variable for a magic value. After the check, clear the variable so a "real" watchdog reset doesn't get falsely detected as a forced watchdog reset.

Children