my sudo code:
After Deep Sleep, handler function(static void handler(void *args) ) will never be executed even I triggered GPIO_INTR_POSEDGE.
How to solve this?
Thanks.
static char tag[] = "test_intr";
static QueueHandle_t q1;
int d1=0;
static void handler(void *args) {
d1++;
}
void ClearIII(void *pvParameters)
{
vTaskDelay(10000);
esp_deep_sleep_enable_ext0_wakeup(PIN_NIRQ_915, 1);
esp_deep_sleep_start();
}
void MainTask(void *pvParameters)
{
gpio_install_isr_service(0);
gpio_isr_handler_add(GPIO_NUM_2, handler, (void*) PIN_NIRQ_915);
gpio_set_intr_type(GPIO_NUM_2, GPIO_INTR_POSEDGE);
gpio_intr_enable(GPIO_NUM_2_915);
while(1) {
vTaskDelay(500);
}
}
main(int argc, const char * argv[]){
gpio_set_direction(GPIO_NUM_2, GPIO_MODE_INPUT);
xTaskCreate(&MainTask, "MainTask", 10000, NULL, 10, NULL);
xTaskCreate(&ClearIII, "clearTask", 10000, NULL, 10, NULL);
return 0;
}
ESP32 HELP interrupt hanlder dead after DEEP SLEEP WAKE UP.
Re: ESP32 HELP interrupt hanlder dead after DEEP SLEEP WAKE UP.
rtc_gpio_deinit
Re: ESP32 HELP interrupt hanlder dead after DEEP SLEEP WAKE UP.
Thanks, it worked.
Who is online
Users browsing this forum: No registered users and 67 guests