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.

ePWM trigged SOC on F28M6x

Other Parts Discussed in Thread: CONTROLSUITE, DRV8332

Hi,

I have a question regarding the ePWM triggered SOC on the F28M6x. In chapter 11 (ADC) of the TRM it says that only ePWM 1-9 can be used to trigger ADC SOC while it in chapter 7 (ePWM) looks like all channels can trigger SOC. So my question is if I can trigger SOC from ePWM 10-12?

Best Regards,

Johan

  • Hi Johan,

    The simplest way of checking this is by using the auto-complete function.

    for eg. when you'll write : EPwm1Regs.ETSEL.bit.SOCAEN = 1

    in CCS, it would show you what all you can do with " EPwm1Regs.ETSEL.bit.???"

    Similarly, check for ePWM 10-12.

    Regards,

    Gautam

  • Unfortunately I have already had to add some missing code for ePWM modules 10-12 in ControlSUITE (the EPwm10Regs etc. were missing - I assumed the type was the same though). It seems like much of the device support for M36 is a copy of the support for M35 which has only 9 ePWM modules.

    And maybe the case is the same for the trigger selection for ADC SOC. AdcRegs.ADCSOCxCTL.bit.TRIGSEL only has 5 bits according to ControlSUITE, but my question is if this is correct?

  • Hi Johan,

    You are correct, it looks like we need to update the header files for the M36 to add ePWM modules 10-12.  I will have this process started internally.

    Checking the design specs for this device, it does appear that the TRIGSEL field was not expanded to accommodate the additional ePWMs.  Because of this, you will only be able to use ePWM1 through ePWM9 to trigger the ADC.     

  • Thanks Devin!

    I guess the quickest workaround for this absence is to trigger SOC from SW in a PWM compare interrupt?

    The application is servo control with a DRV8332 and I plan to follow the example code and sample the DC bus current in the middle of the PWM pulse...