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

feat: Calibrating Differential Inputs ADC for G4 #3735

Merged

Conversation

IvanLi-CN
Copy link
Contributor

@IvanLi-CN IvanLi-CN commented Jan 7, 2025

This PR introduces a calibration step for the differential mode of the ADC in the STM32G4 series. Previously, the code only calibrated the single-ended mode. I've added the differential mode calibration immediately after the existing one. Although separating the calibration processes into individual functions might be a better approach, I opted to maintain compatibility with the existing code.

The changes have improved the differential ADC error on my STM32G431CBU6, so I believe it should work well. I've attached a screenshot from the reference manual that I used, hoping it will save you some time during the code review.

image

@IvanLi-CN IvanLi-CN changed the title feat: Calibrating Differential ADC for G4 feat: Calibrating Differential Inputs ADC for G4 Jan 7, 2025
Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@Dirbaio Dirbaio added this pull request to the merge queue Jan 7, 2025
Merged via the queue into embassy-rs:main with commit 9237640 Jan 7, 2025
10 checks passed
@IvanLi-CN IvanLi-CN deleted the feat/Calibrating-Differential-ADC-for-G4 branch January 8, 2025 12:43
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.

2 participants