Closed sazanof closed 5 months ago
Yes, in the example there is a bug in the interrupt handler.
You cannot call printf()
directly from an interrupt handler. Instead, you need to use either the FreeRTOS queue or event groups. You can see how to do this correctly in the example for tca95x5.
I'm leaving this issue open until I fix the bug in the mcp23017 example.
Thank you. I think, my question is closed. I use code like this
static void IRAM_ATTR intr_handler(void *arg)
{
if (!interrupt_running)
{
interrupt_running = true;
xTaskCreate(read_interrupt, "read_interrupt", configMINIMAL_STACK_SIZE * 6, NULL, 5, NULL);
}
}
and if I need to print - I use ESP_DRAM_LOGx functions
The issue
Hello! Iuse ESP-WROOM-32 with mcp23017. Base scnhematics is like this
SCL - GPIO22 SDA - GPIO21 INTA - GPIO26.
Code - the same as in your example.
After click button on 0 pin, esp23 thrown an error
Which SDK are you using?
esp-idf
Which version of SDK are you using?
5.1.2
Which build target have you used?
Component causing the issue
mcp23x17
Anything in the logs that might be useful for us?
sometimes an error thrown like this
Can you tell me what this might be related to? Is this really a bug? Thanks!