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.

TMS320F28075: ADCSOCAO from Multiple EPWMs' SOCs?

Part Number: TMS320F28075

Hi, Champs,

My customer is using F28075 and there's a question on ADC and EPWM SOCs with ADCSOCAO via X-BAR.

What my customer wants is simply to trigger multiples EPWM SOCs to form a single SOC to get ADC sampling work, since he doesn't want to change SOC source select in real-time but he wants to trigger multiple sampling points within 1 EPWM period.

The solution we think about is to leverage ADCSOCAO in X-BAR, which can be output to a GPIO via OUTPUT X-BAR and then be picked up by INPUT X-BAR, thus the ADC trigger source can be selected as GPIO, ADCEXTSOC with value of 0x4 in TRIGSEL bit.

Question is, can we enable multiple SOC sources in the ADCSOCOUTSELECT register to support this function? e.g. if bits PWM1SOCAEN, PWM1SOCBEN, PWM2SOCAEN and PWM2SOCBEN are set to 1 simultaneously then can we get a single SOC worked as a combination of those 4 trigger sources?

Best Regards,

Ricky Zhang

  • Hi Ricky,

    Usually when we talk about doing something similar, the method would be to sync a spare ePWM module with the main ePWM module and then have the sync'ed ePWM run say 4x faster than the main module if you wanted to get 4 samples spaced throughout the ePWM period. However, this will only get you evenly spaced samples.

    I do think that the ADCSOCOUTSELECT bits are an OR of all the sources (documentation is not clear on this), so this method would also probably work. My only concern would be jitter in when the trigger is received due to the aysnc. nature of the trigger path.

    Any reason that all triggers have to be the same? There should be plenty of spare/redundant SOCs that can be used to sample the same channels based on different trigger sources?
  • Devin,

    Sorry for late feedback but I just got customer's confirmation that this issue was addressed.

    Your suggestion to run a 4x faster spare EPWM as trigger source might not be applicable in this case, just as you mentioned that the samples will be evenly spaced which is not the use case in customer system, however, this is my fault to miss providing further background.

    Customer actually wants to sample totally up to 50+ signals with 3 ADCs where only 17 channels and 48 SOCs are available, thus they will divide those signals into 4 groups with multiple external 1:8 and 1:4 mux, which will be switched by GPIO for the input signals, like below picture shows. Fortunately SA1 and SA2 will sample exactly identical signals and so do SB1 and SB2.

    With that background and your suggestion, I came out a new solution, that is to run a 2x faster auxiliary EPWM12 as trigger source using CMPC and CMPD to generate SOCA and SOCB signals for sampling, while using EPWM1A to switch the mux by hardware.

    Customer then evaluated and verified in their system and prove to be worked.

    Thanks for your idea and now let's get this post closed.

    Best Regards,

    Ricky Zhang