Esp32 Cam Psram Store variable procedure

Hi everyone
I try to use esp32 cam in arduino ide to scan qr code
I use this project

I have tested and worked when the frame size is set FRAMESIZE_HVGA(480x320)
However,when I try to scale up the famesize to FRAMESIZE_VGA(640x480),it show the error
cam_hal: FB-SIZE: 303360 != 307200

So,I write a test program to test how the psram store variable,this is my code

#include "esp_camera.h"
#define PWDN_GPIO_NUM     32
#define RESET_GPIO_NUM    -1
#define XCLK_GPIO_NUM      0
#define SIOD_GPIO_NUM     26
#define SIOC_GPIO_NUM     27

#define Y9_GPIO_NUM       35
#define Y8_GPIO_NUM       34
#define Y7_GPIO_NUM       39
#define Y6_GPIO_NUM       36
#define Y5_GPIO_NUM       21
#define Y4_GPIO_NUM       19
#define Y3_GPIO_NUM       18
#define Y2_GPIO_NUM        5
#define VSYNC_GPIO_NUM    25
#define HREF_GPIO_NUM     23
#define PCLK_GPIO_NUM     22


void setup() {
  psramInit();
  Serial.begin(115200);
  Serial.println("First\n\n##################################");
  Serial.printf("Internal Total heap %d, internal Free Heap %d\n", ESP.getHeapSize(), ESP.getFreeHeap());
  Serial.printf("SPIRam Total heap %d, SPIRam Free Heap %d\n", ESP.getPsramSize(), ESP.getFreePsram());
  Serial.printf("ChipRevision %d, Cpu Freq %d, SDK Version %s\n", ESP.getChipRevision(), ESP.getCpuFreqMHz(), ESP.getSdkVersion());
  Serial.printf("Flash Size %d, Flash Speed %d\n", ESP.getFlashChipSize(), ESP.getFlashChipSpeed());
  Serial.println("##################################\n\n");
  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sccb_sda = SIOD_GPIO_NUM;
  config.pin_sccb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.frame_size = FRAMESIZE_VGA;
  config.pixel_format = PIXFORMAT_GRAYSCALE;
  config.grab_mode = CAMERA_GRAB_LATEST;
  config.fb_location = CAMERA_FB_IN_PSRAM;
  config.jpeg_quality = 4;
  config.fb_count = 1;
  // camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }
  //---------------------------------------------------------------------------------------------------------
  Serial.println("after initialize\n\n##################################");
  Serial.printf("Internal Total heap %d, internal Free Heap %d\n", ESP.getHeapSize(), ESP.getFreeHeap());
  Serial.printf("SPIRam Total heap %d, SPIRam Free Heap %d\n", ESP.getPsramSize(), ESP.getFreePsram());
  Serial.printf("ChipRevision %d, Cpu Freq %d, SDK Version %s\n", ESP.getChipRevision(), ESP.getCpuFreqMHz(), ESP.getSdkVersion());
  Serial.printf("Flash Size %d, Flash Speed %d\n", ESP.getFlashChipSize(), ESP.getFlashChipSpeed());
  Serial.println("##################################\n\n");

  //---------------------------------------------------------------------------------------------------------
  //get pictures
  camera_fb_t *fb = NULL;
  fb = esp_camera_fb_get();
  if (!fb)
  {
      Serial.println("Camera capture failed");
  }
  Serial.println("read pictures\n\n##################################");
  Serial.printf("Internal Total heap %d, internal Free Heap %d\n", ESP.getHeapSize(), ESP.getFreeHeap());
  Serial.printf("SPIRam Total heap %d, SPIRam Free Heap %d\n", ESP.getPsramSize(), ESP.getFreePsram());
  Serial.printf("ChipRevision %d, Cpu Freq %d, SDK Version %s\n", ESP.getChipRevision(), ESP.getCpuFreqMHz(), ESP.getSdkVersion());
  Serial.printf("Flash Size %d, Flash Speed %d\n", ESP.getFlashChipSize(), ESP.getFlashChipSpeed());
  Serial.println("##################################\n\n");
  //----------------------------------------------------------------------------------------------------
  //release
  esp_camera_fb_return(fb);
  Serial.println("after release\n\n##################################");
  Serial.printf("Internal Total heap %d, internal Free Heap %d\n", ESP.getHeapSize(), ESP.getFreeHeap());
  Serial.printf("SPIRam Total heap %d, SPIRam Free Heap %d\n", ESP.getPsramSize(), ESP.getFreePsram());
  Serial.printf("ChipRevision %d, Cpu Freq %d, SDK Version %s\n", ESP.getChipRevision(), ESP.getCpuFreqMHz(), ESP.getSdkVersion());
  Serial.printf("Flash Size %d, Flash Speed %d\n", ESP.getFlashChipSize(), ESP.getFlashChipSpeed());
  Serial.println("##################################\n\n");
}

void loop() {
  // put your main code here, to run repeatedly:

}

The output result when I set the framesize to VGA

08:42:52.817 -> ets Jun  8 2016 00:22:57
08:42:52.817 -> 
08:42:52.817 -> rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
08:42:52.817 -> configsip: 0, SPIWP:0xee
08:42:52.817 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
08:42:52.817 -> mode:DIO, clock div:1
08:42:52.817 -> load:0x3fff0030,len:1184
08:42:52.817 -> load:0x40078000,len:13260
08:42:52.817 -> load:0x40080400,len:3028
08:42:52.817 -> entry 0x400805e4
08:42:53.463 -> First
08:42:53.463 -> 
08:42:53.463 -> ##################################
08:42:53.463 -> Internal Total heap 361064, internal Free Heap 330640
08:42:53.463 -> SPIRam Total heap 4192123, SPIRam Free Heap 4192123
08:42:53.463 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:42:53.463 -> Flash Size 4194304, Flash Speed 80000000
08:42:53.463 -> ##################################
08:42:53.463 -> 
08:42:53.463 -> 
08:42:54.245 -> after initialize
08:42:54.245 -> 
08:42:54.245 -> ##################################
08:42:54.245 -> Internal Total heap 360776, internal Free Heap 300764
08:42:54.245 -> SPIRam Total heap 4192107, SPIRam Free Heap 3884907
08:42:54.245 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:42:54.245 -> Flash Size 4194304, Flash Speed 80000000
08:42:54.245 -> ##################################
08:42:54.245 -> 
08:42:54.245 -> 
08:42:54.720 -> E (3613) cam_hal: FB-SIZE: 303360 != 307200
08:42:54.924 -> E (3815) cam_hal: FB-SIZE: 303360 != 307200
08:42:55.128 -> E (4018) cam_hal: FB-SIZE: 303360 != 307200
08:42:55.332 -> E (4221) cam_hal: FB-SIZE: 303360 != 307200
08:42:55.536 -> E (4424) cam_hal: FB-SIZE: 303360 != 307200
08:42:55.740 -> E (4627) cam_hal: FB-SIZE: 303360 != 307200
08:42:55.944 -> E (4830) cam_hal: FB-SIZE: 303360 != 307200
08:42:56.148 -> E (5033) cam_hal: FB-SIZE: 303360 != 307200
08:42:56.352 -> E (5236) cam_hal: FB-SIZE: 303360 != 307200
08:42:56.555 -> E (5439) cam_hal: FB-SIZE: 303360 != 307200
08:42:56.759 -> E (5642) cam_hal: FB-SIZE: 303360 != 307200
08:42:56.963 -> E (5845) cam_hal: FB-SIZE: 303360 != 307200
08:42:57.167 -> E (6048) cam_hal: FB-SIZE: 303360 != 307200
08:42:57.370 -> E (6251) cam_hal: FB-SIZE: 303360 != 307200
08:42:57.574 -> E (6453) cam_hal: FB-SIZE: 303360 != 307200
08:42:57.778 -> E (6656) cam_hal: FB-SIZE: 303360 != 307200
08:42:57.982 -> E (6859) cam_hal: FB-SIZE: 303360 != 307200
08:42:58.186 -> E (7062) cam_hal: FB-SIZE: 303360 != 307200
08:42:58.254 -> Camera capture failed
08:42:58.254 -> read pictures
08:42:58.254 -> 
08:42:58.254 -> ##################################
08:42:58.254 -> Internal Total heap 360760, internal Free Heap 300664
08:42:58.254 -> SPIRam Total heap 4192107, SPIRam Free Heap 3884907
08:42:58.254 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:42:58.254 -> Flash Size 4194304, Flash Speed 80000000
08:42:58.289 -> ##################################
08:42:58.289 -> 
08:42:58.289 -> 
08:42:58.289 -> after release
08:42:58.289 -> 
08:42:58.289 -> ##################################
08:42:58.289 -> Internal Total heap 360760, internal Free Heap 300664
08:42:58.289 -> SPIRam Total heap 4192107, SPIRam Free Heap 3884907
08:42:58.289 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:42:58.289 -> Flash Size 4194304, Flash Speed 80000000
08:42:58.289 -> ##################################
08:42:58.289 -> 
08:42:58.289 -> 
08:42:58.390 -> E (7265) cam_hal: FB-SIZE: 303360 != 307200
08:42:58.594 -> E (7468) cam_hal: FB-SIZE: 303360 != 307200
08:42:58.798 -> E (7671) cam_hal: FB-SIZE: 303360 != 307200
08:42:59.002 -> E (7874) cam_hal: FB-SIZE: 303360 != 307200
08:42:59.206 -> E (8077) cam_hal: FB-SIZE: 303360 != 307200
08:42:59.376 -> E (8280) cam_hal: FB-SIZE: 303360 != 307200
08:42:59.581 -> E (8483) cam_hal: FB-SIZE: 303360 != 307200
08:42:59.785 -> E (8685) cam_hal: FB-SIZE: 303360 != 307200
08:42:59.989 -> E (8888) cam_hal: FB-SIZE: 303360 != 307200
08:43:00.193 -> E (9091) cam_hal: FB-SIZE: 303360 != 307200
08:43:00.397 -> E (9294) cam_hal: FB-SIZE: 303360 != 307200
08:43:00.601 -> E (9497) cam_hal: FB-SIZE: 303360 != 307200
08:43:00.805 -> E (9700) cam_hal: FB-SIZE: 303360 != 307200

And the output when I set the framesize to HVGA

08:40:11.082 -> after initialize
08:40:11.082 -> 
08:40:11.082 -> ##################################
08:40:11.082 -> Internal Total heap 360776, internal Free Heap 300812
08:40:11.082 -> SPIRam Total heap 4192107, SPIRam Free Heap 4038507
08:40:11.082 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:40:11.082 -> Flash Size 4194304, Flash Speed 80000000
08:40:11.115 -> ##################################
08:40:11.115 -> 
08:40:11.115 -> 
08:40:11.353 -> read pictures
08:40:11.353 -> 
08:40:11.353 -> ##################################
08:40:11.387 -> Internal Total heap 360776, internal Free Heap 300812
08:40:11.387 -> SPIRam Total heap 4192107, SPIRam Free Heap 4038507
08:40:11.387 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:40:11.387 -> Flash Size 4194304, Flash Speed 80000000
08:40:11.387 -> ##################################
08:40:11.387 -> 
08:40:11.387 -> 
08:40:11.387 -> after release
08:40:11.387 -> 
08:40:11.387 -> ##################################
08:40:11.387 -> Internal Total heap 360776, internal Free Heap 300812
08:40:11.387 -> SPIRam Total heap 4192107, SPIRam Free Heap 4038507
08:40:11.421 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
08:40:11.421 -> Flash Size 4194304, Flash Speed 80000000
08:40:11.421 -> ##################################
08:40:11.421 -> 
08:40:11.421 -> 
08:40:16.416 -> E (13281) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
08:40:16.416 -> E (13281) task_wdt:  - IDLE0 (CPU 0)
08:40:16.416 -> E (13281) task_wdt: Tasks currently running:
08:40:16.416 -> E (13281) task_wdt: CPU 0: loopTask
08:40:16.416 -> E (13281) task_wdt: CPU 1: IDLE1
08:40:16.416 -> E (13281) task_wdt: Aborting.
08:40:16.450 -> 
08:40:16.450 -> abort() was called at PC 0x400da2c9 on core 0

It seems that data doesn't store in the psram directly,it store in the internal ram first,and move the data from internal ram to psram,is it correct?

if yes,is there a way can just store data in psram,not store in the internal ram first?

Hi @lemonsamon ,

Welcome to the forum..

Did you enable the psram, it's in the tools menu??
Pretty sure it's disabled by default, cam wont be able to use it..

