How to trigger the interrupt for SPI in MK60FN1M0VLQ12 controller ?

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

How to trigger the interrupt for SPI in MK60FN1M0VLQ12 controller ?

1,623 次查看
rajkumar_yerraj
Contributor II

We have made PTE2 (Pin3 of Controller MK60FN1M0VLQ12) as interrupt pin for ADXL peripheral connected via SPI. We had configured it to detect interrupt on rising edge. We are seeing Pin 3 going High. In Vector.c we had configured the interrupt function.

We are not getting the interrupt even though Pin 3 is high (checked via oscilloscope). We checked ISR function is not hitting by putting a breakpoint in the function.

 

What could be the issue? Why ISR is not hitting even though in oscilloscope we see pin going HIGH?

For your information, i have attached the screeshots of Vector table, ISR for interrupt and the Interrupt signal captured from the Oscilloscope.

Note: we have checked PTE2 pin by polling method, so it is not continuously high.

标签 (1)
0 项奖励
回复
5 回复数

1,498 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Please check the value of PORTE_PCR2 during debug:

PORTx_PCRn.png
This pin should be configured as input:

GPIOx_PDDR.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,498 次查看
rajkumar_yerraj
Contributor II

Hi Robin

We have configured below registers:

1. IRQC as 0x09 for interrupt on rising edge

2. GPIOx_PDDR as 0 for input

3. GPIO functionality as MUX(0x01)

You can see it in the following screenshot.

We are not getting interrupt.

Can you suggest what could be the reason?

Thanks

Rajkumar

0 项奖励
回复

1,498 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Would you please attach your project here, so that I can direct test it?
I am using KDS3.2 configure the ExInt_LDD, I try to connect the PTE2 with PTE4 pin. If I toggle PTE4, the interrupt will happen.

ExInt_LDD.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,498 次查看
rajkumar_yerraj
Contributor II

FYI

0 项奖励
回复

1,497 次查看
rajkumar_yerraj
Contributor II

Hi Robin,

We have configured the same way as you mentioned in the previous discussion and we are getting the interrupt only sometimes and sometimes it is not( i.e., Transition from low to high ) only when in debug mode by putting break point at that point in Events.c . When ISR is not called, interrupt pin remains HIGH.

So, what could be the issue that I am unable to get a continuous interrupt ?

I am sorry, as per company’s policy we could not share you the whole project, I am attaching the files in which the External Interrupt is configured.

Thank You.

Rajkumar

0 项奖励
回复