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.

TMS320F28388S: Trigger SPI ADC from ePWM

Part Number: TMS320F28388S
Other Parts Discussed in Thread: ADS8588H, C2000WARE

Tool/software:

I'm using one of the latest versions of C2000 Ware (5.02)  & CCS 12.7.

I need to trigger a SPI connected ADC start of conversion (SOC) via ePWM.

I've looked a many examples that trigger the internal ADC SOC via ePWM.  That seems fairly straightforward.

There is a input on the X-Bar, ADCEXTSOC, but I haven't found a way to use it.  That is to have the ePWM trigger it.

Help Please Slight smile

  • Tim,

    ADCEXTSOC is used for triggering internal ADC's SOC using external signal source which can't be used for triggering external SPI ADC. However, you can use ePWM signal directly to trigger SOC of SPI ADC depends on if that external IC has provision for the same.

    Regards,

    Sumit

  • Sumit,

    Thanks for the response.

    I'm still looking for a long term solution to trigger the External ADC.  I have a very short term solution of having the ePWM generate an interrupt in which I set a GPIO to trigger the external ADC & a Resolver.

  • Tim,

    Yes, you can use ePWM from C2000 devices to trigger external ADC SOC provided that external SPI ADC have provision for accepting external SOC.

    Regards,

    Sumit

  • Sumit,

    Thanks for taking time to respond.

    However, you response doesn't actually contain a solution.

  • Which external SPI ADC IC are you using? Does it have provision to accept external SOC?

    Whether solution is possible or not will be depend on that.

    Regards,

    Sumit

  • Sumit,

    I'm evaluating ADS8588H which has two SOC inputs.

    I've looked looked through the F28388S manual for ePWM information & have not been able to determine how to get the ePWM to generate an external SOC.  So currently, I'm having the ePWM generate an interrupt.  In the ISR I use a GPIO to generate the SOC for the external ADC & Resolver. 

    You hinted at a solution in a prior message.

    The ADC chip I'm using has a pin to externally start a conversion.

     

  • Tim,

    You can refer ADS8588H datasheet to obtain the on/off time of the pulse that is required for SOC. It seems that there are additional signals required apart from SOC. You can refer their timing diagram in 7.4.2.2 Conversion Control and its specifications to treat them as PWM waveform to set CMPA(duty), TBPRD(period) and dead-band (if needed) in ePWM type4 module. You need synchronize these ePWM modules to ensure proper operation of ADS chip with respect to control or any other system dependency. At this point we do not have the ready example for this, but the configuration that you suggested is possible using the process explained above. You can refer C2000Ware - https://www.ti.com/tool/C2000WARE to use our device specific examples on ePWM to generate different types PWM pattern.

    Regards,

    Sumit

  • Sumit,

    Thanks for taking the time to provide a solution.

    Do you know if the code to control the ePWM vs using GPIO is quicker?

  • Tim,

    In my opinion, using ePWM to generate required waveform pattern will provide you deterministic timing response since its hardware peripheral with electric specifications. Once configured ePWM will operate without any software overhead or software flow interruptions and will respect timing constrains that SPI-DAC chip may have. GPIO driven by software are subject to interruptions and because of that timings may not be accurate enough for DAC. 

    Regards,

    Sumit

  • Sumit,

    I mostly agree with you assessment.  There will need to be minimal code to reload ePWM to generate the ADC control waveforms.
    A CLA task could be used to configure the ePWM & sample the external ADC & Resolver.  This would be much more deterministic & would only need to be started by software.

  • Yes - Please refer the c2000 ePWM examples, ePWM Developer Guide and ePWM training video.

    Let us know if you find trouble in configuring ePWM to generate desired waveform.

    Regards,

    Sumit