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.

TMSF28335 Connection( Issue with reading ADC values)

Other Parts Discussed in Thread: CONTROLSUITE

I am unable to see the analog values after loading the code on to TMSF28335. It is important to mention that the code is open source and it should work. the title of the code is "ADC_seq_test" which is given by the company itself I believe.So I read the datasheet and I made the connection as followed:

1-Positive supply to (ADCINA6)("please note that I also modified the code for this part. I changed the CONV00=0x6) so that it refer to ADCINA6).

2-ground to ground

3-ADCLO to GND of "ADC".

So here are my questions:

1- if I connect the DSP by using the "connect" option in the "Debug" menu of code composer envirmenet does it mean that the DSP funtionality is fine?

2- Are my connection for ADC reading is proper. because according to datasheet I need to connect the ADC pins that I am not using to (VSS1A GND and VSS2A GND) however I couldn't find those pins and it felt abit awkward to connect the unused pins ADC pins to those two mentioned above.

3- is the GND of ADC pins the same as AGND. Because again according to DATASHEET I need to connect ADCLO to AGND but since I didn't find any pins named "AGND" in the datasheet I coonected it to GND of ADC pins (p9 pins)

4- are my connection mentioned initially sufficient and if not what am I missing.

Thank you so much for spending your time to discuss about this issue and I am waiting for your reply

Regards, Kamyar ]

  • Hi Kamyar,


    I would like you to download controlSuite. This suit contains all example codes with documentation which would help you to kickstart your implementations.

    Also, please refer ADC doc available for F28335 mcu: http://www.ti.com/lit/ug/spru812a/spru812a.pdf

    1- if I connect the DSP by using the "connect" option in the "Debug" menu of code composer envirmenet does it mean that the DSP funtionality is fine?

    Just click on Build option and then click on Debug

    2- Are my connection for ADC reading is proper. because according to datasheet I need to connect the ADC pins that I am not using to (VSS1A GND and VSS2A GND) however I couldn't find those pins and it felt abit awkward to connect the unused pins ADC pins to those two mentioned above.

    Such connections are recommended but for R&D purpose its fine if you keep them floating.

    3- is the GND of ADC pins the same as AGND. Because again according to DATASHEET I need to connect ADCLO to AGND but since I didn't find any pins named "AGND" in the datasheet I coonected it to GND of ADC pins (p9 pins)

    On the experimenter's kit, those GNDs are same. So no problem.

    4- are my connection mentioned initially sufficient and if not what am I missing.

    Please the comment section of the code esp. the initial heading.

    Regards,

    Gautam

  • Hi Gautam,

    Thanks for the reply, I will try it and i will give feedback as soon as I get some results.

    Cheers,

    Kamyar

  • Hello again,

    So I downloaded the software and and to be able to read the adc values in the ("ADC_SOC") file I need to connect the source  pins to pin A2 and A3 , however I want to use A6 and A7. so other than changing the CONV00=0x6 and CON01=0x7, do I need to fix anything else such GIO pins? 

    regards,

    Kamyar

  • Hi Kamyar,

    On F28335, there isn't any muxing on the ADC pins, so you shouldn't have to do anything other than change the channel select.

  • I changed the pin numbers but unfortunately I can't capture anything. In general if I don't connect anything I should be able to see a value other than 0 if I don't connect the ADCLO pin to AGND right? however without even connecting anything I still can't see any values. So I am worried the ADC pins are damaged, because I can generate PWM. So my other question is if    I can connect the DSP by pressing the connect button in the debug menu does it mean that the DSP is not damaged?

    Thanks,

    Kamyar

  • Kamyar,

    I am not sure what will happen if you don't connect ADCLO to AGND.  Quite possibly you will not get any non-zero conversions.

    To get up and running, you should be fine connecting digital ground, analog ground, and ADCLO all together.  Possibly later if you have issues with digital noise coupling between digital ground and the ADC then you might consider separating them.   

  • Hi again,

    Sorry I keep asking the same question again. The problem is I can't capture any values and the code I am using is in the example files and it means it should work. Because  I used these example codes for PWM signal and it worked however as I mentioned I can't capture the ADC values. So what can be the possible problems I appreciate any helps

    regards,

    Kamyar

  • Kamyar,

    You said:

    "I should be able to see a value other than 0 if I don't connect the ADCLO pin to AGND right?"

    I don't think this is true; you need to make sure the ADC is correctly electrically connected (including connecting ADCLO to AGND and AGND to the rest of the board ground) in order to get meaningful conversion results.  It is possible that the software is working correctly, but because the ADC does not have a ground reference then the ADC only produces '0' as a conversion result. 

  • As I mentioned earlier here is how I made the connection:

    ADCLO to GND of ADC

    GND of ADC to the Supply GND

    and INA6 (For example) to the positive supply. 

    So as far as I checked the datasheet i believe there should not be any problem with the connection. So my only concern is that maybe the ADC pin is damaged. Is there anyway to check whether the ADC pin on the kit broken or not? and again thanks for the help

    Kamyar

  • Hello Kamyar,

    From this original ControlSuite example (without ANY modification), what are the values shown in ADC results? (you don't need to connect any ADC pins yet to check this)

    Best regards,

    Maria

  • Kamyar,

    Ok, I think you should be fine as far as ground connections.

    If you want to check if the ADC input is damaged, the best way is usually to check the leakage.  I believe we specify in the datasheet a max leakage current of +/-2uA.  If the ADC input is damaged (from ESD or EOS) then you will typically measure >100uA leakage on the pin.

    Also, what are you using to evaluate ADC operation? Is it a TI supplied EVM, other EVM, or custom board (we may be able to be more specific in debug if we know exactly what board you are using).

  • @ Maria: As i mentioned earlier I am getting  "0" on all result registers.

    @ Devin: to measure the leakage current , should i check the current flowing from ADC pin to GND or from ADC pin to ADCLO? the current flowing from ADC pin to GND is .0001mA (Assuming ADCLO is not connected to GND) and from ADC pin to ADCLO is 21mA. The board I am using to program is in the following link : http://www.ti.com/devnet/docs/catalog/thirdpartydevtoolfolder.tsp?actionPerformed=productFolder&productId=2600

    and in case there is any uncertainty I attached the code with which I want to measure the analog values. So I am not sure what is going wrong . 

    2502.New folder.zip

  • Hello Kamyar,

    Seems that you didn't use the latest version of ControlSuite example.

    The latest version is C:\ti\controlSUITE\device_support\f2833x\v133\DSP2833x_examples_ccsv4\adc_soc

    And there is HISPCP register setting (compared to the previous one) as described below:

    ==================

    .......

    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the DSP2833x_SysCtrl.c file.
       InitSysCtrl();


       EALLOW;
       #if (CPU_FRQ_150MHZ)     // Default - 150 MHz SYSCLKOUT
         #define ADC_MODCLK 0x3 // HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 150/(2*3)   = 25.0 MHz
       #endif
       #if (CPU_FRQ_100MHZ)
         #define ADC_MODCLK 0x2 // HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 100/(2*2)   = 25.0 MHz
       #endif
       EDIS;

       // Define ADCCLK clock frequency ( less than or equal to 25 MHz )
       // Assuming InitSysCtrl() has set SYSCLKOUT to 150 MHz
       EALLOW;
       SysCtrlRegs.HISPCP.all = ADC_MODCLK;
       EDIS;

    // Step 2. Initialize GPIO:
    // This example function is found in the DSP2833x_Gpio.c file and
    // illustrates how to set the GPIO to it's default state.
    // InitGpio();  // Skipped for this example

    .........

    =========================

    Hope this solves your problem.

    Best regards,

    Maria

  • Hello Maria,

    thanks for the help but it still didn't work .

  • @ Devin: to measure the leakage current , should i check the current flowing from ADC pin to GND or from ADC pin to ADCLO? the current flowing from ADC pin to GND is .0001mA (Assuming ADCLO is not connected to GND) and from ADC pin to ADCLO is 21mA. The board I am using to program is in the following  link : http://www.ti.com/devnet/docs/catalog/thirdpartydevtoolfolder.tsp?actionPerformed=productFolder&productId=2600

    and in case there is any uncertainty I attached the code with which I want to measure the analog values. So I am not sure what is going wrong . 

    2502.New folder.zip

    Dear cottier

    can you help me further with the problem please 

  • To measure the leakage, you can:

    put a current meter between the ADC channel and the connected ADCLO/AGND (You should be able to leave these connected). 

    or, force some voltage (referenced to AGND/ADCLO), say 1V, on the ADC channel and simultaneously measure the current flowing in to (or possibly out of) of the ADC channel. 

    I think if you see multiple mA of current going in/out of an ADC input pin at any time, it is likely that that channel has been damaged by ESD or EOS.  

  • Dear Devin,

    So i measured the current while giving 1V through the ADC pin, the current is low when the ADCLO is not connected to AGND, however when I connect the ADCLO to AGND the current goes as high as .8 ampere.so does it mean there is a problem with ADCLO pin?

  • Can you confirm whether the current is 800mA or 800uA?

  • it is 80mA actually . Sorry for the last mistake.

  • Yeah, 80mA probably indicates that the ADC pin is damaged.  Can you try some of the other inputs?

    If it does turn out to be damaged, it looks like the development kit you have is socketed, so it should be easy to swap in a new part.  Make sure to check all the pins/connections to make sure that everything is within recommended operating conditions, fully power down the board, and observe ESD handling precautions when switching the parts.