56f8367 - Interrupt Vector File and Linker Command file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

56f8367 - Interrupt Vector File and Linker Command file

1,601 Views
Charlie
Contributor III
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,

Charlie
Labels (1)
Tags (1)
0 Kudos
1 Reply

199 Views
trytohelp
NXP Employee
NXP Employee
Hi,
 
The disassemble file is correct:
ObjectCode             Opcode      Operands
0xE2540000             jsr              0x000000
The compiler doesn't know the address of the function.
This will be fixed by the linker
 
Difficult to say you where is the problem.
Can I suggest you to have a look in the installation folder \CodeWarrior for DSC56800E v8.2\(CodeWarrior_Examples) ?
There are some examples without Processor Expert for each derivative.
A short application using the leds on the demo board.
A timer is used for that.
Please have a look to this example.
 
Hope this will help you
 
Pascal
0 Kudos