The documentation shows that it is safe to call gpio_intr_disable() from an ISR if CONFIG_GPIO_CTRL_FUNC_IN_IRAM is enabled, but does not have the same note for gpio_intr_enable(). I see no difference in their code and haven't seen any issues when using it, but I'd like to be sure. Does anyone know?
https://docs.espressif.com/projects/esp ... gpio_num_t
Is gpio_intr_enable() safe to call from ISR?
Re: Is gpio_intr_enable() safe to call from ISR?
No. Only a few GPIO functions are placed in IRAM, and gpio_intr_enable is not one of them:
https://github.com/espressif/esp-idf/bl ... r.lf#L4-L7
https://github.com/espressif/esp-idf/bl ... r.lf#L4-L7
-
MicroController
- Posts: 2661
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Is gpio_intr_enable() safe to call from ISR?
Being placed in IRAM is not a precondition for a function to be usable from an ISR though...
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 8 guests