Skip to content

drivers: analog: include: Update LDO and bandgap calibration values - #136

Open
Prabhakar-Alifsemi wants to merge 1 commit into
alifsemi:mainfrom
Prabhakar-Alifsemi:zrtss-855-adc-ldo-bg-correction
Open

drivers: analog: include: Update LDO and bandgap calibration values#136
Prabhakar-Alifsemi wants to merge 1 commit into
alifsemi:mainfrom
Prabhakar-Alifsemi:zrtss-855-adc-ldo-bg-correction

Conversation

@Prabhakar-Alifsemi

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_CONT and ANA_PERIPH_BG_CONT calibration values from 0xA to 0x8.
  • Add ANA_PERIPH_LDO_BG_CONT_VAL and apply it during ADC reference enable/disable (including alias mode).
  • Update alias-mode ADC reference helpers to take cmp_reg2 so LDO/BG calibration can be programmed there as well.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread drivers/analog/include/analog_ctrl.h Outdated
Comment thread drivers/analog/include/analog_ctrl.h Outdated
Comment thread drivers/analog/include/analog_ctrl.h Outdated
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;
Comment thread drivers/analog/include/analog_ctrl.h Outdated
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
Prabhakar-Alifsemi force-pushed the zrtss-855-adc-ldo-bg-correction branch from b77bff7 to 947bc79 Compare August 12, 2026 10:01
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