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.

  • Your problem is probably because you have spent too much time reading 8051 or maybe ARM datasheets.

    Start by reading the documentation for the ATmega128. If that isn't enough, then try visiting a forum that is discussing the Atmel AVR chips. One suggestion is the AVRFreaks site.

  • 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.

  • ... if you can find them.

    This IS a Keil forum

    Erik