Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/15/05 09:54
Read: times


 
#99405 - Strange problem IAP for whole chip
I am trying to do a reflash of the whole chip using IAP. I am using the Atmel 89C51RC2 chip.

My Code memory is described as below.

Application : 0x0000 -> 0x1000

New Firmware Storage location : 0x1800 -> 0x2800

Routines for Flashing: 0x3600 --> 0x3800
Using PageWrite of 128 bytes.

So, what I did is this.

When the PC sends the new firmware through the RS232, the application will write this new firmware to location 0x1800 to 0x2800.

Then after than, the application will call the Flash function at 0x3600 to copy the flash (0x1800) to location 0x0000.

This will be followed by a software reset using
((void (code *)(void)) 0) (); // Software Reset

My problem is during the Copying of the Flash from (0x1800) to (0x0000), it works only if I copy in the decrementing order (from 0x2780, 0x2700, 0x2680, ... and so on... 0x1800).

If I do the copying in the incrementing order (from 0x1800, 0x1880, 0x1900, .... 0x2780), it only manage to copy to location (0x100 -> 0x200), and then the whole thing hang.

I don't dare to roll out this code as I am not sure of the reason why it does not work in the incrementing order.

Can anyone advise me why this is so?

List of 24 messages in thread
TopicAuthorDate
Strange problem IAP for whole chip            01/01/70 00:00      
   Questions please            01/01/70 00:00      
   Nobody knows?            01/01/70 00:00      
      why            01/01/70 00:00      
         For IAP?            01/01/70 00:00      
            Which is exactly what FlashMagic is inte            01/01/70 00:00      
               and now we know why            01/01/70 00:00      
            Get a PC            01/01/70 00:00      
               Enclose PCB in a box            01/01/70 00:00      
                  I understand            01/01/70 00:00      
   Process make sense            01/01/70 00:00      
      Thank god for the response            01/01/70 00:00      
   Maybe the libraries in causing it ???            01/01/70 00:00      
      the problem with absolutes            01/01/70 00:00      
         AT89C51RC2 with 128 bytes per page            01/01/70 00:00      
            there is no such thing as a byte write,            01/01/70 00:00      
               byte write            01/01/70 00:00      
               No byte write            01/01/70 00:00      
                  what was the problem?            01/01/70 00:00      
                     Problem was ...            01/01/70 00:00      
                        OK, now face problems in Variables            01/01/70 00:00      
                           variables used in my remote update            01/01/70 00:00      
   Ok, Solved            01/01/70 00:00      
      Try this            01/01/70 00:00      

Back to Subject List