upgrade through USB during runtime.

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

ahgu
Posts: 72
Joined: Tue Jun 14, 2005 7:49 am

upgrade through USB during runtime.

Mon Mar 08, 2010 11:48 pm

I want to be able to upgrade the firmware from the window GUI through the USB.

I have a program running on the flash in At91SAM7S64, it has the USB and I can send the new program over the USB. Since I don't have enough RAM, I can store the new program on the flash.
Here is my question:
1. Can I overwrite the existing program on the flash while it is running?
2. If not, how can I store 2nd copy of the program in the 2nd half of the flash and run it? I do have to change the INT vectors and jump to my new program, but INT vectors are in the first sector.

3. Maybe I can store the new program in the 2nd half of the flash, and run a ram_function to move the data to the first half the flash?

Anyone has any ideas?
gerhardf
Posts: 552
Joined: Thu Dec 02, 2004 2:28 pm

Re: upgrade through USB during runtime.

Tue Mar 09, 2010 5:10 pm

ahgu wrote:I want to be able to upgrade the firmware from the window GUI through the USB.

I have a program running on the flash in At91SAM7S64, it has the USB and I can send the new program over the USB. Since I don't have enough RAM, I can store the new program on the flash.
Here is my question:
1. Can I overwrite the existing program on the flash while it is running?
2. If not, how can I store 2nd copy of the program in the 2nd half of the flash and run it? I do have to change the INT vectors and jump to my new program, but INT vectors are in the first sector.

3. Maybe I can store the new program in the 2nd half of the flash, and run a ram_function to move the data to the first half the flash?

Anyone has any ideas?
take a look ath the following application notes:
http://www.atmel.com/dyn/resources/prod ... oc6282.pdf
http://www.atmel.com/dyn/resources/prod ... oc6253.pdf

regards
gerhard
ahgu
Posts: 72
Joined: Tue Jun 14, 2005 7:49 am

Re: upgrade through USB during runtime.

Wed Mar 10, 2010 7:49 am

If the application vector is at RAM 0 after remap, and application is still in flash, how can the app vector jump to the flash? It will only jump within the mirrored ram, right?

How can it jump to the application that is somewhere in 0x00100000-0x00200000?

Refer to Figure 3-5 in doc6282.pdf

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 1 guest