I am attempting to use the low power timer of the Freescale K60 board. I have an interrupt handler written, and now do not know how to add the address of the handler to the interrupt vector table defined in startup_MK60DN.s.

Forgive me, I am struggling to fully understand interrupts

  • \$\begingroup\$ This question might help a little. electronics.stackexchange.com/questions/14705/… I suspect the interrupt is already declared in the table, you just need to define it with the right name. \$\endgroup\$ Oct 16, 2016 at 21:33
  • \$\begingroup\$ So I have enabled the NVIC with the IRQ number for the lptmr. The question above does not address how externally defined isr's are supposed to be connected to the vector table. My issue is that I don't know how to link my isr with the nvic. \$\endgroup\$
    – pingOfDoom
    Oct 16, 2016 at 21:37
  • 1
    \$\begingroup\$ The startup file provides weak declarations of the functions. If you declare a function with the same name, the linker should give your version preference. You can check this by looking at the vector table in your final image. Search the example code you have for some other exception handlers, that ought to make it clear. You could add the toolchain details you are using - shouldn't make much difference but it might help someone gove you a more definitive answer. \$\endgroup\$ Oct 16, 2016 at 21:45
  • \$\begingroup\$ keil.com/pack/doc/CMSIS/Core/html/_using__c_m_s_i_s.html looks like the example you need. \$\endgroup\$ Oct 16, 2016 at 21:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.