Skip to content

Crash after Nimble initialisation on ESP-IDFv.5.0.1, works on v.5.0 (IDFGH-9450) #10817

Description

@jacek12345

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

esp-idf-v5.0.1

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

CMD

Development Kit.

ESP32-S3-DevKitM-1

Power Supply used.

USB

What is the expected behavior?

Nimble initialisation

What is the actual behavior?

Crash

Steps to reproduce.

Used with RainMaker based project.

  1. after start, when Nimble_init(); it crashes.
void Nimble_init(void)
{
    if(!FL_OTA_ONTHEFLY)
    {
         nimble_port_init();
        //Initialize the NimBLE host configuration.
        ble_hs_cfg.reset_cb = bleprph_on_reset;
        ble_hs_cfg.sync_cb = bleprph_on_sync;
        nimble_port_freertos_init(bleprph_host_task);
    }
}

Debug Logs.

I (19450) app_main: MQTT Published. Msg id: 49289.
I (19450) app_main: MQTT Published. Msg id: 27609.
I (22300) esp_rmaker_ota_using_topics: Fetching OTA details, if any.
I (22520) app_main: MQTT Published. Msg id: 2855.
I (34250) esp_rmaker_time: SNTP Synchronised.
I (34250) esp_rmaker_time: The current time is: Wed Feb 22 07:12:01 2023 +0100[CET], DST: No.
btdm: bss start 0x3fcef180, len 36
btdm: data start 0x3fcef174, data start rom 0x40057350, len 12
MAGIC fadebead VERSION 00010006
I (34710) BT_INIT: BT controller compile version [80abacd]
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4038525f  PS      : 0x00060833  A0      : 0x80383f53  A1      : 0x3fcf3840
0x4038525f: uxListRemove at F:/GitHub/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/list.c:197

A2      : 0x0000858c  A3      : 0x3fca0688  A4      : 0x00060820  A5      : 0x00060823
A6      : 0x00000001  A7      : 0x0000cdcd  A8      : 0x8038543c  A9      : 0x3fcf3810
A10     : 0x00000001  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x01260267
A14     : 0x00000200  A15     : 0x00260000  SAR     : 0x0000001c  EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000859c  LBEG    : 0x4037ed44  LEND    : 0x4037ed50  LCOUNT  : 0x00000000
0x4037ed44: ram_wifi_tx_dig_gain at ??:?

0x4037ed50: ram_wifi_tx_dig_gain at ??:?



Backtrace: 0x4038525c:0x3fcf3840 0x40383f50:0x3fcf3860 0x4202df39:0x3fcf3880 0x4203de0e:0x3fcf38a0 0x4203edf9:0x3fcf38c0 0x4202e633:0x3fcf3910 0x420374a2:0x3fcf3950 0x4200e438:0x3fcf39b0 0x4200ef14:0x3fcf39d0 0x420efe97:0x3fcf3b20 0x403852b6:0x3fcf3b50
0x4038525c: uxListRemove at F:/GitHub/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/list.c:194

0x40383f50: vTaskDelete at F:/GitHub/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/tasks.c:1348 (discriminator 4)

0x4202df39: task_delete_wrapper at F:/GitHub/esp-idf-v5.0.1/components/bt/controller/esp32s3/bt.c:646

0x4203de0e: ble_sm_alg_gen_key_pair at ??:?

0x4203edf9: btdm_controller_init at ??:?

0x4202e633: esp_bt_controller_init at F:/GitHub/esp-idf-v5.0.1/components/bt/controller/esp32s3/bt.c:1312

0x420374a2: nimble_port_init at F:/GitHub/esp-idf-v5.0.1/components/bt/host/nimble/nimble/porting/nimble/src/nimble_port.c:145

0x4200e438: Nimble_init at F:/GitHub/esp-rainmaker/examples/j_switch/main/app_main.c:3179

0x4200ef14: app_main at F:/GitHub/esp-rainmaker/examples/j_switch/main/app_main.c:2010

0x420efe97: main_task at F:/GitHub/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/port_common.c:131 (discriminator 2)

0x403852b6: vPortTaskWrapper at F:/GitHub/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

More Information.

It seems that BT controller version is the problem?

When crashing (ESP-IDFv.5.0.1):
I (34710) BT_INIT: BT controller compile version [80abacd]

When works (ESP-IDFv.5.0):
I (25431) BT_INIT: BT controller compile version [76c24c9]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions