ESP32C3内存问题

XiongJL001
Posts: 29
Joined: Sat Jun 24, 2023 12:52 am

ESP32C3内存问题

Postby XiongJL001 » Fri Aug 25, 2023 4:36 am

我的ESP32C3打开这几个蓝牙mesh的PROV与WIFI,TCP 客户端,FAT,的内存占用
Used stat D/IRAM: 160860 bytes ( 160436 remain, 51.3% used)
.data size: 20392 bytes
.bss size: 59208 bytes
.text size: 81260 bytes
Used Flash size : 1460738 bytes
.text : 1206802 bytes
.rodata : 253680 bytes
Total image size: 1562390 bytes (.bin may be padded larger)

每次发起蓝牙mesh组网,只能组一次网,然后就报申请内存失败,并关闭蓝牙扫描,同时WIFI也停止

还有情况就是如果内存占用超过53%,则wifi初始化失败(WIFI初始化与TCP客户端初始化放在最后),无法申请内存,

请问我应该怎么更好地管理内存池

XiongJL001
Posts: 29
Joined: Sat Jun 24, 2023 12:52 am

Re: ESP32C3内存问题

Postby XiongJL001 » Fri Aug 25, 2023 4:38 am

ESPIDF版本是4.4.5

ESP_@In逍遥子
Posts: 132
Joined: Thu Nov 15, 2018 2:06 am

Re: ESP32C3内存问题

Postby ESP_@In逍遥子 » Mon Sep 04, 2023 6:28 am

可以使用 API 获取实时剩余内存:https://docs.espressif.com/projects/esp ... eap-memory

内存优化方式,参考:https://docs.espressif.com/projects/esp ... usage.html

Who is online

Users browsing this forum: No registered users and 22 guests