We're using TI Concerto microprocessor F28M36P63C2ZWT in a product. There are two GPIO pins (GPIO12, GPIO13) are used as external input to trigger events (falling edge) happening on the I/O. To filter out the noise, we implement the qualification time settings on these two GPIO pins. We expect the interrupts are triggered when the input signal pulse width is longer than the qualification time. However, when we tested it with a given pulse generated by a function generator, we found the interrupt can be triggered as long as the pulse width is longer than 140ns no matter what is set in the qualification time (we tested it even at 17us when maximum 0xFF for the period and 6 samples is used).
Here is the code we set the GPIO12 as XINT3 with qualification time of 17us.
// Set qualification time period
GpioCtrlRegs.GPACTRL.bit.QUALPRD1 = 0xFF; //for GPIO 8-15, 2*(6-1)*6.7*255 (@150MHz) = 17,085 ns
GpioG1CtrlRegs.GPAMUX1.bit.GPIO12 = 0; // GPIO
GpioCtrlRegs.GPADIR.bit.GPIO12 = 0; // set as input
GpioCtrlRegs.GPAQSEL1.bit.GPIO12 = 2; // input qualifier using 6 samples
GpioTripRegs.GPTRIP6SEL.bit.GPTRIP6SEL = 12; // Map GPTRIP6SEL Trip Input 3(XINT3) to PA0_GPIO012
XIntruptRegs.XINT3CR.bit.POLARITY = 0; //0- Falling edges, fault event is active low
XIntruptRegs.XINT3CR.bit.ENABLE = 1; // Enable external interrupt
According to TI Document SPRS825F, interrupt pulse duration should be tw(QSW)+1tx(SCO) with qualifier. When we set QUALPRD to 0xFF, it should gives tw(QSW)= 2*(6-1)*255*6.7ns = 17,085 ns. Any pulses with length shorter than this should not trigger the interrupt. We tested the input signal with pulse width from 100ns to 20us. It triggered the interrupt as long as the width is longer than 140ns.
What could be wrong with above code not having the qualifier working with the interrupt?