This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

improper fixup (while using interrupt)

after linking my code I get:
*** ERROR L121: IMPROPER FIXUP
MODULE: prog_fsk.obj (PROG_FSK)
SEGMENT: ABSOLUTE

Everything was OK before untill the moment, when I changed one of my program functions to be ISR.

Here is it's source code:

void CallerId(void) interrupt 0 using 2 {
char c;
int timeout=0;
char i; //licznik petli


while(P3_2==0); //czeka az skonczy sie pierwszy dzwonek

P3_3=0; //przelaczenie CMX 612 w tryb odbioru danych FSK
P3_7=1;

c=_getkey();
while(c!=0x55) //czekamy na blok Chan Seize (ASCII 'U')
{
c=_getkey(); //czym rozni sie getkey od getchar????
timeout++;
if(timeout==10000)
//aktywowac przerwanie INT 1 tylko po co?????????
{dzwonek=0;
return; //nieudana transmisja danych
}
}
timeout=0;
while(c!=0x80) //czekamy na naglowek CLIP (call setup)
{
c=_getkey();
timeout++;
if(timeout==10000)
{ //aktywowac przerwanie INT 1 tylko po co?????????
dzwonek=0;
return; //nieudana transmisja danych
}
}

fsk_tab[0]=c; //"call setup"
c=_getkey();
fsk_tab[1]=c; //liczba bajtow wiadomosci (nie liczac pol "call setup" i "Message Lenght")

for(i=2;i<c+2;i++)
{
fsk_tab[i]=_getkey();
}

P3_3=1; //przelaczenie CMX 612 w tryb "Zero Power"
P3_7=0;
dzwonek=1;
}

and here memory map:

LINK MAP OF MODULE: prog_fsk (PROG_FSK)


TYPE BASE LENGTH RELOCATION SEGMENT NAME
-----------------------------------------------------

* * * * * * * D A T A M E M O R Y * * * * * * *
REG 0000H 0008H ABSOLUTE "REG BANK 0"
DATA 0008H 0006H UNIT _DATA_GROUP_
000EH 0002H *** GAP ***
REG 0010H 0008H ABSOLUTE "REG BANK 2"
DATA 0018H 0050H UNIT ?DT?PROG_FSK
IDATA 0068H 0001H UNIT ?STACK

* * * * * * * C O D E M E M O R Y * * * * * * *
CODE 0000H 0003H ABSOLUTE
CODE 0003H 0002H ABSOLUTE
0005H 07FBH *** GAP ***
CODE 0800H 00F6H UNIT ?C?LIB_CODE
CODE 08F6H 00D9H INBLOCK ?PR?MAIN?PROG_FSK
CODE 09CFH 00B4H INBLOCK ?PR?CALLERID?PROG_FSK
CODE 0A83H 008CH UNIT ?C_C51STARTUP
CODE 0B0FH 0086H INBLOCK ?PR?PRINTCLIP?PROG_FSK
CODE 0B95H 005CH INBLOCK ?PR?SAVECLIP?PROG_FSK
CODE 0BF1H 004DH INBLOCK ?PR?_PRINTWPIS?PROG_FSK
CODE 0C3EH 002DH INBLOCK ?PR?_CHECKSUM?PROG_FSK
CODE 0C6BH 001CH INBLOCK ?PR?_WRITE_DATA?PROG_FSK
CODE 0C87H 0014H INBLOCK ?PR?SERIAL_INIT?PROG_FSK
CODE 0C9BH 000FH INBLOCK ?PR?_WRITE_CMD?PROG_FSK
CODE 0CAAH 000EH INBLOCK ?PR?_WRITE_NIBBLE?PROG_FSK
CODE 0CB8H 000CH INBLOCK ?PR?LCD_INIT?PROG_FSK
CODE 0CC4H 000AH UNIT ?PR?_GETKEY?_GETKEY
CODE 0CCEH 0004H UNIT ?C_INITSEG

Thank you for help,
Wojtek


PS I'm using Keil Evaluation
Project settings:
-Device:

Parents
  • Be careful what you call from an interrupt routine.

    The call to getkey is very likely the problem. You may have to incorporate the function of getkey so as not to call it.

    Better is to re-structure the interrupt so that a flag is set for the main program loop to do this lengthy serviceing.

Reply
  • Be careful what you call from an interrupt routine.

    The call to getkey is very likely the problem. You may have to incorporate the function of getkey so as not to call it.

    Better is to re-structure the interrupt so that a flag is set for the main program loop to do this lengthy serviceing.

Children
No data