Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COI'm doing the same thing (update via UART). There is write code in application and in bootloader. So they can cross-update each other, and I also store some configuration in flash. I don't know what uC you have, but the one I have cannot execute code from RAM, so uploading a code for writing is not an option. Actually I am using similar procedure as you described with HW interlock. This is what I tried to explain when I set the question... looks like I did a bad job :)
      singulars
    2. CO@Stefan: be careful with updating your bootloader from your application. What happens on power loss between the erase and write? Oops, your bootloader is gone and you've bricked your device. One a Freescale HCS08 project, the bootloader actually sets CPU registers to protect it from being overwritten, and it's impossible for the application to write to those pages in the flash. Be safe.
      singulars
    3. CO@tomlogic: I have 2 write codes - in aplication and in bootloader - and they can cross update each other. uC by default wakes into application code. If I fail to update the bootloader I still wake into application and can retry. And the bootloader uses a trick. It writes the application code from the highest page to the lowest. Before it writes the first (which is actually the highest) page, it writes 'jump to bootloader' into the page 0. Now the only concern is that it should not fail to write the very last page (page 0). So chances are extremely small to end up with non-recoverable flash.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload