Skip to content

ESP32-S2 I2S and Camera Initialization conflict #6830

@06GitHub

Description

@06GitHub

Board

ESP32-S2-WROVER-I (Saola) 4Mb Flash 2Mb PSRAM

Device Description

ESP32-S2-WROVER_I (Saola) 4Mb Flash 2Mb PSRAM

Hardware Configuration

Schematic_i2s camera_2022-05-31

Version

v2.0.3

IDE Name

Arduino IDE 1.8.13

Operating System

Windows 10

Flash frequency

FLASH chip speed 80000000

PSRAM enabled

yes

Upload speed

115200

Description

Problem Statement
Both I2S (audio) and Camera cannot be initialized simultaneously : when I2S is activated, Camera init fails

Tests
3 tests done according to booleans I2SACTIVE and CAMERAACTIVE (see sketch below) :

  1. I2S activated, Camera not activated : I2S init OK
  2. I2S activated and Camera activated : I2S init OK, Camera Init KO
    Error message :
    E (1488) cam_hal: cam_config(389): cam intr alloc failed
    E (1488) camera: Camera config failed with error 0xffffffff
  3. I2S not activated and Camera activated : Camera init OK

Expected behaviour
Camera init should be ok with I2S :
2) I2S activated and Camera activated : I2S init OK, Camera Init OK

Sketch

/****************************
 * ESP32-S2 Camera I2S
 ****************************
 * May 31 2022
 * Init test for I2S and Camera OV2640
 * Problem statement
 * =================
 * Both I2S (audio) and Camera cannot be initialized simultaneously : when I2S is activated, Camera init fails
 * Tests
 * =====
 * 3 tests done according to booleans I2SACTIVE and CAMERAACTIVE
 * 1) I2S activated, Camera not activated : I2S init OK
 * 2) I2S activated and Camera activated : I2S init OK, Camera Init KO
 * 3) I2S not activated and Camera activated : Camera init OK
 * Expected behaviour
 * ==================
 * Camera init should be ok with I2S :
 * 2) I2S activated and Camera activated : I2S init OK, Camera Init OK
 */

// debugging
static const char *TAG = "LOG_";

bool I2SACTIVE=true; // true if i2s is activated, false if not
bool CAMERAACTIVE=true; // true if camera is activated, false if not

// esp.h
//======
void esp_h_data() {
ESP_LOGI(TAG,"Internal RAM HeapSize (total heap size) %d", ESP.getHeapSize());
ESP_LOGI(TAG,"Internal RAM FreeHeap (available heap) %d", ESP.getFreeHeap());
ESP_LOGI(TAG,"Internal RAM MinFreeHeap (lowest level of free heap since boot) %d", ESP.getMinFreeHeap());
ESP_LOGI(TAG,"Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) %d", ESP. getMaxAllocHeap());

ESP_LOGI(TAG, "SPI RAM PsramSize (total PSRAM) %d", ESP.getPsramSize());
ESP_LOGI(TAG, "SPI RAM FreePsram (available PSRAM) %d", ESP.getFreePsram());
ESP_LOGI(TAG, "SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) %d", ESP.getMinFreePsram());
ESP_LOGI(TAG, "SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) %d",ESP.getMaxAllocPsram());

ESP_LOGI(TAG, "CHIP revision %d", ESP.getChipRevision());
ESP_LOGI(TAG, "CHIP model %s", ESP.getChipModel());
ESP_LOGI(TAG, "CHIP Cores %d", ESP.getChipCores());
ESP_LOGI(TAG, "CYCLE count %d", ESP.getCycleCount());
ESP_LOGI(TAG, "SDK version %s", ESP.getSdkVersion());

ESP_LOGI(TAG, "FLASH chip size %d", ESP.getFlashChipSize());
ESP_LOGI(TAG, "FLASH chip speed %d", ESP.getFlashChipSpeed());
ESP_LOGI(TAG, "FLASH chip mode %d", ESP.getFlashChipMode());

ESP_LOGI(TAG, "SKETCH size %d", ESP.getSketchSize());
ESP_LOGI(TAG, "SKETCH free space %d", ESP.getFreeSketchSpace());

}

