When I load my code into the dscope debugger I do not get a jump to my interrupt service routines in the vector table. I am using two interrupts (serial interrupt -4, timer interrupt -1) The code at location FF000b is FF000b cmod3 (0xff),r2 FF000d rr a FF000e mov r4,a I replaced with ejmp ?PR?Timer0_ISR It goes to the service request but the stack is not correct and the ISR does not return. I get something similar with my serial ISR. Why isn't the linker using the proper jump instruction, or am I doing something wrong?????.
I would like to add that half of my code Main is in processor space and other code is in external memory. ie FE0000-F7FFFF address space. Can the interrupts handle being called from this space and then find there way back home???? ISR is in FF:1000 space (on chip)
Did you write your code in C? How did you declare your interrupt service routines? Jon
Jon, The routines were all written in C and I have 2 ISR's void timer0_isr (void) interrupt 1 using 1 void serialIntr (void) interrupt 4 using 3 They were located in the 251 in the 251 internal address space by setting a segment in the linker setup. I wanted some of my code to be in the internal and some code to be in the external spaces. It appears that when I inline assemble a ljmp or ejmp to these ISR's that as long as I stay inthe internal memory they seem to go back and forth corectly (even though the call stack display shows the wrong return address.... but when I go out into external memory and get an interrupt I don't sequence correctly.. Any Ideas or suggestions... Thanks Jon
What step of the 251 chips are you using? Also, which device? Intel or Atmel WM? Jon
View all questions in Keil forum