- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i think it was the issue with PULLUP/PULLDOWN i used
gpio_configurePin(SHOCK_IN/16, SHOCK_IN%16, GPIO_EN_INT_RISING_EDGE|GPIO_PULL_DOWN,GPIO_PIN_INPUT_LOW);
then it worked fine..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Should I use PULL_DOWN ,
Then Which Macro should i use..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you have a chance to review the temperature sensor app in the SDK? It is a classic example of wake-on-gpio.
Is your sensor connected to the I2C?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No my sensor has siple gpio interface..
with single o/p as HIGH/LOW..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does it help if you assert to clear the status of the interrupt?
I cut and paste the below from the temperature app:
gpio_clearPinInterruptStatus(LM73_ALERT_INTERRUPT_PORT, LM73_ALERT_INTERRUPT_PIN);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i think it was the issue with PULLUP/PULLDOWN i used
gpio_configurePin(SHOCK_IN/16, SHOCK_IN%16, GPIO_EN_INT_RISING_EDGE|GPIO_PULL_DOWN,GPIO_PIN_INPUT_LOW);
then it worked fine..