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

si57x_ctrl: add timeout to busy polling. #63

Merged
merged 1 commit into from
Feb 13, 2025
Merged

si57x_ctrl: add timeout to busy polling. #63

merged 1 commit into from
Feb 13, 2025

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Feb 11, 2025

When the SI57x IC isn't on the I2C bus, I2C transactions might never conclude, leaving the si57x_ctrl core perenially busy. This situation can happen with BPM boards which aren't fitted with digitizer boards on both of its FMC slots.

Since we added the get_busy() function in order to simplify the implementation of still_busy(), we also use it in write_params(), to avoid repetition.

The 2 second timeout was defined by the FPGA core developer, @augustofg.

When the SI57x IC isn't on the I2C bus, I2C transactions might never
conclude, leaving the si57x_ctrl core perenially busy. This situation
can happen with BPM boards which aren't fitted with digitizer boards on
both of its FMC slots.

Since we added the get_busy() function in order to simplify the
implementation of still_busy(), we also use it in write_params(), to
avoid repetition.

The 2 second timeout was defined by the FPGA core developer, @augustofg.
@ericonr
Copy link
Member Author

ericonr commented Feb 11, 2025

Copy link

@ericonr
Copy link
Member Author

ericonr commented Feb 13, 2025

This has now been tested on the homolog crate to not affect normal operation.

The new issue pointed out by SonarCloud is a false positive, since busy is a boolean flag, and not a pseudo-counter.

@ericonr ericonr merged commit e35a47d into master Feb 13, 2025
26 checks passed
@ericonr ericonr deleted the si57x-timeout branch February 13, 2025 14:14
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

Successfully merging this pull request may close these issues.

3 participants