interrupt doesn't work in IAR

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

interrupt doesn't work in IAR

2,868件の閲覧回数
macoveimircea
Contributor I

Hello, i am running  AN5413 s32k14x Series Cookbook examples, more exactly i trIed the s32k144_Project_HelloInterrupts. First i run the code with S32 Design Studio and the lpit0 interrupt is working, but when i try to run with IAR ide same code, the lpit0 interrupt  can't be reached by the breakpoint. Did anyone tried  to test lpit0 interrupt in IAR? Could anyone explain me what i should do?

Thank you.

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

2,689件の閲覧回数
macoveimircea
Contributor I

Hi, PTD0 LED stays high(lit) all the time. I run the app and the interrupt is enabled, timer is counting and resets:

LPIT0_MIER->TIE0    1

LPIT0_TCTRL->T_EN    1

NVIC_ICPR[1] - 0x00004000

NVIC_ISER[1] - 0x00010000

PCC_LPIT - 0xC6000000

   -PR      1

   -CGC   1

   -PCS    0x6

I can't figure it out why the same code doesn't work in IAR, maybe do i have to set something specific in IAR configuration?

Thank you for reply.

0 件の賞賛
返信

2,689件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

Please check PRIMASK core register. 

Thanks,

Daniel

0 件の賞賛
返信

2,689件の閲覧回数
macoveimircea
Contributor I

Hi, the PRIMASK register is 0 all the time, maybe this will help?

pastedImage_1.png

0 件の賞賛
返信

2,689件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello, 

Unfortunately, I don't use IAR, so I can't test it.

But if you get an exception, you can debug that.

There are many documents describing Cortex M4 exceptions on the internet.

For example: IAR Debugging a HardFault on Cortex-M 

Regards,

Daniel

0 件の賞賛
返信

2,689件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

Is the LPIT ISR toggling the PTD0 output?  

Can you check the LPIT and NVIC registers in IAR whether the interrupt is enabled or not?

Thanks,

Daniel

0 件の賞賛
返信