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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/31/07 08:52
Read: times


 
#143800 - but that _is_ really the problem
Responding to: ???'s previous message
Peter,

Welcome to 8052.com.
To post formatted code, press the button "Insert Code" below the edit window, and insert code between the HTML tags which will appear.

Peter Yang said:
someone tell me that I had called IAP API from block 0 ,when I call IAP API of P89V51RD2BN which then wrok on block 1 so that I have overwritten parts of the bootload of P89V51RD2BN.

That was I, in http://forum.flashmagictool.com/index.php...pic=3355.0 .

Peter Yang said:
But I have call IAP API above 0x1FFF .

First of all, you did not use the _API_ provided for IAP by the default bootloader (which is factory programmed to Block1). You used the low-level access to the FLASH registers. This is not described in NXP's documents, so I wonder where you did get access to this information. As you don't use SST's notation for the registers, this must be some NXP document which I did not see so far - can you please tell us where do you have it from?

I am using the corresponding SST chip datasheet, which says:
The device allows IAP code in one block of memory to pro-
gram the other block of memory, but may not program any
location in the same block. If an IAP operation originates
physically from Block 0, the target of this operation is implic-
itly defined to be in Block 1. If the IAP operation originates
physically from Block 1, then the target address is implicitly
defined to be in Block 0.


Peter Yang said:
I have located Function_Test() at 0x4000.

It does not matter. As long as you are performing the write to FLASH "mailbox" registers when executing from Block 0, it will work on Block 1.

Besides, as you use C, you have to be more careful of where the actual functions go. Disassembling the hexfile you sent (using Jeff Post's excellent d52, just one click away under the "Disassembler" button in the column on the left) reveals, that the IAP_SectorErase function (and all the other functions except Function_Test) is in fact located below 2000h.


Jan Waclawek

List of 2 messages in thread
TopicAuthorDate
about the IAP function of P89V51RD2BN            01/01/70 00:00      
   but that _is_ really the problem            01/01/70 00:00      

Back to Subject List