assert failed: xQueueTakeMutexRecursive queue.c:724 (pxMutex)

madhusudan_jadhav
Posts: 28
Joined: Fri Mar 10, 2023 9:05 am

assert failed: xQueueTakeMutexRecursive queue.c:724 (pxMutex)

Postby madhusudan_jadhav » Fri May 05, 2023 2:30 pm

I am using ESP IDF with esp32 WROOM 8 mb kit. I am getting the probelm. when I send the data from phone to esp32 the error comes. with same time i have created one task in which phone data will pass thru function.
  1. void ble_init(void){
  2.     int rc;
  3.  
  4.     nimble_port_init();
  5.     /* Initialize the NimBLE host configuration. */
  6.     ble_hs_cfg.reset_cb = bleprph_on_reset;
  7.     ble_hs_cfg.sync_cb = bleprph_on_sync;
  8.     ble_hs_cfg.gatts_register_cb = gatt_svr_register_cb;
  9.     ble_hs_cfg.store_status_cb = ble_store_util_status_rr;
  10.  
  11.     ble_hs_cfg.sm_io_cap = CONFIG_EXAMPLE_IO_TYPE;
  12. #ifdef CONFIG_EXAMPLE_BONDING
  13.     ble_hs_cfg.sm_bonding = 1;
  14. #endif
  15. #ifdef CONFIG_EXAMPLE_MITM
  16.     ble_hs_cfg.sm_mitm = 1;
  17. #endif
  18. #ifdef CONFIG_EXAMPLE_USE_SC
  19.     ble_hs_cfg.sm_sc = 1;
  20. #else
  21.     ble_hs_cfg.sm_sc = 0;
  22. #endif
  23. #ifdef CONFIG_EXAMPLE_BONDING
  24.     ble_hs_cfg.sm_our_key_dist = 1;
  25.     ble_hs_cfg.sm_their_key_dist = 1;
  26. #endif
  27.  
  28.  
  29.     rc = gatt_svr_init();
  30.     assert(rc == 0);
  31.  
  32.     /* Set the default device name. */
  33.     rc = ble_svc_gap_device_name_set("MiBaio");
  34.     assert(rc == 0);
  35.  
  36.     /* XXX Need to have template for store */
  37.     ble_store_config_init();
  38.  
  39.     nimble_port_freertos_init(bleprph_host_task);
  40.     xTaskCreate(&task, "task", 4096, NULL, 5, NULL);
  41.  
  42. }
  43. void bleprph_host_task(void *param)
  44. {
  45.     ESP_LOGI(tag, "BLE Host Task Started");
  46.     /* This function will return only when nimble_port_stop() is executed */
  47.     nimble_port_run();
  48.  
  49.     nimble_port_freertos_deinit();
  50.     vTaskDelay(pdMS_TO_TICKS(10));
  51. }
  52. void task(void *pvParameter) {
  53.     smartconfig_event_got_ssid_pswd_t *evt2 = (smartconfig_event_got_ssid_pswd_t *)event_data1;
  54. while(1){
  55.     while(ret1==ESP_ERR_NVS_NOT_FOUND){
  56.             printf("state=1");
  57.             RelayDataMessageHandle(recieve_data[0]);
  58.             ret1=nvs_get_str(mibaio_nvs_handle,"myssid",&evt2->ssid,sizeof(evt2->ssid));
  59.             ret1=nvs_get_str(mibaio_nvs_handle,"mypassword",&evt2->password,sizeof(evt2->password));
  60.  
  61.         }
  62.  
  63. }vTaskDelay(pdMS_TO_TICKS(1000));
  64. }
  1. Backtrace: 0x400FE6CA:0x3FFBFBF0 0x400FE876:0x3FFBFC10 0x40082D41:0x3FFBFC30 0x400FD5C0:0x3FFBBBD0 0x400D8733:0x3FFBBC00 0x400D7B45:0x3FFBBC20 0x4017F55B:0x3FFBBC50 0x4009530D:0x3FFBBC80
  2. 0x400fe6ca: task_wdt_timeout_handling at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/task_wdt/task_wdt.c:461 (discriminator 3)
  3.  
  4. 0x400fe876: task_wdt_isr at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/task_wdt/task_wdt.c:585
  5.  
  6. 0x40082d41: _xt_lowint1 at C:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_vectors.S:1118
  7.  
  8. 0x400fd5c0: gpio_ll_get_level at C:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/esp32/include/hal/gpio_ll.h:481
  9.  (inlined by) gpio_get_level at C:/Espressif/frameworks/esp-idf-v5.0.1/components/driver/gpio/gpio.c:239
  10.  
  11. 0x400d8733: RelayDataMessageHandle at C:/Espressif/tools/espressif-ide/2.9.0/workspace/bleprph/main/gpio.c:157
  12.  
  13. 0x400d7b45: app_main at C:/Espressif/tools/espressif-ide/2.9.0/workspace/bleprph/main/main.c:201
  14.  
  15. 0x4017f55b: main_task at C:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/port_common.c:131 (discriminator 2)
  16.  
  17. 0x4009530d: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154
  18.  
  19.  
  20. Data from the client: WuJADHAV
  21. recievedata =W
  22. recievedata =u
  23. recievedata =J
  24. recievedata =A
  25. recievedata =D
  26. recievedata =H
  27. recievedata =A
  28. recievedata =V
  29.  
  30. assert failed: xQueueTakeMutexRecursive queue.c:724 (pxMutex)
  31.  
  32.  
  33. Backtrace: 0x40081f4e:0x3ffbb7b0 0x40092139:0x3ffbb7d0 0x40098b75:0x3ffbb7f0 0x40093186:0x3ffbb910 0x400fdfd1:0x3ffbb930 0x4008c63c:0x3ffbb950 0x4008c94f:0x3ffbb980 0x400fe02e:0x3ffbb9a0 0x4014c82e:0x3ffbb9c0 0x4014c7ed:0x3ffbb9e0 0x4008d86f:0x3ffbba00 0x4008d49c:0x3ffbba20 0x4014c5bd:0x3ffbba70 0x40100b6f:0x3ffbba90 0x401011dd:0x3ffbbab0 0x40101446:0x3ffbbad0 0x40100559:0x3ffbbb40 0x40100a31:0x3ffbbbb0 0x400ff73c:0x3ffbbbd0 0x400d88aa:0x3ffbbc00 0x400d7b45:0x3ffbbc20 0x4017f55b:0x3ffbbc50 0x400
  34. 9530d:0x3ffbbc80
  35. 0x40081f4e: panic_abort at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/panic.c:423
  36.  
  37. 0x40092139: esp_system_abort at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/esp_system.c:153
  38.  
  39. 0x40098b75: __assert_func at C:/Espressif/frameworks/esp-idf-v5.0.1/components/newlib/assert.c:78
  40.  
  41. 0x40093186: xQueueTakeMutexRecursive at C:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/queue.c:724 (discriminator 1)
  42.  
  43. 0x400fdfd1: spi_flash_op_lock at C:/Espressif/frameworks/esp-idf-v5.0.1/components/spi_flash/cache_utils.c:100
  44.  
  45. 0x4008c63c: spi_flash_disable_interrupts_caches_and_other_cpu at C:/Espressif/frameworks/esp-idf-v5.0.1/components/spi_flash/cache_utils.c:154
  46.  
  47. 0x4008c94f: spi_flash_protected_read_mmu_entry at C:/Espressif/frameworks/esp-idf-v5.0.1/components/spi_flash/flash_mmap.c:323
  48.  
  49. 0x400fe02e: spi_flash_cache2phys at C:/Espressif/frameworks/esp-idf-v5.0.1/components/spi_flash/flash_mmap.c:395
  50.  
  51. 0x4014c82e: esp_ota_get_running_partition at C:/Espressif/frameworks/esp-idf-v5.0.1/components/app_update/esp_ota_ops.c:558
  52.  
  53. 0x4014c7ed: esp_partition_main_flash_region_safe at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_partition/partition_target.c:202
  54.  
  55. 0x4008d86f: main_flash_region_protected at C:/Espressif/frameworks/esp-idf-v5.0.1/components/spi_flash/spi_flash_os_func_app.c:182 (discriminator 1)
  56.  
  57. 0x4008d49c: esp_flash_write at C:/Espressif/frameworks/esp-idf-v5.0.1/components/spi_flash/esp_flash_api.c:850 (discriminator 3)
  58.  
  59. 0x4014c5bd: esp_partition_write at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_partition/partition_target.c:75
  60.  
  61. 0x40100b6f: nvs::NVSPartition::write(unsigned int, void const*, unsigned int) at C:/Espressif/frameworks/esp-idf-v5.0.1/components/nvs_flash/src/nvs_partition.cpp:59
  62.  
  63. 0x401011dd: nvs::Page::writeEntry(nvs::Item const&) at C:/Espressif/frameworks/esp-idf-v5.0.1/components/nvs_flash/src/nvs_page.cpp:101
  64.  
  65. 0x40101446: nvs::Page::writeItem(unsigned char, nvs::ItemType, char const*, void const*, unsigned int, unsigned char) at C:/Espressif/frameworks/esp-idf-v5.0.1/components/nvs_flash/src/nvs_page.cpp:247
  66.  
  67. 0x40100559: nvs::Storage::writeItem(unsigned char, nvs::ItemType, char const*, void const*, unsigned int) at C:/Espressif/frameworks/esp-idf-v5.0.1/components/nvs_flash/src/nvs_storage.cpp:358 (discriminator 4)
  68.  
  69. 0x40100a31: nvs::NVSHandleSimple::set_string(char const*, char const*) at C:/Espressif/frameworks/esp-idf-v5.0.1/components/nvs_flash/src/nvs_handle_simple.cpp:44
  70.  
  71. 0x400ff73c: nvs_set_str at C:/Espressif/frameworks/esp-idf-v5.0.1/components/nvs_flash/src/nvs_api.cpp:413
  72.  
  73. 0x400d88aa: RelayDataMessageHandle at C:/Espressif/tools/espressif-ide/2.9.0/workspace/bleprph/main/gpio.c:211
  74.  
  75. 0x400d7b45: app_main at C:/Espressif/tools/espressif-ide/2.9.0/workspace/bleprph/main/main.c:201
  76.  
  77. 0x4017f55b: main_task at C:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/port_common.c:131 (discriminator 2)
  78.  
  79. 0x4009530d: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154
  80.  
  81.  
  82.  
  83.  
  84.  
  85. ELF file SHA256: 97ca98d173bbdd6b
  86.  
  87. Rebooting...
  88. ets Jul 29 2019 12:21:46
  89.  
  90. rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
  91. configsip: 0, SPIWP:0xee
  92. clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
  93. mode:DIO, clock div:2
  94. load:0x3fff0030,len:6940
  95. ho 0 tail 12 room 4
  96. load:0x40078000,len:15500
  97. load:0x40080400,len:3844
  98. 0x40080400: _init at ??:?
  99.  
  100. entry 0x4008064c
  101. I (29) boot: ESP-IDF v5.0.1 2nd stage bootloader
  102. I (29) boot: compile time 17:17:09
  103. I (29) boot: chip revision: v3.0
  104. I (32) boot.esp32: SPI Speed      : 40MHz
  105. I (37) boot.esp32: SPI Mode       : DIO
  106. I (41) boot.esp32: SPI Flash Size : 8MB
  107. I (46) boot: Enabling RNG early entropy source...
  108. I (51) boot: Partition Table:
  109. I (55) boot: ## Label            Usage          Type ST Offset   Length
  110. I (62) boot:  0 nvs              WiFi data        01 02 00009000 00006000
  111. I (70) boot:  1 phy_init         RF data          01 01 0000f000 00001000
  112. I (77) boot:  2 factory          factory app      00 00 00010000 00177000
  113. I (85) boot: End of partition table
  114. I (89) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=242e8h (148200) map
  115. I (151) esp_image: segment 1: paddr=00034310 vaddr=3ffbdb60 size=0530ch ( 21260) load
  116. I (159) esp_image: segment 2: paddr=00039624 vaddr=40080000 size=069f4h ( 27124) load
  117. I (171) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=b1244h (725572) map
  118. I (433) esp_image: segment 4: paddr=000f126c vaddr=400869f4 size=17f6ch ( 98156) load
  119. I (489) boot: Loaded app from partition at offset 0x10000
  120. I (489) boot: Disabling RNG early entropy source...
  121. I (501) cpu_start: Pro cpu up.
  122. I (501) cpu_start: Starting app cpu, entry point is 0x4008143c
  123. 0x4008143c: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/port/cpu_start.c:142
  124.  
  125. I (487) cpu_start: App cpu up.
  126. I (517) cpu_start: Pro cpu start user code
  127. I (517) cpu_start: cpu freq: 160000000 Hz
  128. I (517) cpu_start: Application information:
  129. I (522) cpu_start: Project name:     bleprph
  130. I (527) cpu_start: App version:      1
  131. I (531) cpu_start: Compile time:     May  5 2023 08:44:00
  132. I (538) cpu_start: ELF file SHA256:  97ca98d173bbdd6b...
  133. I (544) cpu_start: ESP-IDF:          v5.0.1
  134. I (548) cpu_start: Min chip rev:     v0.0
  135. I (553) cpu_start: Max chip rev:     v3.99
  136. I (558) cpu_start: Chip rev:         v3.0
  137. I (563) heap_init: Initializing. RAM available for dynamic allocation:
  138. I (570) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
  139. I (576) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
  140. I (582) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
  141. I (588) heap_init: At 3FFC9480 len 00016B80 (90 KiB): DRAM
  142. I (594) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
  143. I (601) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
  144. I (607) heap_init: At 4009E960 len 000016A0 (5 KiB): IRAM
  145. I (615) spi_flash: detected chip: generic
  146. I (618) spi_flash: flash io: dio
  147. W (622) spi_flash: Detected size(16384k) larger than the size in the binary image header(8192k). Using the size in the binary image header.
  148. I (636) cpu_start: Starting scheduler on PRO CPU.
  149. I (0) cpu_start: Starting scheduler on APP CPU.
  150. state=1I (871) wifi:wifi driver task: 3ffce620, prio:23, stack:6656, core=0
  151. I (871) system_api: Base MAC address is not set

MicroController
Posts: 1705
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: assert failed: xQueueTakeMutexRecursive queue.c:724 (pxMutex)

Postby MicroController » Fri May 05, 2023 5:57 pm


madhusudan_jadhav
Posts: 28
Joined: Fri Mar 10, 2023 9:05 am

Re: assert failed: xQueueTakeMutexRecursive queue.c:724 (pxMutex)

Postby madhusudan_jadhav » Fri May 05, 2023 6:02 pm

Yes it is already initiallized

madhusudan_jadhav
Posts: 28
Joined: Fri Mar 10, 2023 9:05 am

Re: assert failed: xQueueTakeMutexRecursive queue.c:724 (pxMutex)

Postby madhusudan_jadhav » Sat May 06, 2023 8:37 am

I deleted the other thread.

Who is online

Users browsing this forum: No registered users and 89 guests