I am having trouble with the external interrupt latency being very inconsistent.
My code for testing the interrupt is as follows
Code: Select all
void app_main(void)
{
gpio_install_isr_service(ESP_INTR_FLAG_LEVEL3 | ESP_INTR_FLAG_IRAM);
gpio_set_direction(static_cast<gpio_num_t>(35), GPIO_MODE_INPUT);
gpio_set_intr_type(static_cast<gpio_num_t>(35), GPIO_INTR_ANYEDGE);
gpio_intr_enable(static_cast<gpio_num_t>(35));
gpio_isr_handler_add(static_cast<gpio_num_t>(35), DigitalInterrupt, 0);
}
void IRAM_ATTR DigitalInterrupt(void *arg)
{
gpio_set_level(static_cast<gpio_num_t>(5), true);
gpio_set_level(static_cast<gpio_num_t>(5), false);
}
Picture of what i am seeing on the scope. (blue: pin5, purple: pin35)
https://photos.app.goo.gl/K9TW8mLbxzA9aD1t9
Thank you,