??? 04/16/08 20:08 Modified: 04/16/08 20:52 Read: times |
#153570 - IAP for P89C51RC2FA |
Hello,
I used FlashMagic and the ROM ISP to uptate the code in Philips P89C51RC2FA. But have the following requirement: some external devices need to be initialised by uC at powerup, it also need to be the fact when reprogramming the device. So I writed functions to replace the 'In System Programming'. I writed them to be fully compatible with the Intel hex described in datasheet. All the read fonctions are working very well. But not the ones for erasing the flash memory! When I make a call to the ROM entry point, it dosent't return and do a reset. If I choose to erase memory with the Watchdog Timer activated, it return but reset later due to the WDT. If someone could help me, he will be welcome. Here under is the asm code I use to errase the flash: CSEG AT 7000h ; ERASE BLOCK ORL AUXR1,#00100000 ; ENBOOT bit determines whether the BOOTROM is enabled or disabled MOV R0,#11 ; R0 = osc freq (integer) MOV R1,#01h MOV DPH,#0 ;block code, block 0, 0k to 8k, 00H MOV DPL,#0 LCALL PGM_MTP ; 0FFF0h ; It never returne here!? ; With R1 = 81h (WDT feed), it return here but the WDT is enable. |
Topic | Author | Date |
IAP for P89C51RC2FA | 01/01/70 00:00 | |
Do you have disabled interrupts? | 01/01/70 00:00 | |
Re: Do you have disabled interrupts? | 01/01/70 00:00 | |
can you live with 'programming' as is and REprogra | 01/01/70 00:00 | |
IAP for P89C51RC2FA | 01/01/70 00:00 | |
constant? | 01/01/70 00:00 | |
Re: constant? | 01/01/70 00:00 | |
this is why it's always better... | 01/01/70 00:00 | |
Re: this is why it\'s always better | 01/01/70 00:00 | |
Hummm.... | 01/01/70 00:00 | |
RE: quick erase | 01/01/70 00:00 | |
can you please try an experiment | 01/01/70 00:00 | |
Re: can you please try an experiment![]() | 01/01/70 00:00 | |
what exactly are the symptoms? | 01/01/70 00:00 | |
Re: what exactly are the symptoms? | 01/01/70 00:00 |