Error:GPIO isr service already installed

ESP_Piyush
Posts: 309
Joined: Wed Feb 20, 2019 7:02 am

Re: Error:GPIO isr service already installed

Postby ESP_Piyush » Wed Sep 08, 2021 9:06 am

Hi Nirmesh,

As mentioned in the earlier comment, the specific error message "GPIO isr service already installed" is indeed an error and appropriate changes would be done either in the GPIO driver and/or the button component to handle or prevent this error. It is harmless only in this particular context since we know what is causing.

W.r.t the watchdog issue you are seeing, I tried copying the new snippet into your original code from here and made some other minor changes in app_priv.h and app_main.c to compile it. The firmware worked fine for me as below

Code: Select all

I (882) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
E (882) gpio: gpio_install_isr_service(449): GPIO isr service already installed
I (892) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
E (902) gpio: gpio_install_isr_service(449): GPIO isr service already installed
I (912) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
E (922) gpio: gpio_install_isr_service(449): GPIO isr service already installed
I (932) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
I (942) gpio: GPIO[14]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (952) gpio: GPIO[25]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (952) gpio: GPIO[26]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (962) gpio: GPIO[27]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (1022) wifi:wifi driver task: 3ffd0274, prio:23, stack:6656, core=0
I (1022) system_api: Base MAC address is not set
I (1022) system_api: read default base MAC address from EFUSE
I (1042) wifi:wifi firmware version: d683787
I (1042) wifi:wifi certification version: v7.0
I (1042) wifi:config NVS flash: enabled
I (1042) wifi:config nano formating: disabled
I (1042) wifi:Init data frame dynamic rx buffer num: 32
I (1052) wifi:Init management frame dynamic rx buffer num: 32
I (1052) wifi:Init management short buffer num: 32
I (1062) wifi:Init dynamic tx buffer num: 32
I (1062) wifi:Init static rx buffer size: 1600
I (1062) wifi:Init static rx buffer num: 10
I (1072) wifi:Init dynamic rx buffer num: 32

From your logs, we see that the main task is using up the CPU whereas for me, it just proceeded without issues. So it seems there is could be some difference between our environments or the application code. Can you share the following?

1. esp-idf version (Using "git describe" command)
2. Platform used (esp32, esp32s2, esp32c3 ?)
3. Development Board (This should not matter much, but just in case)
4. The application code (you may just update your github repo)
5. Your project's sdkconfig file

nirmeshru
Posts: 13
Joined: Sat Jan 30, 2021 7:08 pm

Re: Error:GPIO isr service already installed

Postby nirmeshru » Wed Sep 08, 2021 8:36 pm

Hi Piyush,

Thanks for your effort in trying to reproduce the issue.

So As per your log, I am seeing GPIO isr error messages but it is not causing any Watchdog reset issue with 4 switches at your end.
I go through the button component and suspecting these error is due to this gpio_install_isr_service(0) call.

I am sharing the details for further debugging.

1. esp-idf version (Using "git describe" command)
>> v4.2.1

2. Platform used (esp32, esp32s2, esp32c3 ?)
>>esp32

3. Development Board (This should not matter much, but just in case)
>> custom board based on ES32 WOORM

4. The application code (you may just update your github repo)
>>updated Github repo with 4 switches.

5. Your project's sdkconfig file
>>attached project SDKconfig file.
Attachments
sdkconfig.txt
SDKconfig
(41.52 KiB) Downloaded 1147 times

nirmeshru
Posts: 13
Joined: Sat Jan 30, 2021 7:08 pm

Re: Error:GPIO isr service already installed

Postby nirmeshru » Wed Sep 15, 2021 1:36 pm

Hi Piyush,

As you mentioned, you did a small change in the code and it is working fine for you. may I know what change you have made in this example?

Thanks,
Nirmesh

ESP_Piyush
Posts: 309
Joined: Wed Feb 20, 2019 7:02 am

Re: Error:GPIO isr service already installed

Postby ESP_Piyush » Tue Sep 21, 2021 1:02 pm

Hi Nirmesh,

I tried your new code from github and compiled it with idf 4.2.1. I only did this minor change for it to compile with latest esp-rainmaker:

Code: Select all

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0d8517..43a3889 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,9 +2,14 @@
 # in this exact order for cmake to work correctly
 cmake_minimum_required(VERSION 3.5)
 
-# Add RainMaker components and other common application components
-set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../components ${CMAKE_CURRENT_LIST_DIR}/../common)
+if(DEFINED ENV{RMAKER_PATH})
+    set(RMAKER_PATH $ENV{RMAKER_PATH})
+else()
+    set(RMAKER_PATH ${CMAKE_CURRENT_LIST_DIR}/../..)
+endif(DEFINED ENV{RMAKER_PATH})
+
+set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common ${RMAKER_PATH}/components/esp-insights/components)
 
 set(PROJECT_VER "1.0")
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(switch)
+project(esp_switch)
I see the errors, but not the crash.
Screenshot 2021-09-21 at 4.44.49 PM.png
Screenshot 2021-09-21 at 4.44.49 PM.png (352.66 KiB) Viewed 43567 times
Here is my binary. Can you try on your board?
Attachments
esp_switch.bin.zip
(762.39 KiB) Downloaded 1144 times

nirmeshru
Posts: 13
Joined: Sat Jan 30, 2021 7:08 pm

Re: Error:GPIO isr service already installed

Postby nirmeshru » Mon Sep 27, 2021 10:45 am

Hi Piyush,

I uploaded your binary on my board and the device got crash and rebooting in a loop.

I checked all the switch input pins and found the issue because of GPIO Pin 18 and 19 so I changed these pins to some other gpio pins.
Now it is working fine.

Thanks,
Nirmesh

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: Error:GPIO isr service already installed

Postby axellin » Mon Nov 15, 2021 6:09 am

ESP_Sprite wrote:
Wed Sep 08, 2021 7:49 am
"E (906)" indicates it's an error message.
If it is indeed harmless, please convert it to warning message (W).
Fyi, this is indeed an error, caused by a few of our components not working well together. The message you see is the only result of this error, as the GPIO API happens to catch it, but even if it is otherwise harmless, it is an error regardless and we will take measures to fix it.
I don't find the fix in any branch, did I miss something?

lindselea
Posts: 1
Joined: Fri Mar 04, 2022 6:44 am

Re: Error:GPIO isr service already installed

Postby lindselea » Fri Mar 04, 2022 6:51 am

For anyone else having the same issue, mine was due to me calling gpio_install_isr_service multiple times since I put it in my interrupt pin initialization function.

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: Error:GPIO isr service already installed

Postby axellin » Tue Dec 05, 2023 7:42 am

ESP_Sprite wrote:
Wed Sep 08, 2021 7:49 am
"E (906)" indicates it's an error message.
If it is indeed harmless, please convert it to warning message (W).
Fyi, this is indeed an error, caused by a few of our components not working well together. The message you see is the only result of this error, as the GPIO API happens to catch it, but even if it is otherwise harmless, it is an error regardless and we will take measures to fix it.

(I'd like to also state that in general, it's not really our policy to generate error messages like that that you can 'just ignore', even if it happens to work out here.)
Actually, if you notice "Error:GPIO isr service already installed", it usually
means you have at least 2 components calling gpio_install_isr_service().
Such component usually has a gpio_uninstall_isr_service() in deinit.
Which means if a component calls the deinit(), the other componet stop working.

esp_camera is an example that will call gpio_uninstall_isr_service() when deinit and this may cause problems.

Who is online

Users browsing this forum: No registered users and 75 guests