Open SYPark0795 opened 4 months ago
EV-VSYNC-OVF is output when a VSYNC event can't be posted to the internal event queue. Events are posted by DMA and VSYNC interrupts and consumed by the camera task. The camera task is ultimately responsible for initiating DMA. The event overflow means that the CPU can't keep up with the events coming from the queue.
What's your XCLK/framerate? Remember RGB565 in particular is 2 bytes per pixel.
On the ESP32-S3, you can enable "psram mode", I think by setting xclk=16mhz. This removes the extra copy from "bounce buffers" during the frame, so the bottleneck usually becomes the memory bus rather than the CPU. Keep in mind the memory bus has a hard write limit of 80MB/s, but you're still competing with the same SPI bus used by the cpu to access psram/flash and the practical limit is much lower in non-ideal scenarios.
I haven't used RGB565 or YUV formats myself, and it is possible there's a bug. Since you're only seeing the issue at higher resolutions though, I think you are likely maxing out the bandwidth of either the CPU or memory bus.
I think I experimented with config.xclk_freq_hz
both on 20mhz and 16mhz.
EDIT: For the framerate, I'm not doing anything fast. I'm just experimenting if high quality / RAW capturing is possible at all. I do have config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
in the code, if this matters. What I'm interested in is high quality photo, and high framerate is not needed whatsoever - 1 shot / 10 min at best.
The issue is not only at higher resolutions. Why does it have the same issue on 1024x768, but not on 1280x1024? Why is YUV422, having half the size, behaving the same regarding the resolutions if the bandwidth is the problem?
(Just in case, I have not transferred the image to confirm if the image looks okay. Is it possible that 1280x1024 is being "captured" but actually garbled?)
I have just tried config.xclk_freq_hz
at 16MHz, and it makes the MCU fail to detect the camera
Initializing the camera...
Heap: 368271/423603, 270336 max block
PSRAM: 8385720/8388608, 8257536 max block
I (6891) s3 ll_cam: DMA Channel=0
I (6891) cam_hal: cam init ok
I (6901) sccb: pin_sda 40 pin_scl 39
I (6901) sccb: sccb_i2c_port=1
E (6921) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
E (6921) gdma: gdma_disconnect(305): no peripheral is connected to the channel
Camera initialization failed
With xclk at 20MHz, both RGB565 and YUV422 are still failing on 1024x768, succeeding on 1280x1024, failing on 1600x1200. I remember experimenting on 16MHz as well, so this is odd... I'll be experimenting a bit more with the menuconfig options, and update if anything different happens.
This issue appears to be stale. Please close it if its no longer valid.
I still would like to hear the answer...
ESP-IDF version: v6.2, v6.1.3 Board: ESP32S3 Xiao Sense Chip: ESP32-S3
Source code: https://pastebin.com/R87rAp32
When capture succeeds:
When capture fails:
I have changed Default/Maximum Log Verbosity in menuconfig to Verbose. It only increased the amount of log during the boot, but nothing more comes out around the capturing part.
As far as I can tell, multiple modules I own exhibit the same behavior.
Please give me any insights you have. Where in the source code I could take a look, where I could probe more, etc. I could look into the library itself, too. I'd be happy to hear even just "I have no idea".