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

Change register values of ov5640 camera #506

Closed
dume03 opened this issue Feb 13, 2023 · 7 comments
Closed

Change register values of ov5640 camera #506

dume03 opened this issue Feb 13, 2023 · 7 comments

Comments

@dume03
Copy link

dume03 commented Feb 13, 2023

Hi,

Our application requires usage of ESP32 with ov5640 camera. We are using esp32-camera library in our application.

We need to set some registers of ov5640 camera from ESP32. For example, we want to set register 0x3031 of ov5640 to some custom value.
So is it possible to change registers from the library. If possible, then where can we set those values.
We also want to change the values of some other registers from the datasheet of ov5640 as per our requirements.
Please let us know how we can set the custom values of the registers.

@me-no-dev
Copy link
Member

you can use this method to change register values.

sensor_t * s = esp_camera_sensor_get();
s->set_reg(s, reg, mask, value);

@macksal
Copy link

macksal commented Feb 14, 2023

you can also fork the driver and modify ov5640_settings.h if necessary.

@dume03
Copy link
Author

dume03 commented Feb 16, 2023

Hi,
Thanks for the reply.
How do I get the mask value for different registers?
Is there any default value for mask?
Please let me know.

@me-no-dev
Copy link
Member

Mask is used if you want to modify only certain bits of the register. If you give it 0xFF it will change the whole register.

@dume03
Copy link
Author

dume03 commented Feb 21, 2023

Thanks for your response.

We have to set 0x3031 register at 0x08 to bypass the regulator as it is giving reverse current and default value of the register is 0x00.
So as per the set_reg() when we set mask as 0x00 the value set on the register is 0x00(logically) while when we use mask as 0xff then only the register value will be set to 0x08.

Please confirm and if there is an issue in this let me know.

@me-no-dev
Copy link
Member

The mask should be 0xFF if you want to set the value of the whole register. Mask of 0x00 will not change anything

@dume03
Copy link
Author

dume03 commented Feb 21, 2023

Thanks for your reply.
This issue is resolved now.

@dume03 dume03 closed this as completed Feb 21, 2023
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

3 participants