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.

TMS320F28379D: Sysconfig limited to 4 instances of the ADCs.

Part Number: TMS320F28379D
Other Parts Discussed in Thread: SYSCONFIG

Hi everyone,

I can't add more that 4 ADCs to Sysconfig. Can you help me understand how to add more? 

Help would be appreciated. Thank you.

  • I want to add that Sysconfig gives an error that the base has been duplicated when I use two inputs from the same ADC. I expected the base to stay the same for a particular ADC and the offset denote the different inputs. Sysconfig only address the 4 ADCs and not the many inputs. I can only get 4 inputs and they have to be different ADCs to avoid errors. Why? Please help.

  • Hello Robert,

    The error message should show up where the error is occurring. There are 4 ADCs on the device labeled A, B, C, and D. The error message I assume is talking about how you only have ADC A selected for all 4 ADC configurations:

    All you need to do is make sure a separate ADC instance is chosen for each ADC configuration you have.

  • Hi Omer, I am using more than one ADC. The problem occurs when I try to use, say ADCA pin A0, and ADCA pin A2 at the same time. Sysconfig gives the above error. I think I figured out the answer though. If I cycle through the CHSEL (pins) with an ADC ISR so that the ADC is only using one pin at a time, then it should work. However, I would like to know how to use Sysconfig to set up the pins that I would then cycle through with the ISR.

  • Hi Robert,

    I'm not sure I understand, are you not using multiple SOCs to use multiple pins from the same ADC?

    Sysconfig gives an error that the base has been duplicated when I use two inputs from the same ADC.

    I understood that this error was the one I showed in the screenshot, did I misunderstand? It usually shows as "The ADC Instance used. Duplicates: ADCA_BASE".

    When I add multiple SOCs I don't get an error for when they share pins, it shouldn't do this unless you have other analog pins used in other peripherals. You should be able to sample the same ADC pin from different SOCs too, so I'm not sure why using pins from the same ADC is causing a conflict, can you please show me your ADC configuration?

  • This is one of them. Are you saying that CHSEL is done through the SOC number and not through the pins?

  • Hi Omer, here are the two ADCA that use different pins and different SOCs.

  • Are you saying that CHSEL is done through the SOC number and not through the pins?

    Sorry, to clarify the ADCs on most C2000 devices are SOC-based. What this means is that an ADC is composed of a number of SOCs (in this case 16) each of which can be set up to sample a pin on the corresponding ADC base, such as ADC A. So if you want to use ADC B you need to use a different ADC instance, but this is when you want to use a pin like B0 or B12, just as an example.

    What you have in the SysConfig screenshots is 2 different ADC instances with the same base, which is incorrect. You need to use multiple SOCs for the same ADC base if you want to use the same ADC pins (such as A#). For using ADC B pins you would need to have another instance and then those SOCs would be able to select pins B#. You can still select whichever pins are available on your particular device, but as long as they're under the same ADC base then you will need to use additional SOCs.

  • Hi Omer, thank you for the explanation. My confusion arose from reading that SOCs were for triggering and also for changing result registers (they have the same number). So how does the CHSEL work? Is it determined only by the SOCs? Can you provide an example screenshot of Sysconfig showing your explanation of "You need to use multiple SOCs for the same ADC base if you want to use the same ADC pins (such as A#)." Seeing that will help me understand. Thank you.

  • Hello Robert,

    So how does the CHSEL work? Is it determined only by the SOCs?

    The SOC diagram shows a visual of how the ADC pins are connected with a single ADC (A, B, C, or D). Yes, the CHSEL chooses which ADC pin is connected to the corresponding SOC (0 through 15). For example, ADCSOC0CTL.CHSEL for ADC A will select an analog input pin for SOC0 on ADC A. ADC A through D each have their own 16 SOCs, labeled SOC0 through SOC15.

    Can you provide an example screenshot of Sysconfig showing your explanation of "You need to use multiple SOCs for the same ADC base if you want to use the same ADC pins (such as A#)."

    You can think of it like this for an example of using ADC A:

    Pins A0 through A15 > CHSEL (SOC0 through SOC15) > SOC0 through SOC15

    Unfortunately my screen is not big enough to create a fully screenshot, so I'll attach an example SysConfig file you can import to look at. I configured ADC A and ADC B to use multiple SOCs. ADC A uses A0 for its SOCs and ADC B uses B0 for its SOCs. Let me know if you have more questions, the module channel name and device pin name should provide some detail as to the hardware connections that are being made with the ADC.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/4657.c2000.syscfg

  • Hi Omer,

    Your example shows two ADC instances, ADCA and ADCB, with one input pin each. That would give you a total of 4 inputs if all instances were used. How do you use the other 15 inputs of ADCA if more inputs are needed?

  • How do you use the other 15 inputs of ADCA if more inputs are needed?

    It's not possible to add the other 15 inputs to ADC A after I already have 2 configured. You can have up to 16 configured inputs for an ADC which is determined by your number of SOCs, and each SOC can only choose 1 pin, so you in essence have a limit of 16 inputs for the ADC.

    The 16 inputs for ADC A can all be different ADC A pins, some of them can be the same pin (i.e. SOC0-8 use A0, SOC9-15 use A1), or they can all be the same pin. The use of SOCs makes this flexibility possible.

  • You said:

    "The 16 inputs for ADC A can all be different ADC A pins, some of them can be the same pin (i.e. SOC0-8 use A0, SOC9-15 use A1), or they can all be the same pin."

    How would you add more inputs to ADA A? I can't get that to work. Can you send an example of that?

  • Hello Robert,

    You can add more inputs to the ADC A by adding more SOCs. As I said before, the SOCs determine your inputs to the ADC:

    Keep in mind depending on your device package, some pins may not be readily available (which is why the attached SysConfig file has some warnings).

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/5543.c2000.syscfg

  • Thank you Omer. I have it working now. Thanks for your patience.