ESP8266 Developer Zone The Official ESP8266 Forum 2016-06-02T16:39:35+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1220 2016-06-02T16:39:35+08:00 2016-06-02T16:39:35+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1220&p=7180#p7180 <![CDATA[Re: GPIO interrupt handler only firing once]]> Not setting the button to pull up.

Code:

gpio_in_cfg.GPIO_Pullup = GPIO_PullUp_EN;

Statistics: Posted by gustavo — Thu Jun 02, 2016 4:39 pm


]]>
2016-05-31T19:30:42+08:00 2016-05-31T19:30:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1220&p=7154#p7154 <![CDATA[Re: GPIO interrupt handler only firing once]]> I'm having the same issue.

My code is as follows:

Code:

void callOut() {
    int gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
    GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status);
    printf("callOut.");
}

void user_init(void)
{   
    GPIO_ConfigTypeDef gpio_in_cfg;                                    //Define GPIO Init Structure
    gpio_in_cfg.GPIO_IntrType = GPIO_PIN_INTR_NEGEDGE;                 //Falling edge trigger
    gpio_in_cfg.GPIO_Mode = GPIO_Mode_Input;                           //Input mode
    gpio_in_cfg.GPIO_Pin  = GPIO_Pin_12;                               // Enable GPIO
    gpio_config(&gpio_in_cfg);                                         //Initialization function
    gpio_intr_handler_register(callOut, NULL);                   // Register the interrupt function
    _xt_isr_unmask(1 << ETS_GPIO_INUM);                                //Enable the GPIO interrupt
}


How did you fix it?

Statistics: Posted by gustavo — Tue May 31, 2016 7:30 pm


]]>
2015-10-12T10:06:23+08:00 2015-10-12T10:06:23+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1220&p=4059#p4059 <![CDATA[GPIO interrupt handler only firing once]]>
At a high level, my code looks as follows:

InterruptHandler(mask) {
log the interrupt;
gpio_intr_ack(mask);
}

main() {
gpio_init();
Set the pin to be input;
gpio_intr_handler_register(InterruptHandler, NULL);
gpio_pin_intr_state_set(GPIO_PIN_ID(12), GPIO_PIN_INTR_ANYEDGE);
}

Can anyone spot what I might be missing?

Statistics: Posted by kolban — Mon Oct 12, 2015 10:06 am


]]>