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.

UCD3138 LLCHBFirmware-1.2 ADC12 functions enable/disable

Other Parts Discussed in Thread: UCD3138

UCD3138 LLCHBFirmware-1.2 ADC12 functions enable/disable

In init_adc12.c, 32~40

What functions are the following?

 AdcRegs.ADCSEQSEL0.bit.SEQ2  = 12; //TEMP
 AdcRegs.ADCSEQSEL1.bit.SEQ4  = 2;  //ISHARE
 AdcRegs.ADCSEQSEL1.bit.SEQ5  = 5;  //VO OVP
 AdcRegs.ADCSEQSEL1.bit.SEQ6  = 4;  //IPS0
 AdcRegs.ADCSEQSEL1.bit.SEQ7  = 0;  //ADDRESS
 AdcRegs.ADCSEQSEL2.bit.SEQ8 = 15;  //DEVICE TEMP

Can I disable them and let these pins are floating.

  • You can disable them, but you will have to go through and find the code that uses them and disable it too.  If you look at the standard interrupt in poll_
    ADC, you will see the code where those inputs are assigned to variables.  You will have to track down all the places where the variables are used, and deactivate them.  Here is the code:

    //Collect raw ADC values
    adc_values.vo_sense = AdcRegs.ADCRESULT[0].bit.RESULT;
    adc_values.io_sense = AdcRegs.ADCRESULT[1].bit.RESULT;
    adc_values.temp = AdcRegs.ADCRESULT[2].bit.RESULT;
    adc_values.vin_mon = AdcRegs.ADCRESULT[3].bit.RESULT;
    adc_values.ishare = AdcRegs.ADCRESULT[4].bit.RESULT;
    adc_values.vo_ovp = AdcRegs.ADCRESULT[5].bit.RESULT;
    adc_values.ips = AdcRegs.ADCRESULT[6].bit.RESULT;
    adc_values.address = AdcRegs.ADCRESULT[7].bit.RESULT;
    adc_values.device_temp = AdcRegs.ADCRESULT[8].bit.RESULT;

    Note that there is similar code for the average values of the first 6 selections.  You will need to look through the code and find where these are used.  

    I suspect that at least the VO OVP goes to a comparator to cause a fast interrupt and/or a DPWM shut down.  So you also need to look at the datasheet for whatever device you are using and see which of the ADC pins are attached to a comparator and may be enabled to trigger something.  You can find the comparator information in the Fault Mux section of the UCD3138 Technical Reference Manual.