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

Accessing application section from boot program

I am working with Atmega128 and i want to write a program that enters the boot section when a particular pin is low and after executing boot program looks in the application area of Atmega128. If some program is present there i want to erase it.
Up till noe i have managed to cause the program to enter in boot section and execute the code. But further i have no idea how can it make a search for the presence of some code in application area and then to erase it.
Thanks in advance.

Parents
  • hopefully you forced your program into boot using the watchdog reset.

    But further i have no idea how can it make a search for the presence of some code in application area and then to erase it.

    you can write a specific location in flash with a code indicating that the program at a specific location was programming successfully (either by IAP or JTAG - use absolute positioning of the code) after you verified its checksum. you can erase Flash by IAP commands. consult your processor manual.

Reply
  • hopefully you forced your program into boot using the watchdog reset.

    But further i have no idea how can it make a search for the presence of some code in application area and then to erase it.

    you can write a specific location in flash with a code indicating that the program at a specific location was programming successfully (either by IAP or JTAG - use absolute positioning of the code) after you verified its checksum. you can erase Flash by IAP commands. consult your processor manual.

Children