good luck.. ~q

never mind..
check this..
https://github.com/espressif/esp32-camera/issues/612

sorry.. ~q

Hi @qubits-us
I have enabled psram ,test result is shown above

Hi
I have tested according this issue,and edit clock frequency to 10000000
howerver it doesn't work

output logs

09:26:52.938 -> ets Jun  8 2016 00:22:57
09:26:52.938 -> 
09:26:52.938 -> rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
09:26:52.938 -> configsip: 0, SPIWP:0xee
09:26:52.938 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
09:26:52.938 -> mode:DIO, clock div:1
09:26:52.938 -> load:0x3fff0030,len:1184
09:26:52.938 -> load:0x40078000,len:13260
09:26:52.938 -> load:0x40080400,len:3028
09:26:52.938 -> entry 0x400805e4
09:26:53.586 -> First
09:26:53.586 -> 
09:26:53.586 -> ##################################
09:26:53.586 -> Internal Total heap 361064, internal Free Heap 330640
09:26:53.586 -> SPIRam Total heap 4192123, SPIRam Free Heap 4192123
09:26:53.586 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
09:26:53.586 -> Flash Size 4194304, Flash Speed 80000000
09:26:53.586 -> ##################################
09:26:53.624 -> 
09:26:53.624 -> 
09:26:54.372 -> after initialize
09:26:54.372 -> 
09:26:54.372 -> ##################################
09:26:54.372 -> Internal Total heap 360776, internal Free Heap 300812
09:26:54.372 -> SPIRam Total heap 4192107, SPIRam Free Heap 3884907
09:26:54.372 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
09:26:54.372 -> Flash Size 4194304, Flash Speed 80000000
09:26:54.372 -> ##################################
09:26:54.372 -> 
09:26:54.372 -> 
09:26:55.489 -> E (4849) cam_hal: FB-SIZE: 299520 != 307200
09:26:55.897 -> E (5255) cam_hal: FB-SIZE: 299520 != 307200
09:26:56.282 -> E (5660) cam_hal: FB-SIZE: 299520 != 307200
09:26:56.688 -> E (6066) cam_hal: FB-SIZE: 299520 != 307200
09:26:57.095 -> E (6471) cam_hal: FB-SIZE: 299520 != 307200
09:26:57.503 -> E (6877) cam_hal: FB-SIZE: 299520 != 307200
09:26:57.911 -> E (7283) cam_hal: FB-SIZE: 299520 != 307200
09:26:58.319 -> E (7688) cam_hal: FB-SIZE: 299520 != 307200
09:26:58.387 -> Camera capture failed
09:26:58.387 -> read pictures
09:26:58.387 -> 
09:26:58.387 -> ##################################
09:26:58.387 -> Internal Total heap 360760, internal Free Heap 300712
09:26:58.387 -> SPIRam Total heap 4192107, SPIRam Free Heap 3884907
09:26:58.387 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
09:26:58.387 -> Flash Size 4194304, Flash Speed 80000000
09:26:58.421 -> ##################################
09:26:58.421 -> 
09:26:58.421 -> 
09:26:58.421 -> after release
09:26:58.421 -> 
09:26:58.421 -> ##################################
09:26:58.421 -> Internal Total heap 360760, internal Free Heap 300712
09:26:58.421 -> SPIRam Total heap 4192107, SPIRam Free Heap 3884907
09:26:58.421 -> ChipRevision 1, Cpu Freq 240, SDK Version v4.4.7-dirty
09:26:58.421 -> Flash Size 4194304, Flash Speed 80000000
09:26:58.421 -> ##################################
09:26:58.421 -> 
09:26:58.421 -> 
09:26:58.727 -> E (8094) cam_hal: FB-SIZE: 299520 != 307200
09:26:59.134 -> E (8499) cam_hal: FB-SIZE: 299520 != 307200

Just ran your code here..

