Timer Interrupt

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Timer Interrupt

1,439件の閲覧回数
JLABB
Contributor I

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.

 

ラベル(1)
タグ(1)
0 件の賞賛
返信
5 返答(返信)

1,423件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

1,417件の閲覧回数
JLABB
Contributor I

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.

0 件の賞賛
返信

1,383件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello JLABB,

 I have help you change your  project, now it can run into Citmer0 interrupt , please see my attachment.

It seems you haven't enable interrupt.

 

BR

Alice

0 件の賞賛
返信

1,411件の閲覧回数
frank_m
Senior Contributor III

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.

0 件の賞賛
返信

1,403件の閲覧回数
JLABB
Contributor I

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.

0 件の賞賛
返信