We are experiencing a problem of non-functioning interrupts when we execute code from location 0x4000 in on-chip flash. The part is P89C51D2. We have a boot loader located at 0x0000 and interrupts function fine within that. The boot loader will then jump to the application at 0x4000. The application seems to run fine but interrupts are never executed. Any ideas? Keil tech support is no help as of yet. Thanks, Steve Ross
I found the problem, the processor will execute the interrupt at it's orignal address (0x0033 for int 6) even if you tell the compiler to locate the interrupt vector at a new address. If I put in the following code it will work: ; Jump to timer intrrupt 6 CSEG AT 00033H LJMP 04033H
Hi, I have a similar problem. I am using 89C51RD2 and using the evaluation version. I need to use timer 0 interrupt which is vectored at location 0x000Bh. Keil evaluation software doesnot compile the code and gives the error IMPROPER FIXUP. How do I use the timer 0 interrupt. Where and how is the statement of CSEG to be given for this? James
I found the problem, the processor will execute the interrupt at it's orignal address (0x0033 for int 6) even if you tell the compiler to locate the interrupt vector at a new address. Yep. That's because the interrupt vectors are hardwired into the MCU core. They cannot be changed by software. If you instruct the compiler to relocate the interrupt vectors, it will do what you want. The program will work as though the interrupt vectors are relocated to the address you specify. However, something needs to jump to the relocated interrupt vectors. As you discovered, this is done by placing an LJMP $+offset at each interrupt vector. The following knowledgebase article may provide more information: http://www.keil.com/support/docs/132.htm. Jon
You need to search the knowledgebase for "IMPROPER FIXUP"