Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera cannot use existing I2C port #718

Open
3 tasks done
s60sc opened this issue Jan 21, 2025 · 0 comments
Open
3 tasks done

Camera cannot use existing I2C port #718

s60sc opened this issue Jan 21, 2025 · 0 comments

Comments

@s60sc
Copy link

s60sc commented Jan 21, 2025

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

camera_probe() in esp_camera.c allows existing I2C port to be used if config->pin_sccb_sda set to -1

    if (config->pin_sccb_sda != -1) {
        ESP_LOGD(TAG, "Initializing SCCB");
        ret = SCCB_Init(config->pin_sccb_sda, config->pin_sccb_scl);
    } else {
        ESP_LOGD(TAG, "Using existing I2C port");
        ret = SCCB_Use_Port(config->sccb_i2c_port);
    }

Actual behavior (suspected bug)

However camera initialisation fails with error 0x102 because:

void *perimanGetPinBus(uint8_t pin, peripheral_bus_type_t type)

expects a uint8_t pin value

[  1222][E][esp32-hal-periman.c:180] perimanGetPinBus(): Invalid pin: 255
[  1222][E][esp32-hal-gpio.c:176] __digitalWrite(): IO 255 is not set as GPIO.
[  1328][E][esp32-hal-periman.c:180] perimanGetPinBus(): Invalid pin: 255
[  1328][E][esp32-hal-gpio.c:176] __digitalWrite(): IO 255 is not set as GPIO.

Error logs or terminal output

Steps to reproduce the behavior

 camera_config_t config;
  config.pin_sccb_sda = -1;

Project release version

arduino core v3.1.1

System architecture

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

Operating system

Windows

Operating system version

Windows 11

Shell

ZSH

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant