5 Replies Latest reply on Sep 16, 2016 12:21 AM by userc_26694

    GPIO_Interrupt_Configure

      Hi i have a shock sensor & BCM2073X_LE_KIT (BCM920737TAG).

      My shock sensor gives high pulse if it detects the shock & i want to configure it as a interrupt ,So what i did is..

       

       

      #define SHOCK_IN 4

      #define SHOCK 8

       

      const UINT8 shk=SHOCK;

       

      & in the following fuction i enabled interrupt

       

       

       

      void hello_client_connection_up(void)

      {

      UINT16 masks[3] = {(1 << SHOCK_IN), 0 , 0};

      gpio_registerForInterrupt(masks,(void *)hello_client_interrupt_handler,(void *)&shk);

      gpio_configurePin(SHOCK_IN/16, SHOCK_IN%16, GPIO_EN_INT_RISING_EDGE,GPIO_PIN_INPUT_LOW);

      }

       

       

      It works fine when the shock interrupt pin is connected ,but it gives continuous interrupt whenever i disconnect the shock pin.

      It should not give interrupt when there is no connection on shock pin..