21:47:18.191 -> First
21:47:18.191 -> 
21:47:18.191 -> ##################################
21:47:18.191 -> Internal Total heap 374596, internal Free Heap 342856
21:47:18.235 -> SPIRam Total heap 4194304, SPIRam Free Heap 4192124
21:47:18.235 -> ChipRevision 300, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
21:47:18.235 -> Flash Size 4194304, Flash Speed 80000000
21:47:18.235 -> ##################################
21:47:18.235 -> 
21:47:18.235 -> 
21:47:18.408 -> after initialize
21:47:18.408 -> 
21:47:18.408 -> ##################################
21:47:18.408 -> Internal Total heap 374596, internal Free Heap 307968
21:47:18.408 -> SPIRam Total heap 4194304, SPIRam Free Heap 3884908
21:47:18.408 -> ChipRevision 300, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
21:47:18.452 -> Flash Size 4194304, Flash Speed 80000000
21:47:18.452 -> ##################################
21:47:18.452 -> 
21:47:18.452 -> 
21:47:19.291 -> read pictures
21:47:19.291 -> 
21:47:19.291 -> ##################################
21:47:19.291 -> Internal Total heap 374596, internal Free Heap 307968
21:47:19.324 -> SPIRam Total heap 4194304, SPIRam Free Heap 3884908
21:47:19.324 -> ChipRevision 300, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
21:47:19.324 -> Flash Size 4194304, Flash Speed 80000000
21:47:19.324 -> ##################################
21:47:19.324 -> 
21:47:19.324 -> 
21:47:19.324 -> after release
21:47:19.324 -> 
21:47:19.324 -> ##################################
21:47:19.324 -> Internal Total heap 374596, internal Free Heap 307968
21:47:19.324 -> SPIRam Total heap 4194304, SPIRam Free Heap 3884908
21:47:19.366 -> ChipRevision 300, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
21:47:19.366 -> Flash Size 4194304, Flash Speed 80000000
21:47:19.366 -> ##################################
21:47:19.366 -> 
21:47:19.366 -> 

i get different results??

~q

that was your orig code posted, got any revisions you want me to check??

~q

here's a pic of my settings..
using a cheap aithinker..

~q

I'm using a new core..
maybe they fixed something..
try the dev release??

~q

and I see the git is still a bit messed..
hope there is a dev release..
https://github.com/espressif/arduino-esp32

espver

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html

~q

Hi
I use the same setting and the same code,however I got the same error
Is it possible my psram is broken?
I use esp32-arduino version 2.0.16 now

Look at my pic..
Like I said the git is a bit messed doesn't list the dev release version properly..
i'm using 3.0.0.-alpha 3..
but yeah, could try last stable 17..

no not broken, probably just a bug..

~q

I have tested on 3.0.0.-alpha 3
same error

