interrupt doesn't work in IAR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

interrupt doesn't work in IAR

2,865 次查看
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,686 次查看
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,686 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

Please check PRIMASK core register. 

Thanks,

Daniel

0 项奖励
回复

2,686 次查看
macoveimircea
Contributor I

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

pastedImage_1.png

0 项奖励
回复

2,686 次查看
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,686 次查看
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 项奖励
回复