??? 09/07/06 09:24 Read: times |
#123808 - if it's e.g. a datalogger, he can't change it... Responding to: ???'s previous message |
Andy Neil said:
Allowing interrupts while actually updating the flash sounds like a really bad idea in any case! The self-programmability (dubbed IAP) comes in two fashions (sometimes combined - e.g. in ATMegas): either the program runs during the programming from a different section of code memory (this one either IAP reprogrammable or not); or the processor simply stalls during the programming itself. In P89V51RD2, the former scheme applies. There are two separate sections of flash (64kB in Block0 (the "user FLash") and 8kB in Block1 (the "boot flash"). They overlap in code memory, both starting at 0000h. Can be swapped under program control. After reset, Block1 is active. Both can run a program which - writing into appropriate registers - programs the other block. AFAIK, there is no stall during programming. In this arrangement, interrupts are safe during IAP, however, both blocks should have a copy of the interrupt service routine and of course should have the appropriate interrupt vectors. For block1 it means, that the default bootloader has to be modified, as it contains code at the interrupt vectors position. That's all. It's really simple, once you grip it. Disclaimer: again, there is zero documentation about this by Philips, so I again just talk from experience and am (ab)using the SST documentation. JW |
Topic | Author | Date |
IAP and serial port receiving problem | 01/01/70 00:00 | |
Who knows! | 01/01/70 00:00 | |
IAP and serial port receiving problem | 01/01/70 00:00 | |
Need a better protocol! | 01/01/70 00:00 | |
if it's e.g. a datalogger, he can't change it... | 01/01/70 00:00 | |
Jan, do you really want | 01/01/70 00:00 | |
there is no mystery, just information or lack of | 01/01/70 00:00 | |
DIsable | 01/01/70 00:00 | |
Partial solution | 01/01/70 00:00 | |
If i | 01/01/70 00:00 | |
Not necessarily | 01/01/70 00:00 | |
problems with interrupts in IAP | 01/01/70 00:00 | |
if and if not | 01/01/70 00:00 | |
Did not someone tell, ... | 01/01/70 00:00 | |
as in life, only if you follow the rules | 01/01/70 00:00 | |
Oh yes it does! | 01/01/70 00:00 | |
What I meant... | 01/01/70 00:00 | |
it does, when he does not interrupt | 01/01/70 00:00 | |
serial IAP? | 01/01/70 00:00 | |
If data is coming from PC | 01/01/70 00:00 | |
I doubt the OP would ask if he could | 01/01/70 00:00 | |
how does address vector can be copied into Block1 | 01/01/70 00:00 | |
block1![]() | 01/01/70 00:00 |