-
Notifications
You must be signed in to change notification settings - Fork 7.6k
entry 0x400805f0 E (134) cam_hal: cam_dma_config(280): frame buffer malloc failed E (134) cam_hal: cam_config(364): cam_dma_config failed #6209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you sure that PSRAM is enabled? Could you please change the debug level to "Debug" and post the output of the boot console again? |
@me-no-dev
Project: https://github.com/DmytroKorniienko/esp32cam_EmbUI |
Hello, can you please retest this on v2.0.3-rc1? |
any updates? |
Hi, for me, with 2.0.4 still not work.
Tested on two modules. |
The error suggests that you either have PSRAM not enabled or it is failing and does not function normally. |
Fixed for me in 2.0.3, thank you. BTW: I reduced frame buffer from 16 to 8 frames for 2Mb frames, code part:
|
The same problem 2.0.3 can't be used, 1.0.6 is normal |
Hello @youngda, do you have a PSRAM enabled? I use platform.io and project I wanted to build did not have it.
With this, cam works again (2.0.4). |
folks, is this still valid? |
I got the same error with V2.0.3. (with Arduino IDE) |
Someone can help me ? #include <WebServer.h>
#include <WiFi.h>
#include <esp32cam.h>
const char* WIFI_SSID = "ESCOBEDO";
const char* WIFI_PASS = "diecelescobedo";
WebServer server(80);
static auto loRes = esp32cam::Resolution::find(320, 240);
static auto hiRes = esp32cam::Resolution::find(800, 600);
void
handleBmp()
{
if (!esp32cam::Camera.changeResolution(loRes)) {
Serial.println("SET-LO-RES FAIL");
}
auto frame = esp32cam::capture();
if (frame == nullptr) {
Serial.println("CAPTURE FAIL");
server.send(503, "", "");
return;
}
Serial.printf("CAPTURE OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
static_cast<int>(frame->size()));
if (!frame->toBmp()) {
Serial.println("CONVERT FAIL");
server.send(503, "", "");
return;
}
Serial.printf("CONVERT OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
static_cast<int>(frame->size()));
server.setContentLength(frame->size());
server.send(200, "image/jpeg");
WiFiClient client = server.client();
frame->writeTo(client);
}
void
serveJpg()
{
auto frame = esp32cam::capture();
if (frame == nullptr) {
Serial.println("CAPTURE FAIL");
server.send(503, "", "");
return;
}
Serial.printf("CAPTURE OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
static_cast<int>(frame->size()));
server.setContentLength(frame->size());
server.send(200, "image/jpeg");
WiFiClient client = server.client();
frame->writeTo(client);
}
void
handleJpgLo()
{
if (!esp32cam::Camera.changeResolution(loRes)) {
Serial.println("SET-LO-RES FAIL");
}
serveJpg();
}
void
handleJpgHi()
{
if (!esp32cam::Camera.changeResolution(hiRes)) {
Serial.println("SET-HI-RES FAIL");
}
serveJpg();
}
void
handleJpg()
{
server.sendHeader("Location", "/cam-hi.jpg");
server.send(302, "", "");
}
void
handleMjpeg()
{
if (!esp32cam::Camera.changeResolution(hiRes)) {
Serial.println("SET-HI-RES FAIL");
}
Serial.println("STREAM BEGIN");
WiFiClient client = server.client();
auto startTime = millis();
int res = esp32cam::Camera.streamMjpeg(client);
if (res <= 0) {
Serial.printf("STREAM ERROR %d\n", res);
return;
}
auto duration = millis() - startTime;
Serial.printf("STREAM END %dfrm %0.2ffps\n", res, 1000.0 * res / duration);
}
void
setup(){
Serial.begin(115200);
Serial.println();
{
using namespace esp32cam;
Config cfg;
cfg.setPins(pins::AiThinker);
cfg.setResolution(hiRes);
cfg.setBufferCount(2);
cfg.setJpeg(80);
bool ok = Camera.begin(cfg);
Serial.println(ok ? "CAMERA OK" : "CAMERA FAIL");
}
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
Serial.print("http://");
Serial.println(WiFi.localIP());
Serial.println(" /cam.bmp");
Serial.println(" /cam-lo.jpg");
Serial.println(" /cam-hi.jpg");
Serial.println(" /cam.mjpeg");
server.on("/cam.bmp", handleBmp);
server.on("/cam-lo.jpg", handleJpgLo);
server.on("/cam-hi.jpg", handleJpgHi);
server.on("/cam.jpg", handleJpg);
server.on("/cam.mjpeg", handleMjpeg);
server.begin();
}
void loop()
{
server.handleClient();
} AND THE ERROR IS THIS:
please someone |
Select the esp32 Dev development board, and try to open PSRAM in the configuration item. I still can't open it, but the upstairs said it can. |
Did not find 2.0.4, tested version 2.0.3, in arduino ide, opened PSRAM, and a new error appeared, I went back to 1.0.6 and it works normally. ` Backtrace:0x400833c5:0x3ffb24800x4008d555:0x3ffb24a0 0x4009293d:0x3ffb24c0 0x40156e5e:0x3ffb2540 0x400d45af:0x3ffb25e0 0x400d464d:0x3ffb2800 0x400d62a9:0x3ffb2820 ELF file SHA256: 0000000000000000` |
can someone help me with this error rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 192.168.86.67 My code /****************************************************************************************************************************************************
/********************************************************************************************************************
#include "src/OV2640.h" #include "src/SimStreamer.h" //#define ENABLE_OLED //if want use oled ,turn on thi macro #ifdef ENABLE_OLED // Select camera model #include "camera_pins.h" OV2640 cam; #ifdef ENABLE_WEBSERVER #ifdef ENABLE_RTSPSERVER #ifdef SOFTAP_MODE #ifdef ENABLE_WEBSERVER
} void handle_jpg(void)
} void handleNotFound() void lcdMessage(String msg) void setup()
#ifdef SOFTAP_MODE
#else
#ifdef ENABLE_WEBSERVER #ifdef ENABLE_RTSPSERVER CStreamer *streamer; void loop() #ifdef ENABLE_RTSPSERVER
#endif |
@wecane Hi, I already changed the board for the one you mentioned, but the error persists, I'm beginning to think that they are problems of frequency or upload speed. Attached image of my settings, please please, can someone help me? Now is this the new Error: E (2023) cam_hal: cam_dma_config(271): frame buffer malloc failed It say the SPI SRAM memory test fail |
Not a problem of frequency or upload speed. The problem is exactly what the error message says. Your psram is either not available, or is damaged. Note that psram requires 2 pins, and that usually includes gpio16, which is exposed on many devices. |
Had the same problem with sdk 2.0.4, works fine in version 1.0.6, [10:33:30.240]收←◆ets Jun 8 2016 00:22:57 rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) If add http upload: `abort() was called at PC 0x4015afb2 on core 1 Backtrace:0x400838fd:0x3ffb24800x4008d5a1:0x3ffb24a0 0x40092a21:0x3ffb24c0 0x4015afb2:0x3ffb2540 0x400d4753:0x3ffb25e0 0x400d47f1:0x3ffb2800 0x400d6599:0x3ffb2820 ELF file SHA256: 0000000000000000 Rebooting... rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) |
Those having older ESP32 camera devices without PSRAM: make sure you set camera_config_t esp32cam_config{
.pin_pwdn = -1,
.pin_reset = 15,
.pin_xclk = 27,
.pin_sscb_sda = 25,
.pin_sscb_scl = 23,
.pin_d7 = 19,
.pin_d6 = 36,
.pin_d5 = 18,
.pin_d4 = 39,
.pin_d3 = 5,
.pin_d2 = 34,
.pin_d1 = 35,
.pin_d0 = 17,
.pin_vsync = 22,
.pin_href = 26,
.pin_pclk = 21,
.xclk_freq_hz = 20000000,
.ledc_timer = LEDC_TIMER_0,
.ledc_channel = LEDC_CHANNEL_0,
.pixel_format = PIXFORMAT_JPEG,
.frame_size = FRAMESIZE_SVGA,
.jpeg_quality = 12,
.fb_count = 1,
.fb_location = CAMERA_FB_IN_DRAM
}; E.g. for Micro-RTSP, edit |
Hi folks, is this issue still valid or can be closed? Thanks |
@P-R-O-C-H-Y https://github.com/bigFin/Freenove_ESP32_WROVER_Board |
How about if my custom board does not support psram (ESP32S3 wroom 1 N16) ? Do you know if I can still use this camera library? |
Only with JPEG and low resolutions |
Board
ESP32-Cam
Device Description
Burning ESP32 Cam module with Arduino on a breadboard
Hardware Configuration
Arduino 5V - ESP32 5V
Arduino GND - ESP32 GND
Version
v2.0.2
IDE Name
Arduino IDE
Operating System
MacOS
Flash frequency
80 Mhz
PSRAM enabled
yes
Upload speed
115200
Description
Can't take photo. I can't initiate the camera.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: