Hi All,
I am working with P89CV51RD2. I have written a small custom bootloader code that is erasing a Block. I dump my code at an address starting from 0xF000. And want to erase block 1.
I want to simulate it using Keil. But problem while debugging is, when I am calling PGM_MTP (which is at the address of 0xFFF0) it showing NOP like.,
C:0xFFF0 00 NOP
I don't whether I can do simulation of IAP using Keil or not?
If I can then how can I found internal boot program that can erase section as per command?
One more thing I also tried to Set ENBOOT bit( using AUXR1 register) but still finding NOP at 0xFFF0H address.
Please guide.
Regards, Utsavi Bharuchwala
Hi Pier,
Thanks for reply. Yes As per discussion, I have to test using real Hardware. But it would be great if I can simulate IAP using Keil, that create less time consumption.
But it would be great if I can simulate IAP using Keil, that create less time consumption.
actually, the opposite is, quite often true
I learned to write code in an era when it was very time consuming to write/erase EPROMs, or had to use costly OTP devices. And an ICE cost as much as a new car.
You learned to understand the flow of your own code in your head, and be very sure it was as error free as possible, without having to single-step it to grasp how it actually functioned. And provide enough interactivity that you could test as much as possible during each cycle.
It was also a time where manuals were printed and you had to read and interpret them thoroughly, by yourself.
Hi Westonsupermare Pier,
Thanks for reply.
I go through your suggestions. I start to Test my bootloader using Real Hardware. I am using P89C51RD2 in which PGM_MTP is at FFF0H. I call it for erasing Block 2.
For that I write like, MOV DPH,#40H
MOV DPL,#00H
MOV DPH,R2 ;; Erase 8K block
MOV R0,#24 ;; OSC Freq (integer) in 24.576 Mhz.
MOV R1,#01 ;; Func code to erase block..
LCALL PGM_MTP ;; Call boot loader routine to perform..
But on call of PGM_MTP, program reset all time. I don't know why this is happening?
Program is not coming below this LCALL PGM_MTP.
Any suggestions?