This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Team!
I'm trying to use an external reference of 2 V with the VREF module and ADC. I'm using example code adc12_single_conversion_vref_external as the starting point.
Software setup:
1) Sysconfig has not be modified:
Vref pin: PA23
ADC0 pin: PA25
Hardware setup:
1) Removed JP4 jumper
2) Removed JP1 jumper
3) Connected 2V into PA23 on Boostpack header J2
4) Connected 1V into PA25 on Boostpack header J1.
I've scoped both inputs to double check there are 2 V coming into the Vref line and 1 V coming into the ADC0 line shown below.
However, both adcresult, and the ADC0_SVT_FIFODATA registers are not reading 1 V.
With 12-bits: the reading should be (1/2)*2^12 = 2048.
I'm not sure if there is a setting in sysconfig or the hardware that is causing the ADC result to be skewed?
Hi Team,
I've figured out the error, this is due to needing to ground Vref- pin PA21 even though Vref- is disabled in sysconfig.
Could this be included in the readme for the example, as that goes through the hardware pin connections?
Hi Nishka,
I am glad you were able to spot the trouble so quickly. Yes, I will file a SDK Jira to get that comment added.