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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/10/07 14:50
Read: times


 
#141688 - hummmm...
Responding to: ???'s previous message
Alejandro,

Welcome to 8052.com :-)

You will find a few hints on how to post formatted code here: http://www.8052.com/faqs.phtml?FAQ=120199 (plus the links from there).

I see nothing that suspicious in the assembler. As I said in the NXP forum already, the correct IAP entry address IS 0x1FF0 (and that I am not suprised the appnote is crappy... :-( ) Also, as I said, I would try to preserve bits 2-7 in FCF (so I would use FCF &= 0xFC to switch on the boot block); but that should not make any difference (AFAIK there is only one more bit in FCF which is undocumented, but the bootloader sets that explicitly).

Maybe you could try to write a very short application and post it (including hex) on your 8052.com homepage, so that I can try to reproduce your problem.

Here is a snippet I use and is proven good (for some reason I had the operation code in R0 on entry, but you grasp the idea - this is from my modification of BASIC-52 for P89V51RD2):
FLASH_API:
         PUSH    IE          ;DISABLE INTERRUPTS
         CLR     EA
         XCH     A,R1
         PUSH    ACC
         MOV     A,R1
         MOV     R1,R0B0     ;SETUP OPERATION CODE
         ANL     FCF,#0FCh   ;enable boot sector - !!! this command MUST be located ABOVE 2000h!!!
         CALL    01FF0H      ;call to ISP_API (modifies B register but no Rx)
         ORL     FCF,#001h   ;switch back to user FLASH
         MOV     R1,A
         POP     ACC
         XCH     A,R1
         POP     IE
         RET

JW

PS. I believe you double-checked, but paranoia seldom hurts: please check again that your routine is linked to ABOVE 2000h

PS2. As you are new here you most probably didn't heard my idee fixe I am trying to push here: the P89V51RD2 is in fact a relabelled SST89E564 and/or SST89E516. Have a look at those datasheets and wonder... :-)


List of 2 messages in thread
TopicAuthorDate
P89V51Rxx In-Application Programming            01/01/70 00:00      
   hummmm...            01/01/70 00:00      

Back to Subject List