Changing ADC_SAR_SEQ Vref

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi All,

   

I am using an ADC_SAR_SEQ component on the CYBLE022001 module. I would like to measure two channels having a different Vref value; VDDA for the first channel and internal 1.024 for the second one.  Does anyone know how to change the reference value within the code? I looked for this information in the datasheet and I didn't find it.

   

Thanks in advance,

   

Jurgi

0 Likes
2 Replies
Anonymous
Not applicable

Hi,

   

You can write to registers directly like: 

   

ADC_SAR_SEQ_SAR_CTRL_REG = sarControlReg | ADC_VREF_VDDA;

   

or

   

ADC_SAR_SEQ_SAR_CTRL_REG = sarControlReg | ADC_SAR_SEQ_VREF_INTERNAL1024BYPASSED;

   

However, it is a better practice to use same reference for both the channels and then take care of the calculations manually.

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

Thanks for the answer!!

   

Best regards,

   

Jurgi

0 Likes