??? 08/06/04 11:03 Read: times |
#75549 - IAP Problem in P89C51RD2HBP |
Hi Forum Members,
I am facing a strange problem when using P89C51RD2HBP in IAP(In-Application Programming) Mode. I use FlashMagic Ver2.01 for programming the CPU. It is working fine. I have written the following code to erase the unused area (0x8000-0xbfff) of Flash Memory (of CPU). I do not set the Security bits; After programming through FlashMagic is over, I use the option "Display Flash Memory...", and observe the contents of the unused area 0x8000-0xbfff. It contains 0xff, which is OK. Then I reset the processor to run the following code in the same board. The following code is just the section of my whole program, so I am posting the concerned area of the code. This routine is called just once and no other IAP calls are made. This code is basically erasing the Flash memory area 0x8000-0xbfff. I put the processor back into ISP Mode; Observe the unused area 0x8000-0xbfff. Now it contains something junk at almost 40% of this area. Section of IAP Code: Crystal Used is 11.0592 MHz. /* ******************* */ AUXR1 equ 0a2h _iap_freq equ 11 ... ... _IAP_EraseUserMemory: push ie clr ea orl AUXR1,#020h mov r0,_iap_freq mov r1,#01 mov dph,#080h mov dpl,#00h lcall 0fff0h mov r0,_iap_freq mov r1,#01 mov dph,#080h mov dpl,#00h lcall 0fff0h anl AUXR1,#0dfh pop ie ret .... Please inform me if I have done any mistake somewhere. Thanking you, with best regards from, Mr. Kiran V. Sutar. Background Information of requirements of this product: 1. P89C51RD2HBP is preferrable, can try other variants (DIP only). 2. Want to erase the Unused area of the FlashMemory by IAP Only. (No other option.) Because I have to write some information in the Unused area of the flash during Run Time. |
Topic | Author | Date |
IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP | 01/01/70 00:00 | |
RE: IAP Problem in P89C51RD2HBP![]() | 01/01/70 00:00 |