I was able to load the sketch to my custom board, from this repo: https://github.com/abratchik/esp32-cam-webserver. The ESp32 starts normally and loads the web server, which I can access through browser. The OTA sketch upload is also working fine on my custom PCB. Moreover, the board detects the correct model of the camera (OV2640 or OV3660) and initialization of the camera passes successfully. Here is what I see in logs (Core debug level set to Verbose):
Code: Select all
17:56:54:847 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
17:56:54:853 -> configsip: 0, SPIWP:0xee
17:56:54:853 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
17:56:54:862 -> mode:DIO, clock div:1
17:56:54:862 -> load:0x3fff0030,len:1344
17:56:54:864 -> load:0x40078000,len:13864
17:56:54:867 -> load:0x40080400,len:3608
17:56:54:871 -> entry 0x400805f0
17:56:55:893 -> [ 689][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
17:56:56:340 -> [ 1136][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
17:56:56:359 -> Starting filesystem
17:56:56:402 -> SDHC card size: 3708MB
17:56:56:800 -> [b]OV2640 camera module detected[/b]
17:56:56:800 -> [b]Camera init succeeded[/b]
17:56:57:105 -> Camera debug is ON
17:56:57:105 -> [ 1902][D][app_cam.cpp:132] loadPrefs(): [app_cam] Log level set to VERBOSE
17:56:57:130 -> Known external SSIDs: xxxxxxxxx
17:56:57:133 -> Starting WiFi
...
17:57:05:415 -> HTTP server started
Code: Select all
fb = esp_camera_fb_get();
I checked all the connections from the camera to ESP32 and they are identical to ESP32-CAM, which I have. I even have soldered my spare ESP32S modules to both my custom PCB and the ESP32-CAM development board and the result was: the ESP32-CAM works fine with the soldered module (I mean, esp_camera_fb_get() returns the frame buffer as expected) but my custom PCB doesn't.
I almost run out of ideas how to debug this issue. Part of the problem is that esp-camera driver from ESP32 HAL doesnt print any diagnostics even when I set the debug level to VERBOSE when uploading the sketch. I only see debug printouts from the WiFI module but not from ESP camera driver. Is there any way I can enable the verbosity for the esp_camera?
If to generalize the question: if I need to enable the debug on the ESP32 HAL layer, how do I do that? I'm using VSCode + Arduino plugin v 0.5.0.