I also got same error when I use the code in Github(https://github.com/moononournation/esp32-cam-demo).
I (19) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
E (696) sccb: i2c write reg=0x28 err=0xffffffff
...
E (25316) sccb: i2c write reg=0xe0 err=0xffffffff
I (25316) camera_demo: Detected OV2640 camera, using JPEG format
E (25326) sccb: i2c write reg=0xff err=0xffffffff
...
E (30566) camera: Failed to set frame size
E (30566) camera_demo: Camera init failed with error 0x20002
When I burn the firmware 'M5Cam v0.02' using the M5Burner, I could revert it to the out-of-box demo.