Hello,
I am using the LPC55S06 board and the MCUXpresso Config Tool Version 9 and I am trying to use CTIMER1 to generate an interrupt after a period of 799 us and call a function that I wrote. I am using the NVIC to make the interrupt through CTIMER1 and then use the IRQHandler that is generated from the peripherals.h file as a void function to call the function I wrote. I am trying this method but the function that I am trying to call gets a warning that it is being unused.
Hello JLABB,
Usually, warning can ignore. Does the interrupt function work well when run your project?
If no, you can share your project, I will help to check.
BR
Alice
Morning Alice, I ran the project in debug mode and it looks like the interrupt register is changing but the function I have in the handler's body is not being used. I will send the project in a zip file which will have the config from MCUXpresso and I am running the project from Keil.
Your interrupt handler needs to have the same name as defined in your toolchain, usually the startup file. Which is often assembler code.
In the generated map file, you should see your handler/address present in the respective vector table entry.
Toolchains often provide default handler for interrupt or fault handlers, which are declared as "__WEAK" and can be overwritten.
The handling of such linking issues is not identical across toolchains, so you might need to consult the Keil tutorials.
Hello Frank,
I changed the name of my interrupt handler to CTIMER1_IRQHandler to match the one in the startup file and in my map file I can see CTIMER1_IRQHandler in the vector table so that is good but it did not fix my linking issue. I contacted Keil about my project.