AnsweredAssumed Answered

how do i enable an interrupt from a bit of a port on the MKL1724 when it is in GPIO mode?

Question asked by Sam Adair on Jun 28, 2017
Latest reply on Jun 29, 2017 by Robin_Shen

This is my abortive attempt to get an interrupt on the rising or falling edge of Port D bit 0:

 

SIM->SCGC5 |= SIM_SCGC5_PORTD_MASK; // Enable Clock to Port D //
PORTD->PCR[0] = PORT_PCR_MUX(1); // Make bit 0 of port D available for GPIO
PORTD->PCR[0] |= PORT_PCR_IRQC(0x0B);
PORTD->PCR[0] |= PORT_PCR_ISF(1); // clear interrupt flag
PTD->PDDR &= 0xFFFFFFFE; // Make D0 an input

Outcomes