Hi
I've used ESP32-PICO-V3-02 in my project so in theory there's a lot of RAM.
I need to allocate 134400 bytes buffer for LCD so it must be usable by DMA.
I also need to use BLE for data transmission.
LCd buffer is allocated using heap_caps_malloc:
vlcd = (uint16_t*)heap_caps_malloc(LCD_SCREEN_BYTE_SIZE, MALLOC_CAP_DMA);
without BLE enabled in menuconfig everything works
heap_caps_print_heap_info(MALLOC_CAP_DMA):
Heap summary for capabilities 0x00000008:
At 0x3ffae6e0 len 6432 free 128 allocated 4152 min_free 128
largest_free_block 0 alloc_blocks 31 free_blocks 0 total_blocks 31
At 0x3ffb5eb0 len 172368 free 151600 allocated 18616 min_free 150608
largest_free_block 131072 alloc_blocks 21 free_blocks 2 total_blocks 23
At 0x3ffe0440 len 15072 free 12920 allocated 0 min_free 12920
largest_free_block 8192 alloc_blocks 0 free_blocks 1 total_blocks 1
At 0x3ffe4350 len 113840 free 111688 allocated 0 min_free 111688
largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
Totals:
free 276336 allocated 22768 min_free 275344 largest_free_block 131072
largest_free_block is 131072 (lower than required 134400) but heap_caps_malloc allocate required buffer
with BLE enabled in menuconfig (BLE Only Bluedroid, first malloc from PSRAM):
heap_caps_print_heap_info(MALLOC_CAP_DMA):
Heap summary for capabilities 0x00000008:
At 0x3ffae6e0 len 62592 free 37492 allocated 22948 min_free 36500
largest_free_block 32768 alloc_blocks 55 free_blocks 2 total_blocks 57
At 0x3ffc3b38 len 115912 free 113760 allocated 0 min_free 113760
largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
At 0x3ffe0440 len 15072 free 12920 allocated 0 min_free 12920
largest_free_block 8192 alloc_blocks 0 free_blocks 1 total_blocks 1
At 0x3ffe4350 len 113840 free 111688 allocated 0 min_free 111688
largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
Totals:
free 275860 allocated 22948 min_free 274868 largest_free_block 65536
largest_free_block is 65536, heap_caps_malloc fails
I've tried different settings in menuconfig but they not affecting largest_free_block value when BLE is enabled. I need LCD and BLE working together - any ideas how to do that?
BLE memory fragmentation malloc problem
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: atx823, MicroController and 182 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.