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.

TPS65950 MADC ADCIN3 & ADCIN6

Hi,

I am facing an issue in MADC. I have connected 3 analog voltage signals to ADCIn2,3 & 6 respectively. In that from ADCin2 i can able to read the data, but ADCin 3 & 6 i always Zero.

I have enabled DEFAULT_MADC_CLK_EN  & MADC_HFCLK_EN bits in GPBR1 register and HFCLK_FREQ bit is configured as 0x02 in CFG_BOOT register. Then i tried to enable SEL_MADC_MCPC bit in CARKIT_ANA_CTRL register. But it is not getting enabled.

I tried to enable SEL_MADC_MCPC bit by enablein g & disabling MADC power On/Off option. Iam geting value as zero always in bothe the channels.(ADCIN3 & ADCIN6). I am using RT conversion Method for conversion.

What coBy,uld be wrong in the configuration. My inoput signal range for these two pins are 1.5V Max.

Yuvaraj

  • Hi there,

     

    Before TI gets back to you with a more detailed answer, I recommend having a look at the Beagle board schematics rev C and downloading kernel source code that runs on that revision.  They use ADCIN3 and 5 for device ID or maybe some current sensing or both.  It looks like they input a maximum of 2.27V on the inputs.  You should be able to find useful configuration code in there.

     

     

    Michael

  • Hi Yuvaraj,

    Can you use the procedure in section 9.5.1 of the TRM?

    This will read the RTCH3 LSB and MSB. These register can also be used to read the ADCIN3 conversion. I do not see an error in your procedure.

    Let us see if the RTCH3 returns a good value and we can debug further.

     

    Regards,

    Gandhar.

     

  • Hi Gandhar,

    I am reading RTCH3_LSB, RTCH3_MSB register only. I tried for reading on General Purpose conversion register also, In that also im getting zero's only. My consideration is why that SEL_MADC_MCPC bit is not enabling in CARKIT_ANA_CTRL register. Is there any other registers or bits we need to enable for this.

    Our project is getting very critical, kindly help us.

    V.Yuvaraj

  • Hi,

          When you say that the bit is not getting enabled in the register, do you mean you tried to read the register after writing on it and you still see the bit as "0"? If not, please try reading back to confirm what has been written.

    In-case you are able to read back the value properly, did you write this bit first and then set the MADCON bit to start conversion? I hope the order is not reversed.

    Could you also check Voltage level of VUSB3P1 ? This must be present for the above conversion to work.

    Regards,

    Kartik

  • Hi Kartik,

    Thanks for your reply, my configuration & code flow is like this..

    // MADC Initialisation routine
    1. // Configure HFCLK Frequency as 26MHz.
    2. // Enable MADC HFCLK as 26MHz & Default CLK as 1MHz
    3. // Configure MADC Start conversion line "TPS_START_ADC" as Rising Edge Detection
    4. // Power on MADC Control
    5. // enable ADCIN3,6 as ADC input lines instead fo USB(read carkit_ana_ctrl value, set sel_madc_mcpc bit & read back for write confirmation)
    6. // keep the ADC start conversion pin in low state.
    // MADC Conversion Routine
    1. // Power On MADC Control
    2. // select ADCIN 3/6 for conversion in RTSELECT_LSB & RTSELECT_MSB register
    3. // assert start conversion signal
    4. // wait for 600uSec delay
    5. // deassert start conversion signal
    6. // Read Average Value LSB from RTCH3/6_LSB & MSB from RTCH3/6_MSB
    7. // power off MADC control.

    i have checked VUSB3P1 status, it is in P1 Group on DEV_GRP register , Sleep Mode in REMAP register,  & VUSB3V1_SLEEP bit is set in DEDICTED2 register.

    Anything else is missing in this to configure MADC channel 3 & 6.

  • Hi Yuvaraj,

           Thanks for the steps. They look OK to me. So, as per your previous  replies, you are seeing an issue in step 5 of initialization routine right? You set the set_madc_mcpc bit but when you read back, you read this bit as 0. Is it?

    I am trying to get more detailed info on this , meanwhile, please try this: Replace step 5 of your initialization routine with:

    Write CARKIT_ANA_CTRL_CLR   0x30

    Write CARKIT_ANA_CTRL_SET   0x08

    Write IFC_CTRL_SET                     0x04

    Write CARKIT_CTRL_SET             0x01

    Write CARKIT_ANA_CTRL_SET   0x40

    Also, before executing the above MADC routines, try clearing the bit[3] in DEDICATED2 register. Just to make sure that VUSB3P1 is in ACTIVE state.  I don't think there is an issue with Sleep mode but it will be good to try this.

    Regards,

    Kartik

  • Hi Yuvaraj,

          I have got the details. Your issue should be solved now.

    To access CARKIT register, we need to do a few settings initially. Please follow these steps before executing your MADC routines.

    1) WRITE     VUSB_DEDICATED2     0x00

    2) WRITE     VUSB3V1_DEV_GRP   0xE0

    3) WRITE     VUSB1V5_DEV_GRP   0xE0

    4) WRITE     VUSB1V8_DEV_GRP   0xE0

    The above steps will make sure all the 3 USB LDOs are ON. This ensures that USB registers can be accessed. Now you can execute your MADC routines.

    Let me know if it works.

    Regards,

    Kartik