drivers: analog: include: Update LDO and bandgap calibration values - #136
Open
Prabhakar-Alifsemi wants to merge 1 commit into
Open
drivers: analog: include: Update LDO and bandgap calibration values#136Prabhakar-Alifsemi wants to merge 1 commit into
Prabhakar-Alifsemi wants to merge 1 commit into
Conversation
Prabhakar-Alifsemi
requested review from
RupeshKumar-AlifSemi,
silesh-alifsemi and
sudhir-alifsemi
July 1, 2026 15:07
There was a problem hiding this comment.
Pull request overview
This PR updates analog peripheral LDO and precision bandgap calibration settings (and ensures they are applied when enabling the ADC reference path) to improve ADC accuracy for the temperature sensor use case.
Changes:
- Adjust
ANA_PERIPH_LDO_CONTandANA_PERIPH_BG_CONTcalibration values from0xAto0x8. - Add
ANA_PERIPH_LDO_BG_CONT_VALand apply it during ADC reference enable/disable (including alias mode). - Update alias-mode ADC reference helpers to take
cmp_reg2so LDO/BG calibration can be programmed there as well.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| static inline void enable_adc_ref_voltage(uintptr_t cmp_reg2) | ||
| { | ||
| REG(cmp_reg2) |= ADC_REF_VAL; | ||
| REG(cmp_reg2) |= ADC_REF_VAL | ANA_PERIPH_LDO_BG_CONT_VAL; |
| static inline void enable_adc_ref_voltage_alias_mode(uintptr_t adc_vref_base, uintptr_t cmp_reg2) | ||
| { | ||
| REG(adc_vref_base) |= ADC_REF_VAL; | ||
| REG(cmp_reg2) |= ANA_PERIPH_LDO_BG_CONT_VAL; |
| * @return none | ||
| */ | ||
| static inline void enable_adc_ref_voltage_alias_mode(uintptr_t adc_vref_base) | ||
| static inline void enable_adc_ref_voltage_alias_mode(uintptr_t adc_vref_base, uintptr_t cmp_reg2) |
| * @return none | ||
| */ | ||
| static inline void disable_adc_ref_voltage_alias_mode(uintptr_t adc_vref_base) | ||
| static inline void disable_adc_ref_voltage_alias_mode(uintptr_t adc_vref_base, uintptr_t cmp_reg2) |
Update ANA_PERIPH_LDO_CONT from 0xA (1.80V) to 0x8 (1.76V) and ANA_PERIPH_BG_CONT from 0xA (1.200V) to 0x8 (1.188V) to improve ADC accuracy for the temperature sensor use case. Signed-off-by: Prabhakar Kumar <prabhakar.kumar@alifsemi.com>
Prabhakar-Alifsemi
force-pushed
the
zrtss-855-adc-ldo-bg-correction
branch
from
August 12, 2026 10:01
b77bff7 to
947bc79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update ANA_PERIPH_LDO_CONT from 0xA (1.80V) to 0x8 (1.76V) and ANA_PERIPH_BG_CONT from 0xA (1.200V) to 0x8 (1.188V) to improve ADC accuracy for the temperature sensor use case.