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.

AM2634-Q1: How to route the EPWMSOC to TZ?

Part Number: AM2634-Q1
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi team, 

I ask this for my customer. In f28x chip, it can connect the EPWMSOC to TZ using EPWMXBAR, but in AM26x, it don't have this route

Now they're migrate the F28x to AM26x, how can they realize this?

I try to route the EPWMSOC to GPIO20(using OUTPUTXBAR) then route the gpio20 to inputxbar and then to EPWMXBAR, but it fails. Once I route the GPIO20 to EPMWXBAR, it will always generate the DCAEVT

Could you give me some suggestion? Customer want use this to close all the EPWM module(EPWM0~EPWM8) and they don't want to add the interrupt and change the hardware(the hardware has already fixed)

BRs

Shuqing

  • Hi Shuqing,

    If I correctly understand basically, you would want EPWM0-EPWM8 to trip based on any a given GPIO20 change in state. Can you please refer to below example in AM263P-SDK?

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM263PX/latest/exports/docs/api_guide_am263px/EXAMPLES_DRIVERS_EPWM_TRIP_ZONE.html

    Here in the above example it basically shows tripping EPWM9_A and EPWM1_A through TZ1 from GPIO11. Please refer to below screenshots for where to look for those details from the Sysconfig in the above example project.

    Please do let me know if you would need any further details.

    Thanks,

    Tejas Kulakarni

  • Hi Shuqing,

    In continuation with our discussion, this is not a straightforward feature to implement. We have seem to have found a workaround. We will test it further and let you know. Please give us 1-2days worth of time.

    Thanks,

    Tejas Kulakarni

  • Hi Shuqing,

    Reposting the answer from our email conversation with our colleague here in this e2e thread for completeness.

    ------------------------------------------------

    There is a way to trip PWMs on CNTZERO event. I have mentioned the programming sequence below:

    • Program PWM0 tripout signal coming onto PWMXBAR to go out of PWMXBAR.
    • Program other EPWMs as below to take PWMXBAR trip as an input.
      • Use DCAHCOMPSEL field in DCTRIPSEL MMR to corresponding tripin value. TRIPIN = PWMXBAROUT[15:1]
      • Use DCAH high to generate DCAEVT1 from TZDCSEL.DCAEVT = 3’b010
      • Select DCAEVT1 as a trip source from TZSEL.DCAEVT1 = 1.
      • Control PWMA output from TZCTL MMR corresponding to DCAEVT1 field.
    • Program XMINMAX MMR of PWM0 with below values
      • XMIN = PRD-1 and XMAX = PRD
    • Enable capture logic in DCCAPCTL of PWM0 by writing  DCCAPCTL.CAPE = 1
    • Enable CAPEVTOST bit in TZSEL2 MMR of PWM0 to generate TRIP signal out of EPWM.
    • Clear CAPEVT signal by writing DCCAPCTL.CAPCLR = 1.

     

    Below is the snippet of capture control logic I followed:

    -------------------------------------------------

    Thanks,

    Tejas Kulakarni