Page 1 of 1

GPIO34-36 Interrupt cause kernel panic

Posted: Tue Apr 23, 2019 12:35 pm
by KanyeKanye
I would use pin 34 as an input with low level (GPIO_INTR_LOW_LEVEL) interrupt. Execution below code cause kernel panic on gpio_install_isr_service line. Why? Is there any workaround?

Kernel pannic occur for any of input only pins: 34, 35, SENSOR_VP, SENSOR_VN

Code: Select all

	gpio_config_t io_conf;
	io_conf.pin_bit_mask = (1ULL << PIN_NUM_ADC_DRDY);
	io_conf.intr_type = GPIO_INTR_LOW_LEVEL;
	io_conf.mode = GPIO_MODE_INPUT;
	io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
	io_conf.pull_up_en = GPIO_PULLUP_ENABLE;
	gpio_config(&io_conf);

	drdy_semaphore = xSemaphoreCreateBinary();

	gpio_install_isr_service(ESP_INTR_FLAG_IRAM);
	gpio_isr_handler_add(PIN_NUM_ADC_DRDY, drdy_isr_handler, NULL);

Re: GPIO34-36 Interrupt cause kernel panic

Posted: Tue Apr 23, 2019 1:07 pm
by WiFive
All those pins have no internal pull up or pulldown so they can generate a lot of interrupts from noise.

Re: GPIO34-36 Interrupt cause kernel panic

Posted: Tue Apr 23, 2019 11:53 pm
by ESP_Angus
Can you post the details of the crash? It's hard to guess otherwise, but it may be the problem WiFive mentioned (which will cause an Interrupt Watchdog failure).