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.

LAUNCHXL-F28027F: Which source file has ADC pin definitions

Part Number: LAUNCHXL-F28027F
Other Parts Discussed in Thread: BOOSTXL-DRV8305EVM, LAUNCHXL-F28027, DRV8305, MOTORWARE

Hi,

I have LAUNCHXL-F28027F plus BOOSTXL-DRV8305EVM and I am trying to locate the initialization of all the ADC pins in adc.h . 

My question is which enum defines the pins that correspond to the table in Launchxl-f28027 c2000 piccolo lauchpad user guide, page 8, table 1,

"C2000 Launchpad Pin Out and Pin Mux Options"

Thanks,

Asha

  • Now I see that you have read page 8 of the guide I suggested in your other post. Let me help clarify things for you

    You'll see from the schematic that certain ADC channels have been broken out to the headers for your use. InstaSPIN uses 7 channels - 3 for current, 3 for phase voltage, and 1 for DC bus voltage. You'll see from the pin-out that there are more than 7 available on the F28027F LaunchPad, so you can use more if you need to. That said, there isn't a way to change a digital I/O pin to an analog pin as you suggested in your previous post.

    If you want to see where the 7 ADC channels are initialized in the InstaSPIN code, you can follow the function calls as such:

    HAL_setParams() -> HAL_setupAdcs(). In the setup ADCs function, the SOC configurations are shown; the default initialization is for ADCINB1/B3/B7/A7/A3/A1. Knowing that, you can select other ADC channels for analog conversion given there are no contentions with the DRV8305 booster pack pin usage.

    Sean
  • Hi Sean,
    Thank you for explaining. I think that I can try using ADCINB2, ADCINA2, ADCINB5, or ADCINA5.

    This helps.

    Thanks,
    Asha
  • Hi Sean,

    I changed code to use ADCINA2 HAL_setupAdcs() (C:\ti\motorware\motorware_1_01_00_17\sw\modules\hal\boards\boostxldrv8305_revA\f28x\f2802x\src\hal.c) by adding below set of files:
    ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_8,ADC_SocChanNumber_A2);
    ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_8,ADC_SocTrigSrc_EPWM1_ADCSOCA);
    ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_8,ADC_SocSampleDelay_7_cycles);

    I do not see this pin being used on DRV8305 booster pack pin. I did notice that this pin can be muxed as ADCINA2/COMP1A/AIO2
    I am looking from the perspective of LAUNCHXL-F28027 hardware schematic -- do I need to do additional configuration?
    Because when we read from this configuration -- the ADC readout value never seems to change.

    Thanks,
    Asha
  • Where are you tapping the pin from? It looks there was no connection made between some pins of the F28027F Launch Pad and the DRV8305 Booster Pack. Can you try feeding the signals directly to the Launch Pad and see if you can detect a signal on the ADC pin that way?

    Sean
  • Hi Sean,
    We did tap just the Launchpad -- and it seems to be wedged at 0.1 and never changes and so it seems that something is holding it up.
    Thanks,
    Asha
  • Hi Sean,
    I selected ADCINB2 which works for me and I will use that.
    Thanks,
    Asha