Skip to content

SCCB W/R failed initially and still capture image after waiting a while. #743

Open
@ToTom818

Description

@ToTom818

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

I am using the provided example codes and without much modification. So it should function directly out of the box. fyi i am using ov2640 and esp-idf 5.4.1

Actual behavior (suspected bug)

the i2c initially fail to communicate with the camera but later camera initialized successfully.

Error logs or terminal output

I (1086) gpio: GPIO[40]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
D (2692) gdma: new group (0) at 0x3fc9b350
D (2692) gdma: new pair (0,0) at 0x3fc9af68
D (2692) gdma: new rx channel (0,0) at 0x3fc9b314
I (2692) s3 ll_cam: DMA Channel=0
I (2695) cam_hal: cam init ok
D (2698) camera: Initializing SCCB
I (2701) sccb: pin_sda 38 pin_scl 39
I (2704) sccb: sccb_i2c_port=1
D (2707) intr_alloc: Connected src 43 to int 5 (cpu 0)
D (2712) camera: Resetting camera
I (2715) gpio: GPIO[40]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
D (2743) camera: Searching for camera address
I (2753) camera: Detected camera at address=0x30
I (2756) camera: Detected OV2640 camera
D (2756) ov2640: OV2640 Attached
I (2756) camera: Camera PID=0x26 VER=0x42 MIDL=0x7f MIDH=0xa2
D (2758) camera: Doing SW reset of sensor
I (2838) s3 ll_cam: node_size: 3840, nodes_per_line: 1, lines_per_node: 6
I (2838) s3 ll_cam: dma_half_buffer_min:  3840, dma_half_buffer: 15360, lines_per_half_buffer: 24, dma_buffer_size: 30720
I (2844) cam_hal: buffer_size: 30720, half_buffer_size: 15360, node_buffer_size: 3840, node_cnt: 8, total_cnt: 10
I (2854) cam_hal: Allocating 153600 Byte frame buffer in OnBoard RAM
D (2860) intr_alloc: Connected src 66 to int 8 (cpu 0)
D (2865) intr_alloc: Connected src 24 to int 8 (cpu 0)
I (2870) cam_hal: cam config ok
D (2872) camera: Setting frame size to 320x240
I (2877) ov2640: Set PLL: clk_2x: 1, clk_div: 3, pclk_auto: 1, pclk_div: 8
E (2923) sccb: SCCB_Write Failed addr:0x30, reg:0xe0, data:0x04, ret:-1
E (2923) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
E (2924) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:-1
E (2931) sccb: SCCB_Write Failed addr:0x30, reg:0x87, data:0xff, ret:-1
E (2937) sccb: SCCB_Write Failed addr:0x30, reg:0xc3, data:0xff, ret:-1
E (2943) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
E (2950) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:-1
E (2956) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
E (2962) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:-1
E (2968) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
E (2974) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:-1
E (2981) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
E (2987) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:-1
E (2994) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
E (3000) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:-1
E (3006) sccb: SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
I (3212) example:take_picture: Camera initialized successfully
I (3212) example:take_picture: Taking picture...
I (3350) example:take_picture: Picture taken! Its size was: 153600 bytes
I (3450) example:take_picture: Taking picture...

Steps to reproduce the behavior

idf.py create-project-from-example "espressif/esp32-camera:camera_example"
set the pinout
set to use onboard dram
build and flash

Project release version

latest

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Windows

Operating system version

win11

Shell

ZSH

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions