Bluedroid bt controller init Fail
Posted: Mon Oct 14, 2024 8:12 am
Hi,
Wroom ESP32S3 N16R8
I'm meeting issue with memory management when i call init_ble_gattc_gatts, a function whitch create and start bleudroid client and server. It is call just after sd card mount function that mount properly :
It is called in a Tasks started like this:
And here is the error message.
- I tried to move sd mount function below init_ble_gattc_gatts, but this time, it is the sd that doesn't mount ( error message refering to pull up rsistor but sur it is not that because http sd card file serving example works fine).
- I tried to incraease like 100 000 the task ram in xTaskCreatePinnedToCore but it doesn't start the task anymore with this big value, i don't know why because I have 8MB of ram now.
- I tried comment the sd mount function , ble workd fine.
- I tried to move out from bleTask the sd mount function in main(), same memory issue.
I really miss to manage my memory.
The device has been change from 2MB to 8Mb to face this issue but it is still a live, meaning something is not ok somewhere...
Thank you for your precious help.
Wroom ESP32S3 N16R8
I'm meeting issue with memory management when i call init_ble_gattc_gatts, a function whitch create and start bleudroid client and server. It is call just after sd card mount function that mount properly :
Code: Select all
void Task_ble(void){
ESP_LOGI(TAG, "** In task BLE **");
ESP_LOGI(TAG, "** Init SD CARD **");
ESP_ERROR_CHECK(example_mount_storage(base_path));
init_ble_gattc_gatts(true);
Code: Select all
void app_main(void)
{
queueAV = xQueueCreate( 25, sizeof( uint8_t ) );
queueAR = xQueueCreate( 25, sizeof( uint8_t ) );
init_gpio();
xTaskCreatePinnedToCore( Task_gui, "gui_Task", 8192, NULL, 1, NULL, 1);
xTaskCreatePinnedToCore( Task_screenDrive, "ScreenDrive_Task", 4096, NULL, 0, NULL, 1);
xTaskCreatePinnedToCore( Task_ble, "ble_Task", 32768, NULL, 0, NULL, 0);
esp_task_wdt_reset() ;
}
Here is custom partitions.csv:W (2025) BT_INIT: esp_bt_controller_mem_release not implemented, return OK
I (2035) BT_INIT: BT controller compile version [05195c9]
I (2045) phy_init: phy_version 503,13653eb,Jun 1 2022,17:47:08
W (2045) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
E (2215) BT_INIT: Malloc failed
E (2215) espDMclient: init_ble_gattc_gatts initialize controller failed: ESP_ERR_NO_MEM
# ESP-IDF Partition Table,,,,,
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,0x6000,
phy_init,data,phy,0xf000,0x1000,
factory,app,factory,0x10000,4M,
db_pneus,data,nvs,,0x40000,
#storage,data,spiffs,,0xF0000,
- I tried to move sd mount function below init_ble_gattc_gatts, but this time, it is the sd that doesn't mount ( error message refering to pull up rsistor but sur it is not that because http sd card file serving example works fine).
- I tried to incraease like 100 000 the task ram in xTaskCreatePinnedToCore but it doesn't start the task anymore with this big value, i don't know why because I have 8MB of ram now.
- I tried comment the sd mount function , ble workd fine.
- I tried to move out from bleTask the sd mount function in main(), same memory issue.
I really miss to manage my memory.
The device has been change from 2MB to 8Mb to face this issue but it is still a live, meaning something is not ok somewhere...
Thank you for your precious help.