HELLO,
I in the use the MKE06Z,I can open separate IRQ arbitrary external interrupt of a pin, but I tried for a long time, not at the same time open multiple external interrupt input, for example, I opened the I0 external interrupt pin, I can't open the I0 at the same time, I1, I2 external interrupt of the three pin
This setting can successfully open a single pin
SIM->PINSEL |= 0x01; //PTI0
SIM->SCGC |= SIM_SCGC_IRQ_MASK;
IRQ->SC = IRQ_SC_IRQEDG_MASK |
IRQ_SC_IRQPE_MASK |
IRQ_SC_IRQIE_MASK ;
I haven't tried any of the following Settings
1.
SIM->PINSEL |= 0x01| 0x02| 0x03;
SIM->SCGC |= SIM_SCGC_IRQ_MASK;
IRQ->SC = IRQ_SC_IRQEDG_MASK |
IRQ_SC_IRQPE_MASK |
IRQ_SC_IRQIE_MASK ;
2.
SIM->PINSEL |= 0x01; //PTI0
SIM->SCGC |= SIM_SCGC_IRQ_MASK;
IRQ->SC = IRQ_SC_IRQEDG_MASK |
IRQ_SC_IRQPE_MASK |
IRQ_SC_IRQIE_MASK ;
SIM->PINSEL |= 0x02; //PTI2
SIM->SCGC |= SIM_SCGC_IRQ_MASK;
IRQ->SC = IRQ_SC_IRQEDG_MASK |
IRQ_SC_IRQPE_MASK |
IRQ_SC_IRQIE_MASK ;
SIM->PINSEL |= 0x03; //PT3
SIM->SCGC |= SIM_SCGC_IRQ_MASK;
IRQ->SC = IRQ_SC_IRQEDG_MASK |
IRQ_SC_IRQPE_MASK |
IRQ_SC_IRQIE_MASK ;
THANK YOU!
Hi Gang
The KE06 has a single IRQ input, which can be multiplexed to one of 8 possible pins.
It is not possible to select more than one setting as shown by the SIM_PINSEL1 field to do this:
#define SIM_PINSEL_IRQPS_PTA5 0x00000000 // IRQ port pin mapped to PTA5
#define SIM_PINSEL_IRQPS_PTI0 0x00000001 // IRQ port pin mapped to PTI0
#define SIM_PINSEL_IRQPS_PTI1 0x00000002 // IRQ port pin mapped to PTI1
#define SIM_PINSEL_IRQPS_PTI2 0x00000003 // IRQ port pin mapped to PTI2
#define SIM_PINSEL_IRQPS_PTI3 0x00000004 // IRQ port pin mapped to PTI3
#define SIM_PINSEL_IRQPS_PTI4 0x00000005 // IRQ port pin mapped to PTI4
#define SIM_PINSEL_IRQPS_PTI5 0x00000006 // IRQ port pin mapped to PTI5
#define SIM_PINSEL_IRQPS_PTI6 0x00000007 // IRQ port pin mapped to PTI6
Doing something like SIM->PINSEL |= 0x01| 0x02| 0x03;
is just selecting 0x03 - the PTI2 setting.
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
KE06: http://www.utasker.com/kinetis/FRDM-KE06Z.html