5 Replies Latest reply on Mar 10, 2019 11:22 AM by user_1377889

    PSOC 4 how to get ISR to trigger on falling edge of the capsense comparator

    info_3697476

      For PSOC 4000s:

      temp.PNG

      I'm trying to get an isr to trigger on the falling edge of the comparator (not the low power one, the capsense one).

      I'm getting an error of "Error: mpr.M0142: Invalid connection for output "\CSDCOMP:cy_psoc4_csd_v2_comp\:comp" connected to "isr_GPIO:interrupt". (App=cydsfit)"

      So obviously I'm not doing it quite right. Would anyone know how to accomplish this task? The code is essentially taken from the example on interrupts.

       

      I've tried following the example code and doing this:

      temp2.PNG

      but I don't see why the pin would be necessary, and the compiler seems to agree. Regardless of drive mode on the pin, you get:

      "ADD: sdb.M0012: error: Terminals "CSDCOMP.CmpOut,Pin_Sw.external_0" connected to signal "Net_133" have mismatching types."

      I'm assuming Net 133 is the net between the comparator and the pin. The error makes sense because the pin implies that you have an external input driving the pin, and the comparator is trying to drive it as well - not what we want.

       

      Thanks.