This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28M36P63C2: Qualification does not work on external interrupt

Part Number: F28M36P63C2

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?

  • Yong,

    Your qualification code looks to be reasonable to me. Have you disabled EALLOW protection?

    Please run the code and read back all of the written values using CCS. The Expressions window or the Registers viewer should allow you to see the values written above, are the values what you expected?

    Regards,
    Cody

  • Hi Cody,
    Thank you for your suggestion!
    We do have EALLOW in the beginning of the qualification setting and EDIS to disable the access to the registers.
    I monitored the register value using CCS and found that GpioCtrlRegs.GPACTRL.bit.QUALPRD1 was set as 0xFF in the beginning and for some reason, it changed to 0x02 at the end of board initialization.
    I moved the qualification to the end of of board initialization and the qualification time worked as expected. It stayed at 255 all the time then. Using function generator, a pulse width of 15us was filtered out, no interrupt was triggered.
    When the pulse width was tuned to 18us, the interrupt was triggered then.
    Thank you again for the help! You can close this ticket now.

  • Yong,

    This is fantastic news. I think you might have another statement in your code which is changing this value. The best way to search your code is to press "CTRL+H" and then use the "file search" tab to search for "QUALPRD" or something similar. Please also note that you can adjust the search scope to focus on only your project.

    Hope it helps.

    Regards,
    Cody