I tried adding ADCC support to on the adc_ex2_soc_epwm.c I found in MotorControl SDK. I basically just added ADCC alongside ADCA throughout this example.
I am using a DC power supply to input 0-3V into the ADC channels and here were the results.
I multiply the result out of the ADC Result Registers by float_t (66.32)/4096 since 66.32 is my application’s full scale voltage.
DC Input Value |
ADCA |
ADCC |
0 V |
0 |
0 |
1 V |
~20 |
~40 |
2 V |
~40 |
~60 |
3 V |
~60 |
~60 |
In addition, on the 049 LP, I use the VREFHI pin to be my 1.65V. When I plug into my ADCA channel, I get ~2048 which looks fine. When I plug into ADCC channel, I get 4096.
I did a register by register comparison.
Outside of some minor differences of course like, they are practically identical:
- INTSEL, since it only triggers off 1 ADC
- SOCxCTL having different channels
- ADCOFFTRIM/ADCINLTRIM is slightly different, I think that’s to be expected.
I’ve also tried this on 3 049 LaunchPads with the same behavior. Wondering if you’re able to replicate on your side?