espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.19k stars 7.17k forks source link

ESP32C6 BLE crash when advertising + PM + NimBLE (IDFGH-12620) #13619

Closed malachib closed 4 weeks ago

malachib commented 4 months ago

Answers checklist.

General issue report

While attempting BLE Advertise while using NimBLE, PM + Modem Sleep I run into problems. I'm following the lead of examples/bluetooth/nimble/power_save (which flashes and runs without incident)

When specifying advertising intervals other than 0 and CONFIG_ESP_SLEEP_POWER_DOWN_FLASH is set, I get a reset right after begin advertise:

rst:0x8 (TG1_WDT_HPSYS),boot:0xc (SPI_FAST_FLASH_BOOT)

If I turn off all the watchdogs, it changes to:

rst:0x10 (LP_WDT_SYS),boot:0xc (SPI_FAST_FLASH_BOOT)
zhaoweiliang2021 commented 4 months ago

@malachib Hi, can you provide an example that reproduces this issue? And contains the corresponding sdkconfig file. Thanks

malachib commented 4 months ago

Yes definitely - I am on the road will be back in a couple days and set it up

malachib commented 4 months ago

Here's a capture. Be sure to set CONFIG_ESP_SLEEP_POWER_DOWN_FLASH on: 23APR24.PGESP-49-2.tar.gz

Let me know if you need the example cut down more. I think it's succinct enough to clearly understand the issue.

zhaoweiliang2021 commented 4 months ago

@malachib bugfix_patch.zip After decompression, you will get the bugfix.patch file. Put the patch file into the idf (v5.1.3 commit e7771c75bd1dbbfb7b3c5381be7e063b197c9734) root directory. run "git apply bugfix.patch" My local test has passed. The final fix code awaits the release of the new version 5.1. Thanks.

malachib commented 4 months ago

My local test has passed. The final fix code awaits the release of the new version 5.1. Thanks.

Thank you for this! Will try it shortly

UPDATE

Works great! Thank you!

AxelLin commented 3 months ago

The final fix code awaits the release of the new version 5.1. Thanks.

@zhaoweiliang2021 Is this fixed in esp-idf ? If yes, please share the commit of the fix.

zhaoweiliang2021 commented 3 months ago

@AxelLin bugfix commits for this issue on version v5.1.4 : commit (12dca8d0866bc3276d69c9280841522a321b65fa) and commit (54a15b81f98692bafc062c729dd5b73fa98e51c2)

AxelLin commented 1 month ago

@AxelLin bugfix commits for this issue on version v5.1.4 : commit (12dca8d) and commit (54a15b8)

@zhaoweiliang2021 Please close the issue if all impacted branches are fixed.