Charles Barnes

56f8367 - Interrupt Vector File and Linker Command file

Discussion created by Charles Barnes on Jan 24, 2008
Latest reply on Jan 25, 2008 by Pascal Irrle
I might be making a mistake by doing this, but I have been using some legacy code and I did not want to use the PE.

My problem is that I am trying to use interrupts but they are just not working, at all.

Lets use Timer C0 as my example.  I have looked in memory and have seen that I am setting the correct bits in the correct Interrupt Priority Register.

I have also noted if I let my code run for a bit, when I look in memory I can see the correct "interrupt pending" bits being unset in the correct IRQ Pending Register.  So I know the timer itself is working.

I have a line in my vector address file that reads:

jsr >FTimerC0_IH             ; timer C channel 0                               ($70)

And a function called TimerC0_IH in another file.

I get no compiler errors but the interrupt handler is just never called.  I have tried this with numerous other interrupts including the external interrupts (I have an eval board).

Now, the one thing I have noted is that if I disassemble the code in the vector.asm file and scan down to the section labelled:

** EXECUTABLE CODE (interrupt_vectors.text) ***

All of the lines of assembly code read:

ObjectCode             Opcode      Operands
0xE2540000             jsr              0x000000

So it seems like the interrupt handler function is not being properly linked.  However, the comment does indicate that it is supposed to go to FTimerC0_IH.  (; FTimerC0_IH)

I am at a loss right now.  I have read a bunch and I cannot figure for the life of me what I am doing wrong.  I am not sure if I am not linking properly or using that vector.asm file properly or if I am simply not setting up the chip properly.  Any tips would be greatly appreciated.

Please help,