Rainmaker switch example triggers watchdog

MTomoum
Posts: 3
Joined: Tue May 04, 2021 8:52 pm

Rainmaker switch example triggers watchdog

Postby MTomoum » Tue May 04, 2021 9:22 pm

Problem:
The rainmaker switch example crashes the cpu when I try to provision it with the esp32 iOS app using BLE. I did not modify the code I just compiled and flashed it. This doesn't give me a lot of confidence in the reliability of the platform. This is also crashed on my own esp32 project when I add the example code in. I noticed it crashed slightly less when I pinned my task to core 0 instead of core 1.

Here what I get in the terminal:
I (150309) app_wifi: Connected with IP Address:192.168.1.85
I (150309) esp_netif_handlers: sta ip: 192.168.1.85, mask: 255.255.255.0, gw: 192.168.1.254
I (150309) wifi_prov_mgr: STA Got IP
I (150319) app_wifi: Provisioning successful
I (150459) esp_mqtt_glue: Initialising MQTT
I (150459) esp_mqtt_glue: Connecting to a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com
I (150459) esp_mqtt_glue: Waiting for MQTT connection. This may take time.
I (153099) esp_mqtt_glue: MQTT Connected
I (153099) esp_rmaker_node_config: Reporting Node Configuration
I (153109) esp_rmaker_param: Reporting params (init): {"Temperature Sensor":{"Name":"Temperature Sensor","Temperature":26.00000}}
E (155329) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (155329) task_wdt: - IDLE0 (CPU 0)
E (155329) task_wdt: Tasks currently running:
E (155329) task_wdt: CPU 0: btController
E (155329) task_wdt: CPU 1: IDLE1
E (155329) task_wdt: Print CPU 0 (current core) backtrace


Backtrace:0x400D4818:0x3FFBE3C0 0x4008293D:0x3FFBE3E0 0x400EDC34:0x3FFD2DC0 0x400EE1D1:0x3FFD2DE0 0x4008F6D1:0x3FFD2E10
0x400d4818: task_wdt_isr at C:/ESP-IDF/Release-V4.2/esp-idf/components/esp_common/src/task_wdt.c:187

0x4008293d: _xt_lowint1 at C:/ESP-IDF/Release-V4.2/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1105

0x400edc34: r_rw_schedule at ??:?

0x400ee1d1: btdm_controller_task at ??:?

0x4008f6d1: vPortTaskWrapper at C:/ESP-IDF/Release-V4.2/esp-idf/components/freertos/xtensa/port.c:143


E (155329) task_wdt: Print CPU 1 backtrace


Backtrace:0x40081BBF:0x3FFBE9C0 0x4008293D:0x3FFBE9E0 0x4000BFED:0x3FFBC400 0x4008F931:0x3FFBC410 0x400D4A5C:0x3FFBC430 0x400D4A67:0x3FFBC460 0x400D4B05:0x3FFBC480 0x4009005D:0x3FFBC4A0 0x4008F6D1:0x3FFBC4C0
0x40081bbf: esp_crosscore_isr at C:/ESP-IDF/Release-V4.2/esp-idf/components/esp32/crosscore_int.c:80

0x4008293d: _xt_lowint1 at C:/ESP-IDF/Release-V4.2/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1105

0x4008f931: vPortExitCritical at C:/ESP-IDF/Release-V4.2/esp-idf/components/freertos/xtensa/port.c:419

0x400d4a5c: esp_task_wdt_reset at C:/ESP-IDF/Release-V4.2/esp-idf/components/esp_common/src/task_wdt.c:333

0x400d4a67: idle_hook_cb at C:/ESP-IDF/Release-V4.2/esp-idf/components/esp_common/src/task_wdt.c:88

0x400d4b05: esp_vApplicationIdleHook at C:/ESP-IDF/Release-V4.2/esp-idf/components/esp_common/src/freertos_hooks.c:51 (discriminator 1)

0x4009005d: prvIdleTask at C:/ESP-IDF/Release-V4.2/esp-idf/components/freertos/tasks.c:3386 (discriminator 1)

0x4008f6d1: vPortTaskWrapper at C:/ESP-IDF/Release-V4.2/esp-idf/components/freertos/xtensa/port.c:143

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

Re: Rainmaker switch example triggers watchdog

Postby ESP_Piyush » Wed May 05, 2021 6:20 pm

Hello,

We haven't really seen such an issue and I double checked again right now. Can you let us know the esp-idf branch and commit id you are using?

Regards,
Piyush

MTomoum
Posts: 3
Joined: Tue May 04, 2021 8:52 pm

Re: Rainmaker switch example triggers watchdog

Postby MTomoum » Mon May 10, 2021 5:45 pm

I am on the 4.2 release branch.
Attachments
2021-05-10 10_43_32-Select Windows PowerShell.png
idf repo version
2021-05-10 10_43_32-Select Windows PowerShell.png (8.9 KiB) Viewed 10456 times

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

Re: Rainmaker switch example triggers watchdog

Postby ESP_Piyush » Mon May 10, 2021 6:59 pm

Do you see this issue each time? I tested the temperature sensor example (since yours seems to be that) on ESP32 with esp idf release v4.2 and BLE provisioning worked fine for me.

Code: Select all

I (534882) wifi:new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (535702) wifi:state: init -> auth (b0)
I (535702) wifi:state: auth -> assoc (0)
I (535712) wifi:state: assoc -> run (10)
I (535982) wifi:connected with XXXXXXXXX_2GEXT, aid = 15, channel 11, BW20, bssid = 2c:30:33:54:ba:d9
I (535982) wifi:security: WPA2-PSK, phy: bgn, rssi: -67
I (535992) wifi:pm start, type: 1

I (536112) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (538772) app_wifi: Connected with IP Address:192.168.0.172
I (538772) esp_netif_handlers: sta ip: 192.168.0.172, mask: 255.255.255.0, gw: 192.168.0.1
I (538772) wifi_prov_mgr: STA Got IP
I (538782) app_wifi: Provisioning successful
I (538782) esp_mqtt_glue: Connecting to a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com
I (538792) esp_mqtt_glue: Waiting for MQTT connection. This may take time.
GAP procedure initiated: stop advertising.
GAP procedure initiated: stop advertising.
GAP procedure initiated: terminate connection; conn_handle=0 hci_reason=19
I (542812) wifi_prov_mgr: Provisioning stopped
I (542812) wifi_prov_scheme_ble: BTDM memory released
I (543902) esp_mqtt_glue: MQTT Connected
I (543902) esp_rmaker_node_config: Reporting Node Configuration
I (543912) esp_rmaker_param: Reporting params (init): {"Temperature Sensor":{"Name":"Temperature Sensor","Temperature":29.50000}}

MTomoum
Posts: 3
Joined: Tue May 04, 2021 8:52 pm

Re: Rainmaker switch example triggers watchdog

Postby MTomoum » Mon May 10, 2021 9:01 pm

1- I am running the "switch" example not the temperature sensor.
2- This is intermittent so sometimes it works fine and then I do erase_flash and flash it again with the same code and it will crash. At around 50% success rate.

Who is online

Users browsing this forum: No registered users and 55 guests