Closed stevegrau-ayla closed 1 year ago
@stevegrau-ayla Yes, you are right. A call to esp_bt_mem_release(ESP_BT_MODE_BTDM)
should be added. Note that, this is required only in the case of ESP32 and not for other SoCs like ESP32-C3/C2/H2.
Thanks for reporting. We will fix this.
For the other chips, it would be very helpful if the ESP-IDF were updated to release the bss and data segments for the the BT stacks, as it does with the ESP32. I understand on the newer chips the BT controller memory can't be released but it seems like releasing the bss and data segments should still be possible. There's a significant amount of memory and a lot of IoT use cases that use BT for provisioning only.
There should be a call to esp_bt_mem_release(ESP_BT_MODE_BTDM) here and in the thread case, as well.
https://github.com/project-chip/connectedhomeip/blob/f1bbff3912e3910e09242dc331bd650f2a0c5564/src/platform/ESP32/nimble/BLEManagerImpl.cpp#L153