Setting an Interrupt Handler

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

Setting an Interrupt Handler

841 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by digitalwiz on Thu Jul 31 20:17:37 MST 2014
How does one "register" an interrupt handler with LPCOpen? That is, how do you make the connection between the interrupt vector and the handler? I would expect to find a function something like register_int_handler(), but so far I haven't found it, nor any reference whatever to interrupt vectors.

Thanks
Labels (1)
0 Kudos
3 Replies

730 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Mon Aug 04 06:43:13 MST 2014

Quote: digitalwiz
How does one "register" an interrupt handler with LPCOpen? That is, how do you make the connection between the interrupt vector and the handler?



You need to give your interrupt handler the correct name, the same name that is used in the vector table.
0 Kudos

730 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Aug 01 02:00:58 MST 2014
See - http://www.lpcware.com/content/faq/lpcxpresso/startup-code-interrupt-handlers

Although written for LPCXpresso IDE, as the described by the Fallguy, the vector table is a generic Cortex-M thing. Thus the principles in the FAQ apply regardless of toolchain being used.

Regards,
LPCXpresso Support
0 Kudos

730 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Fri Aug 01 00:00:26 MST 2014
In ARM Cortex-M, the interrupt handlers are defined in the Vector Table. The first two entries in the table are the reset handler and initial stack value and the rest are addresses of the interrupt handlers. Each peripheral has its own handler, at a fixed entry in the table.

This is why you can't find a 'register' function - there is no concept of registering an interrupt handler - it is at a fixed location.

Suggest you google for Cortex-M interrupt handlers for more information.
0 Kudos