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.

TMS320F28377D: ADC channels is 16 or 24

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

hello,

I am using TMS320F28377D i came across a statement the number of ADC channels in it will be upto 24 in the datasheet can you please let me know if there are 24 ADC channels or only 16 channels.

thanks,

Nagesh

  • Nagesh,

    The number of ADC channels on the F28377D depends on which package you use.  The 337-BGA has 24 ADC channels pinned out.  The 176-QFP has 20 channels pinned out.  This is 12-bit ADC mode.  16-bit mode is about half this, since the inputs become differential.

    See datasheet SPRS880K, Table 3-1.

    Regards,

    David

  • hello David, 

    I went through the document but i am unable to find how to configure all the 24 ADC channels for F28377D, can you please provide me some more information on how to configure or a example code which configures all the 24 channels.

    thanks,

    Nagesh  

  • Hi Nagesh,

    Have a look at the SW examples in c2000ware (you can download it, or go to http://dev.ti.com/tirex/explore/ and look in Software --> C2000ware).

    In particular, have a look at the ePWM driven example:

    \device_support\f2837xd\examples\cpu1\adc_soc_epwm\cpu01\adc_soc_epwm_cpu01.c

    or

    \driverlib\f2837xd\examples\cpu1\adc\adc_ex2_soc_epwm.c

    If you want to add additional channels, you would add additional SOC configurations and potentially additional ADC configurations (since the channels are distributed among 4 ADC modules).

  • hello David, 

    I am using the below code for reading the ADC.

    The below code works only for ADCRESULT0, when i set it to read ADC-A1   i do not see ADCRESULT1 getting updated. can you let me know if the below code is generic or any update is required

    ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA, ADC_CH_ADCIN1, 15);

    C2000ware generic code 

    ADC_setupSOC(uint32_t base, ADC_SOCNumber socNumber, ADC_Trigger trigger,
    ADC_Channel channel, uint32_t sampleWindow)
    {
    uint32_t ctlRegAddr;

    //
    // Check the arguments.
    //
    ASSERT(ADC_isBaseValid(base));
    ASSERT((sampleWindow >= 1U) && (sampleWindow <= 512U));

    //
    // Calculate address for the SOC control register.
    //
    ctlRegAddr = base + ADC_SOCxCTL_OFFSET_BASE + ((uint32_t)socNumber * 2U);

    //
    // Set the configuration of the specified SOC.
    //
    EALLOW;
    HWREG(ctlRegAddr) = ((uint32_t)channel << ADC_SOC0CTL_CHSEL_S) |
    ((uint32_t)trigger << ADC_SOC0CTL_TRIGSEL_S) |
    (sampleWindow - 1U);
    EDIS;
    }

  • Hi Nagesh,

    ADCRESULT0 is associated with SOC0, not channel 0.  You can have the results for any channel go to ADCRESULT0.   

  • Hello David,

    Thank you, i am able to read through 22 ADC channels, can you tell me how to read the result register of ADCIN14 and ADCIN15.

    Regards,

    Nagesh

  • Hi Nagesh,

    You can sample ADCIN14 as ADCINA14 or ADCINB14 or ADCINC14 or ADCIND14 - it is mapped to all ADCs.  Same for ADCIN15.