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

Sign extend AD4170 data when channels are in bipolar configuration #105

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

machschmitt
Copy link
Contributor

According to reports, "the AD4170 drivers don't do a sign extension when reading the ADC registers, as the ADC is
24 bits, but the int variable is 32-bit, it fills the 4th bit with zeroes even if bit 23 is 1."

The ADC output code is two's complement when the channel setup has the bipolar field configured in the AFE register.
Sign extend ADC data when the channel is in bipolar configuration.

The ADC output code is two's complement when the channel setup has the
bipolar field configured in the AFE register.
Sign extend ADC data when the channel is in bipolar configuration.

Signed-off-by: Marcelo Schmitt <[email protected]>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@machschmitt
Copy link
Contributor Author

Hello @jansunil , can you have a look at this bug fix?
Thanks

@SaikiranGudla SaikiranGudla merged commit 1155e5c into analogdevicesinc:main Nov 22, 2024
28 of 29 checks passed
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.

5 participants