Interrupts on Freescale MK70FN1M0xxx12 not working for port F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupts on Freescale MK70FN1M0xxx12 not working for port F

1,069 Views
charliegujrati
Contributor II


In my embedded system having the processor Freescale MK70FN1M0xxx12, I am unable to use the port F pins as interrupts. However, port E and port C do have this working. Port F is interrupt enabled on the processor yet the ISR(Interrupt Service Routine) is not functioning as expected for port F pins. Request to please give the information on what could be missing and how can it be resolved. As this is a show stopper, request to please get back ASAP.

Thanks in Advance!!! Charlie Gujrati

0 Kudos
5 Replies

451 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Please check attached demo code, which is using K70 PTF2 pin generate interrupt with TWR-K70F120M board.

The code is based on Kinetis 120MHz product bare-metal sample code [gpio] demo.


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

451 Views
charliegujrati
Contributor II

Hi,

Thank you on your inputs. Could you please elaborate on the solution as i used the port F details as mentioned in the code as below:

  PORTF_PCR2 =PORT_PCR_MUX(1)|PORT_PCR_IRQC(0xA)|PORT_PCR_PE_MASK|PORT_PCR_PS_MASK;

as the issue which i am facing is just on PORT F pins. However, for other PORTS viz., E, C i am able to receive Interrupts.

Only port F has the issue where in interrupts are not getting generate. but the pins go low to high viz., the voltage is in the range of 0-3V however, ISR routine is not getting called. Could you please help me out as this is a show stopper.

Thanks,

Charlie

0 Kudos

451 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Please check PORTx_PCRn register [IRQC] bit description:

2016-03-22_10-49-48.jpg

The IRQC value 0xA is interrupt on falling edge, if customer want to generate interrupt at rising edge, the IRQC value should be 0x9.


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

451 Views
BiyongSUN
NXP Employee
NXP Employee

please move your ticket to  Kinetis Microcontrollers

Here is the i.MX community.

0 Kudos

451 Views
charliegujrati
Contributor II

moved to Kinetis Microcontroller

0 Kudos