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.

LAUNCHXL-F280049C: ADC result with 280049C and instaspin exmaple

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: BOOSTXL-DRV8320RS, C2000WARE

Hi,

I'm trying to porting instaspin examples to my custom board.

The problem is that adc result value is half of real value.

for example, when 24V is appled to custom board, motorVars.dcBus_V is 12.

but when 24V is applied to BOOSTXL-DRV8320RS + launchxl-2880049C motorVars.dcBus_V is 24.

internal and 3,3V references were used.

such as,  ADC_setVREF(obj->adcHandle[2], ADC_REFERENCE_INTERNAL, ADC_REFERENCE_3_3V);

For mesuring dc bus voltage 82K & 4.99K resistor was uesd. that is same to BOOSTXL-DRV8320RS.

When I checked the AdcRusultRegs.ADCRESULTx, it was about 850, But 1700 is correct for 24.

But, sample code for adc in C2000ware is ported to custom board, it works well.

So, I thnk I missed something to change in instaspin example.

What should I do??

- C2000Ware_MotorControl_SDK_2_00_00_00 was used.

- PGA moudule was not used for ADC.

 

thank you.

  • It looks fine, there is no special ADC configuration for InstaSPIN, you have to check the hardware board and ADC configuration code again, make sure that the ADC module and channels are set correctly for sensing voltage. Or you may copy all the ADC configuration codes in the InstaSPIN example project if you are using the same assignment ADC modules and channels.

  • Thank you for your comment.

    I found VREFHIA pin was connected to 3.3V.

    I wonder why the example code was working.

    Because the example code used internal reference for ADC. 

    Anyway I can solve my problem.

    Thank you.