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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/06/05 09:17
Read: times


 
Msg Score: 0
 +1 Good Answer/Helpful
 -1 Answer is Wrong
#91095 - I think I know the reason
Responding to: ???'s previous message
This problem appears to come up too often so something must be wrong.

I put a "crosswired" cable between COM1 and COM2 on my PC, run FM (COM1) and a terminal program (COM2), setting a long timeout in FM. From the terminal, I "faked" the answers to FM. This is the record of received data - I inserted CRLFs between the "hex" records and comments:
UU autobauding
:0100000216E7  setting Xtal to 22MHz (I set 22 in FM)
:020000050003F6  reading FX2 bit, I answered 00
:020000050700F2  reading security bits, I answered 00
:030000030600FFF5  program status byte to FFh
:0100000307F5  full chip erase*
:10000000759852758921758DF4D28E75C8207581C9  program first 16 bytes of data
:1000100007C0813099FDC2998508993099FDC29930  program second 16 bytes of data
etc. programming continues for the whole file
Both the RD2's datasheet (dated 2002 Jul 18) and AN461_11 said:
Full chip erase... Erases all blocks, security bits, and sets status and boot vector to default values
The documents do not specify the "default values", but they say that
[boot vector...]The factory default setting is 0FCH,
In fact, after performing full chip erase, boot vector (and status byte, too) are 00. FM starts programming the data immediately full chip erase, so the boot vector remains 00 until the whole file is programmed, when FM checks the current state of boot vector and sets it appropriately. If somebody interrupts the data programming e.g. by resetting the chip, there is no way to get into the bootloader again, except using parallel programming.

From this, three consequences follow:
1. Philips should be more specific for the full chip erase command (and/or the ROM bootloader should not have had this suicidal behaviour, rather it should reprogram boot vector automatically after performing full chip erase)
2. FM should reprogram boot vector immediately after performing full chip erase
3. FM users should better use Erase Blocks Used by Hex File, rather than Erase all Flash

Jan Waclawek



List of 15 messages in thread
TopicAuthorDate
P89C51RD2BN ISP stopped working            01/01/70 00:00      
   I guess you lost the boot vector            01/01/70 00:00      
      no more lost vectors            01/01/70 00:00      
      I think I know the reason            01/01/70 00:00      
         Erase option..            01/01/70 00:00      
         I take this back            01/01/70 00:00      
            Not this one then ?            01/01/70 00:00      
         message received.....            01/01/70 00:00      
   Incomplete program download            01/01/70 00:00      
   Again i lost one more P89C51RD2HBP            01/01/70 00:00      
      No such danger on the Atmels            01/01/70 00:00      
         Atel v.s. Philips            01/01/70 00:00      
      lose none - EVER            01/01/70 00:00      
      re            01/01/70 00:00      
         re            01/01/70 00:00      

Back to Subject List