10:55:23.214 -> rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
10:55:23.214 -> configsip: 0, SPIWP:0xee
10:55:23.214 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
10:55:23.214 -> mode:DIO, clock div:1
10:55:23.214 -> load:0x3fff0030,len:1416
10:55:23.214 -> load:0x40078000,len:14804
10:55:23.214 -> load:0x40080400,len:4
10:55:23.214 -> load:0x40080404,len:3356
10:55:23.214 -> entry 0x4008059c
10:55:23.825 -> First
10:55:23.825 -> 
10:55:23.825 -> ##################################
10:55:23.825 -> Internal Total heap 374596, internal Free Heap 342104
10:55:23.825 -> SPIRam Total heap 4194304, SPIRam Free Heap 4192124
10:55:23.825 -> ChipRevision 100, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
10:55:23.825 -> Flash Size 4194304, Flash Speed 80000000
10:55:23.859 -> ##################################
10:55:23.859 -> 
10:55:23.859 -> 
10:55:24.607 -> after initialize
10:55:24.607 -> 
10:55:24.607 -> ##################################
10:55:24.607 -> Internal Total heap 374596, internal Free Heap 307216
10:55:24.607 -> SPIRam Total heap 4194304, SPIRam Free Heap 3884908
10:55:24.607 -> ChipRevision 100, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
10:55:24.607 -> Flash Size 4194304, Flash Speed 80000000
10:55:24.607 -> ##################################
10:55:24.641 -> 
10:55:24.641 -> 
10:55:25.117 -> E (3611) cam_hal: FB-SIZE: 303360 != 307200
10:55:25.321 -> E (3814) cam_hal: FB-SIZE: 303360 != 307200
10:55:25.525 -> E (4017) cam_hal: FB-SIZE: 303360 != 307200
10:55:25.728 -> E (4220) cam_hal: FB-SIZE: 303360 != 307200
10:55:25.898 -> E (4423) cam_hal: FB-SIZE: 303360 != 307200
10:55:26.103 -> E (4626) cam_hal: FB-SIZE: 303360 != 307200
10:55:26.307 -> E (4829) cam_hal: FB-SIZE: 303360 != 307200
10:55:26.511 -> E (5031) cam_hal: FB-SIZE: 303360 != 307200
10:55:26.715 -> E (5234) cam_hal: FB-SIZE: 303360 != 307200
10:55:26.919 -> E (5437) cam_hal: FB-SIZE: 303360 != 307200
10:55:27.123 -> E (5640) cam_hal: FB-SIZE: 303360 != 307200
10:55:27.327 -> E (5843) cam_hal: FB-SIZE: 303360 != 307200
10:55:27.531 -> E (6046) cam_hal: FB-SIZE: 303360 != 307200
10:55:27.735 -> E (6249) cam_hal: FB-SIZE: 303360 != 307200
10:55:27.939 -> E (6452) cam_hal: FB-SIZE: 303360 != 307200
10:55:28.144 -> E (6655) cam_hal: FB-SIZE: 303360 != 307200
10:55:28.346 -> E (6858) cam_hal: FB-SIZE: 303360 != 307200
10:55:28.551 -> E (7061) cam_hal: FB-SIZE: 303360 != 307200
10:55:28.619 -> Camera capture failed
10:55:28.619 -> read pictures
10:55:28.619 -> 
10:55:28.619 -> ##################################
10:55:28.619 -> Internal Total heap 374596, internal Free Heap 307116
10:55:28.619 -> SPIRam Total heap 4194304, SPIRam Free Heap 3884908
10:55:28.619 -> ChipRevision 100, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
10:55:28.653 -> Flash Size 4194304, Flash Speed 80000000
10:55:28.653 -> ##################################
10:55:28.653 -> 
10:55:28.653 -> 
10:55:28.653 -> after release
10:55:28.653 -> 
10:55:28.653 -> ##################################
10:55:28.653 -> Internal Total heap 374596, internal Free Heap 307116
10:55:28.653 -> SPIRam Total heap 4194304, SPIRam Free Heap 3884908
10:55:28.653 -> ChipRevision 100, Cpu Freq 240, SDK Version v5.1.2-185-g3662303f31-dirty
10:55:28.653 -> Flash Size 4194304, Flash Speed 80000000
10:55:28.687 -> ##################################
10:55:28.687 -> 
10:55:28.687 -> 
10:55:28.755 -> E (7264) cam_hal: FB-SIZE: 303360 != 307200
10:55:28.958 -> E (7466) cam_hal: FB-SIZE: 303360 != 307200
10:55:29.162 -> E (7669) cam_hal: FB-SIZE: 303360 != 307200
10:55:29.365 -> E (7872) cam_hal: FB-SIZE: 303360 != 307200
10:55:29.569 -> E (8075) cam_hal: FB-SIZE: 303360 != 307200
10:55:29.772 -> E (8278) cam_hal: FB-SIZE: 303360 != 307200
10:55:29.976 -> E (8481) cam_hal: FB-SIZE: 303360 != 307200
10:55:30.178 -> E (8684) cam_hal: FB-SIZE: 303360 != 307200
10:55:30.383 -> E (8887) cam_hal: FB-SIZE: 303360 != 307200

really only thing I notice is ChipRevision..
Yours increased from 1 to 100..
Mine is showing 300??

got another cam??
is that a really old board??
mines probably about a year old..

strange.. ~q

my internal free heap is higher than yours??
and your internal free heap is exactly the same that is allocated from psram..
subtracting psram free heaps 307216..
i got the same allocation from psram but for some reason my internal free heap is higher, 307968..
not sure if it means anything..

strange.. ~q

I think I found the problem
Because I want to detect very small qrcode,I use ov5640 autoFocus to test
(because if I use ov2640,image blur when taking pictures)
I change back the original ov2640,and everything works fine
maybe memory allocation is different for different sensors?

1 Like

That's possible..
These cams are a bit cheap, I got a multi pack and one of them gives me some grief every so often..
have to take cam off, then back on and it starts working..
got an s3 cam too, bit nicer..

my latest cam sketch..

glad you got it sorted out..

~q

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.