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

issue#9 - Implementing Variable Pauses After I2C Register Writes in i2c_ctrl Module #29

Open
Juninho99 opened this issue Oct 29, 2024 · 4 comments · Fixed by #30
Open
Assignees
Labels
enhancement New feature or request

Comments

@Juninho99
Copy link
Collaborator

Juninho99 commented Oct 29, 2024

Description:

According to the camera's specification (Sony IMX283), after certain registers are written, there needs to be a pause of a few milliseconds before proceeding to the next set of registers.

Objective:

Modify the existing i2c_ctrl module and i2c_top module to implement variable pauses after specific I2C register writes, as specified by the camera's requirements.

Problem Statement:

The challenge is to introduce variable pauses after writing certain registers, as required by the camera's specification. These pauses are not periodic and occur only after specific registers. The pauses need to be controlled dynamically, allowing for different durations specified in milliseconds.

Proposed Solution:

  • Modify the i2c_init.mem file to include the pause duration for each register write.
  • Update the i2c_data_init array in the i2c_top module to read the pause durations along with register addresses and data.
  • Adjust the i2c_ctrl module to implement a WAIT state that counts the required pause duration using nested counters, avoiding resource-intensive multiplication.
  • Ensure that pauses are dynamically controlled based on the data read from i2c_init.mem.
@Juninho99 Juninho99 linked a pull request Oct 29, 2024 that will close this issue
@Juninho99 Juninho99 added the enhancement New feature or request label Oct 29, 2024
@chili-chips-ba
Copy link
Owner

Differences between 2-lane and 4-lane cameras should not be hard coded in the main RTL body. Instead, they should go into customization package under corresponding branches, based on the single master selector.

image

image

@Juninho99
Copy link
Collaborator Author

You are right. I will make some changes and push them on issue#9 branch. Also I'll make pull request asap.

@Juninho99 Juninho99 self-assigned this Nov 11, 2024
@Juninho99
Copy link
Collaborator Author

The I2C part is fully parameterized and successfully tested on 4-lane sensor. However, we will keep this issue open until we have tested the I2C on both 2-lane sensors.

@Juninho99
Copy link
Collaborator Author

IMX219 is also tested successfully. There is still a webcam left.

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

Successfully merging a pull request may close this issue.

2 participants