// I2S Protocol (Audio)
// ===================
#include "driver/i2s.h"           // Library of I2S routines, comes with ESP32 standard install
#define I2S_DOUT      33          // i2S Data out
#define I2S_BCLK      38          // Bit clock ESP32
#define I2S_LRC       21          // Left/Right clock, also known as Frame clock or word select
#define I2S_NUM       0           // i2s port number
//  I2S configuration
i2s_config_t i2s_config =       
{
    .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX),
    .sample_rate = 44100,                           // all files must have SAME sample rate, less or equal to 44100 Hz, updated when file is read 
    .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT, 
    .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, 
    .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
    .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,       // high interrupt priority
    .dma_buf_count = 4,                             // 4 buffers
    .dma_buf_len = 256,                             // 256 bytes per buffer, so 1K of buffer space
    .use_apll=0,
    .tx_desc_auto_clear= true, 
    .fixed_mclk=-1    
};

i2s_pin_config_t pin_config = // wav remove static const
{
    .bck_io_num = I2S_BCLK,                           // The bit clock connection
    .ws_io_num = I2S_LRC,                             // Word select, also known as word select or left right clock
    .data_out_num = I2S_DOUT,                         // Data out from the ESP32, connect to DIN on 38357A
    .data_in_num = I2S_PIN_NO_CHANGE                  // we are not interested in I2S data into the ESP32
};

static const i2s_port_t i2s_num = I2S_NUM_0;  // i2s port number
esp_err_t i2s_returncode; // return code for i2s calls


// CAM
// ===
#include "esp_camera.h"

// set Camera type
#define OV2640

#ifdef OV2640 // CAMERA OV2640 (no XCLK)
#define CAM_PIN_PWDN    39
#define CAM_PIN_RESET   6 // prev 5
#define CAM_PIN_XCLK    0 // XLCL is embedded on breakout board
#define CAM_PIN_SIOD    40
#define CAM_PIN_SIOC    41
#define CAM_PIN_D7      17
#define CAM_PIN_D6      16
#define CAM_PIN_D5      15
#define CAM_PIN_D4      14
#define CAM_PIN_D3      13
#define CAM_PIN_D2      12
#define CAM_PIN_D1      11
#define CAM_PIN_D0      10
#define CAM_PIN_VSYNC   4
#define CAM_PIN_HREF    5
#define CAM_PIN_PCLK    7
#endif // end CAMERA OV2640

static camera_config_t camera_config = {
    .pin_pwdn = CAM_PIN_PWDN,
    .pin_reset = CAM_PIN_RESET,
    .pin_xclk = CAM_PIN_XCLK,
    .pin_sscb_sda = CAM_PIN_SIOD,
    .pin_sscb_scl = CAM_PIN_SIOC,
    .pin_d7 = CAM_PIN_D7,
    .pin_d6 = CAM_PIN_D6,
    .pin_d5 = CAM_PIN_D5,
    .pin_d4 = CAM_PIN_D4,
    .pin_d3 = CAM_PIN_D3,
    .pin_d2 = CAM_PIN_D2,
    .pin_d1 = CAM_PIN_D1,
    .pin_d0 = CAM_PIN_D0,
    .pin_vsync = CAM_PIN_VSYNC,
    .pin_href = CAM_PIN_HREF,
    .pin_pclk = CAM_PIN_PCLK,
    //.xclk_freq_hz = 20000000,
    .xclk_freq_hz = 10000000,
    .ledc_timer = LEDC_TIMER_0,
    .ledc_channel = LEDC_CHANNEL_0,
    // pixel format : YUV422,GRAYSCALE,RGB565,JPEG
    .pixel_format = PIXFORMAT_GRAYSCALE,
    // frame size : QQVGA(160x120),HQVGA(240x176),QVGA(320x240),CIF(400x296),VGA(640x480),SVGA(800x600),XGA(1024x768),SXGA(1280x1024),UXGA(1600x1200)
    // do not use sizes above QVGA when not JPEG, JPEG format is only supported for ov2640, ov3660 and ov5640
    .frame_size = FRAMESIZE_QVGA,
    .jpeg_quality = 12, //0-63 lower number means higher quality
    .fb_count = 1,       //if more than one, i2s runs in continuous mode. Use only with JPEG
    .grab_mode = CAMERA_GRAB_WHEN_EMPTY,
};

static esp_err_t init_camera() {
    //initialize the camera
    esp_err_t camera_init_status = esp_camera_init(&camera_config);
    return camera_init_status; // status is ESP_OK if no error
}

// =======================================================================
// setup
// =======================================================================
void setup()
{ // For debugging purposes
  Serial.begin(115200);
  ESP_LOGI(TAG,""); 
  ESP_LOGI(TAG,"===================================================");   
  if (I2SACTIVE) ESP_LOGI(TAG,"I2S ACTIVATED");
  else ESP_LOGI(TAG,"I2S NOT ACTIVATED");
  if (CAMERAACTIVE) ESP_LOGI(TAG,"CAMERA ACTIVATED");
  else ESP_LOGI(TAG,"CAMERA NOT ACTIVATED");  
  esp_h_data(); // display ESP32-S2 configuration when setup starts

  // PSRAM
  // =====
  // PSRAM WROVER only
  if(psramInit()) {
    ESP_LOGD(TAG, "PSRAM is correctly initialized");
      // Get PSRAM Size
      ESP_LOGD(TAG, "Free PSRAM available (bytes): %d", ESP.getFreePsram());
  }
  else ESP_LOGE(TAG, "PSRAM is not available");

if (I2SACTIVE) { // configure I2S if active
// I2S
// ===
    // install i2s driver
    ESP_LOGE(TAG,"---------------------------------------------------");  
    i2s_returncode=i2s_driver_install(i2s_num, &i2s_config, 0, NULL); // sample rate is set by InitWavFiles (found in files)
    if (i2s_returncode == ESP_OK) ESP_LOGI(TAG,"i2s_driver install OK");
    else ESP_LOGE(TAG,"ERROR i2s_driver_install returned %d, see i2s.h", i2s_returncode); // TODO handle error
    i2s_returncode=i2s_set_pin(i2s_num, &pin_config);
    if (i2s_returncode == ESP_OK) ESP_LOGI(TAG,"i2s_set_pin OK");
    else ESP_LOGE(TAG,"ERROR i2s_set_pin returned %d, see i2s.h", i2s_returncode); // TODO handle error
    ESP_LOGE(TAG,"---------------------------------------------------");  
} // end i2s active

// CAM
// ===
if (CAMERAACTIVE) { // configure camera if active
  if(ESP_OK != init_camera()) {
    ESP_LOGE(TAG,"---------------------------------------------------");    
    ESP_LOGE(TAG,"ERROR Camera init KO");
    ESP_LOGE(TAG,"---------------------------------------------------");      
    // TODO handle error
  }
  else {
    ESP_LOGI(TAG,"---------------------------------------------------");      
    ESP_LOGI(TAG,"Camera init OK");
    ESP_LOGI(TAG,"---------------------------------------------------");     
  }

  esp_h_data(); // display ESP32-S2 configuration when setup ends
} // end camera active

  esp_h_data();
  ESP_LOGI(TAG,"===================================================");   

  
} // end setup()

// =======================================================================
// loop
// =======================================================================
void loop() {
 delay(1000);
} // end loop

Debug Message

*********************************************************
TEST 1) I2S activated, Camera not activated : I2S init OK
*********************************************************
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x524
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28cc
entry 0x4004c18c
[   770][I][esp32-hal-psram.c:96] psra[   774][I][esp32s2_camera_i2s_test.ino:159] setup(): [LOG_] 
[   774][I][esp32s2_camera_i2s_test.ino:160] setup(): [LOG_] ===================================================
[   778][I][esp32s2_camera_i2s_test.ino:161] setup(): [LOG_] I2S ACTIVATED
[   784][I][esp32s2_camera_i2s_test.ino:164] setup(): [LOG_] CAMERA NOT ACTIVATED
[   792][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 245008
[   801][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 220624
[   811][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 220496
[   823][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 200692
[   837][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094711
[   846][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2094451
[   855][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2094451
[   867][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 2064372
[   881][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[   888][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[   895][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[   902][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 104643892
[   910][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[   918][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[   926][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[   934][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[   942][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[   971][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[   975][D][esp32s2_camera_i2s_test.ino:171] setup(): [LOG_] PSRAM is correctly initialized
[   983][D][esp32s2_camera_i2s_test.ino:173] setup(): [LOG_] Free PSRAM available (bytes): 2094451
[   991][E][esp32s2_camera_i2s_test.ino:181] setup(): [LOG_] ---------------------------------------------------
[  1002][I][esp32s2_camera_i2s_test.ino:183] setup(): [LOG_] i2s_driver install OK
[  1009][I][esp32s2_camera_i2s_test.ino:186] setup(): [LOG_] i2s_set_pin OK
[  1015][E][esp32s2_camera_i2s_test.ino:188] setup(): [LOG_] ---------------------------------------------------
[  1025][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 244804
[  1035][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 215844
[  1045][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 215716
[  1057][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 196596
[  1070][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094711
[  1079][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2094451
[  1089][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2094451
[  1101][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 2064372
[  1114][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[  1121][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[  1129][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[  1136][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 160680556
[  1143][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[  1152][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[  1160][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[  1168][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[  1175][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[  1204][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[  1208][I][esp32s2_camera_i2s_test.ino:210] setup(): [LOG_] ===================================================

************************************************************************
TEST 2) I2S activated and Camera activated : I2S init OK, Camera Init KO
************************************************************************
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x524
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28cc
entry 0x4004c18c
[   768][I][esp32-hal-psram.c:96] psra[   771][I][esp32s2_camera_i2s_test.ino:159] setup(): [LOG_] 
[   772][I][esp32s2_camera_i2s_test.ino:160] setup(): [LOG_] ===================================================
[   776][I][esp32s2_camera_i2s_test.ino:161] setup(): [LOG_] I2S ACTIVATED
[   782][I][esp32s2_camera_i2s_test.ino:163] setup(): [LOG_] CAMERA ACTIVATED
[   789][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 245008
[   799][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 220624
[   809][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 220496
[   820][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 200692
[   834][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094711
[   843][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2094451
[   853][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2094451
[   865][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 2064372
[   878][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[   885][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[   893][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[   900][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 104554021
[   907][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[   916][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[   924][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[   932][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[   939][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[   968][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[   972][D][esp32s2_camera_i2s_test.ino:171] setup(): [LOG_] PSRAM is correctly initialized
[   980][D][esp32s2_camera_i2s_test.ino:173] setup(): [LOG_] Free PSRAM available (bytes): 2094451
[   989][E][esp32s2_camera_i2s_test.ino:181] setup(): [LOG_] ---------------------------------------------------
[   999][I][esp32s2_camera_i2s_test.ino:183] setup(): [LOG_] i2s_driver install OK
[  1006][I][esp32s2_camera_i2s_test.ino:186] setup(): [LOG_] i2s_set_pin OK
[  1013][E][esp32s2_camera_i2s_test.ino:188] setup(): [LOG_] ---------------------------------------------------
E (1488) cam_hal: cam_config(389): cam intr alloc failed
E (1488) camera: Camera config failed with error 0xffffffff
[  1256][E][esp32s2_camera_i2s_test.ino:195] setup(): [LOG_] ---------------------------------------------------
[  1265][E][esp32s2_camera_i2s_test.ino:196] setup(): [LOG_] ERROR Camera init KO
[  1272][E][esp32s2_camera_i2s_test.ino:197] setup(): [LOG_] ---------------------------------------------------
[  1282][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 244744
[  1291][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 220104
[  1301][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 188304
[  1313][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 192500
[  1327][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094711
[  1336][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2094451
[  1345][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2017587
[  1357][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 2064372
[  1371][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[  1378][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[  1385][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[  1392][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 222772552
[  1400][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[  1408][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[  1416][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[  1424][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[  1431][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[  1460][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[  1465][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 244744
[  1474][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 220104
[  1484][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 188304
[  1496][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 192500
[  1510][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094711
[  1519][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2094451
[  1528][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2017587
[  1540][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 2064372
[  1554][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[  1561][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[  1568][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[  1575][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 266670811
[  1583][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[  1591][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[  1599][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[  1607][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[  1614][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[  1643][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[  1647][I][esp32s2_camera_i2s_test.ino:210] setup(): [LOG_] ===================================================

***************************************************************
TEST 3) I2S not activated and Camera activated : Camera init OK
***************************************************************
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x524
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28cc
entry 0x4004c18c
[   772][I][esp32-hal-psram.c:96] psra[   776][I][esp32s2_camera_i2s_test.ino:159] setup(): [LOG_] 
[   776][I][esp32s2_camera_i2s_test.ino:160] setup(): [LOG_] ===================================================
[   780][I][esp32s2_camera_i2s_test.ino:162] setup(): [LOG_] I2S NOT ACTIVATED
[   787][I][esp32s2_camera_i2s_test.ino:163] setup(): [LOG_] CAMERA ACTIVATED
[   794][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 245008
[   804][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 220624
[   814][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 220496
[   825][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 200692
[   839][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094711
[   848][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2094451
[   858][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2094451
[   870][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 2064372
[   883][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[   890][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[   898][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[   904][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 104652904
[   912][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[   921][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[   929][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[   937][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[   944][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[   973][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[   977][D][esp32s2_camera_i2s_test.ino:171] setup(): [LOG_] PSRAM is correctly initialized
[   985][D][esp32s2_camera_i2s_test.ino:173] setup(): [LOG_] Free PSRAM available (bytes): 2094451
[  1384][I][esp32s2_camera_i2s_test.ino:201] setup(): [LOG_] ---------------------------------------------------
[  1384][I][esp32s2_camera_i2s_test.ino:202] setup(): [LOG_] Camera init OK
[  1389][I][esp32s2_camera_i2s_test.ino:203] setup(): [LOG_] ---------------------------------------------------
[  1399][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 244792
[  1409][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 190764
[  1419][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 190572
[  1431][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 167924
[  1444][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094687
[  1453][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2017587
[  1463][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2017587
[  1475][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 1998836
[  1488][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[  1495][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[  1503][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[  1510][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 249916201
[  1517][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[  1526][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[  1534][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[  1542][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[  1549][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[  1580][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[  1584][I][esp32s2_camera_i2s_test.ino:30] esp_h_data(): [LOG_] Internal RAM HeapSize (total heap size) 244792
[  1594][I][esp32s2_camera_i2s_test.ino:31] esp_h_data(): [LOG_] Internal RAM FreeHeap (available heap) 190764
[  1603][I][esp32s2_camera_i2s_test.ino:32] esp_h_data(): [LOG_] Internal RAM MinFreeHeap (lowest level of free heap since boot) 190572
[  1615][I][esp32s2_camera_i2s_test.ino:33] esp_h_data(): [LOG_] Internal RAM getMaxAllocHeap (largest block of heap that can be allocated at once) 167924
[  1629][I][esp32s2_camera_i2s_test.ino:35] esp_h_data(): [LOG_] SPI RAM PsramSize (total PSRAM) 2094687
[  1638][I][esp32s2_camera_i2s_test.ino:36] esp_h_data(): [LOG_] SPI RAM FreePsram (available PSRAM) 2017587
[  1648][I][esp32s2_camera_i2s_test.ino:37] esp_h_data(): [LOG_] SPI RAM getMinFreePsram (lowest level of free PSRAM since boot) 2017587
[  1660][I][esp32s2_camera_i2s_test.ino:38] esp_h_data(): [LOG_] SPI RAM getMaxAllocPsram (largest block of PSRAM that can be allocated at once) 1998836
[  1673][I][esp32s2_camera_i2s_test.ino:40] esp_h_data(): [LOG_] CHIP revision 0
[  1680][I][esp32s2_camera_i2s_test.ino:41] esp_h_data(): [LOG_] CHIP model ESP32-S2
[  1687][I][esp32s2_camera_i2s_test.ino:42] esp_h_data(): [LOG_] CHIP Cores 1
[  1694][I][esp32s2_camera_i2s_test.ino:43] esp_h_data(): [LOG_] CYCLE count 294215722
[  1702][I][esp32s2_camera_i2s_test.ino:44] esp_h_data(): [LOG_] SDK version v4.4.1-1-gb8050b365e
[  1711][I][esp32s2_camera_i2s_test.ino:46] esp_h_data(): [LOG_] FLASH chip size 4194304
[  1718][I][esp32s2_camera_i2s_test.ino:47] esp_h_data(): [LOG_] FLASH chip speed 80000000
[  1726][I][esp32s2_camera_i2s_test.ino:48] esp_h_data(): [LOG_] FLASH chip mode 2
[  1734][I][esp32s2_camera_i2s_test.ino:50] esp_h_data(): [LOG_] SKETCH size 297120
[  1763][I][esp32s2_camera_i2s_test.ino:51] esp_h_data(): [LOG_] SKETCH free space 2097152
[  1767][I][esp32s2_camera_i2s_test.ino:210] setup(): [LOG_] ===================================================

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions