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.

AM2432: AM2432

Part Number: AM2432

Tool/software:

Hello,

i need to configure an GPIO to activate the trip-zone of the epwm peripheral on the AM2432 processor but i just cant find any documentation or examples on the sdk.

i have done this before on c2000 processor, but it is very different and i would appreciate if you could help in detail on how to do this.

Just for clarification, i need that when an predefined GPIO is change it's state it will trigger an tripzone effect on the epwm ( /* not */ an ISR that enable it by software event!).

thanks

Ofri 

  • Hello Ofri,

    I am looking at your query and you may expect a reply in one or two days.

    Regards,

    Anil.

  • Hello Ofri,

    I have looked at TRM and a datasheet based on my understanding, to enable the tripzone effect on a particular GPIO, we need to follow below steps.

    1. A total of 6 GPIO's can be supported for tripzone triggering events and those pins are captured from the Datasheet.

    I have taken these pins from an AM64X datasheet.

    2. Can you please confirm which pin you want to enable the tripzone event from the 6 pins ?

    3. Now, configuring those pins as tripzone functinality in Sofwtare manually since system cfg does not support this feature.

    So,, manually, we need to configure PAD registers for tripzone operation.

    If you tell me which is the pin you are going to use for your application, then I can try to give a conde snippet for your application.

    4. Next, control which epwm needs to control when a trip signal is generated and choose output action based on your requirement.

    5. If you want to enable an interrupt, you can still enable an interrupt for these tripzone signals.

    6. You need to drive this input by default as high when the signal changes from high to low for 1 IFCLK cycle, then a trip alert will be generated.

    Try with the above method and see you are able receive the trip alert .

    Still if you face any issues then share  details below. I can try at my side and will share code for you .

    You are trying to this requirement on which R5F core ?

    do you need an interrupt or not ?

    Do you need to control which EPWM module ?

    Regards,

    Anil.

  • Hello Anil,

    My ePWM registers are:

    EHRPWM0

    GPMC0_AD3/U20

    GPMC0_AD4/U18

    EHRPWM1

    GPMC0_AD5/U19

    GPMC0_AD6/V20

    EHRPWM2

    GPMC0_AD8/V19

    GPMC0_AD9/T17

    And in that case, the TZ is:

    EPWM0_TRIP_TZ[0]

    EPWM1_TRIP_TZ[0]

    EPWM2_TRIP_TZ[0]

    The control pin (i.e. the one that trigger the action) need to be:

    GPMC0_CSn2/P19

    Thanks,

    Ofri

  • hi, forgot this: 

    You are trying to this requirement on which R5F core ?

    Yes, we use the main cortex R5F (AVL)

    do you need an interrupt or not ?

    and no, we don't need interrupt.

  • Hi Ofri, do you have a project or code you can share? so I can understand what you are trying and the issue.

    From above I understand that you are configuring 3 EPWM, with 3 TZ, and using GPMC0_CSn2/P19 to trigger TZ for all, is my understanding correct?

    Are you using AM243x EVM board or a custom board?

    thank you,

    Paula

  • Hi Ofri, forgot to ask/tell you. In latest MCU SDK 9.2 there is an EPWM Trip Zone example for AM243x-lp. No sure if you have seen it, but if not, you can find it here: 
    mcu_plus_sdk_am243x_09_02_00_50\examples\drivers\epwm\epwm_trip_zone

    AM243x MCU+ SDK: EPWM trip zone (ti.com)

    Thank you,

    Paula

  • Hello Paula,

    From above I understand that you are configuring 3 EPWM, with 3 TZ, and using GPMC0_CSn2/P19 to trigger TZ for all, is my understanding correct?
    Yes, this is what i am try to do. but because i worked with our existing SDK i did not know that you add an example on the last SDK so i cant start to work on this. 

    i have ask for an example to understand how to start. so i hop the example of the 9.02 will help.

    Thanks

    Ofri

  • Thanks, Paula. I also missed the above example in the 09.02 version.

    Ofri, I have looked at the code and the code implemented as per the above shared method.

    You need to change TZ Pin as per your requirement in the examle.

    In your application, you need to configure the TZ pin as GPMC0_CSn2/P19.

    Here we are passing Mux mode 3 value for TZ operations and  you can look at the details of P19 pin on  datasheet.

    I have looked at a datasheet. Here you need to configure mux mode 5 and please look at the code.

    And interrupts are enabled for Trip alert in the example  . So, in your application it does not be needed.

    I hope this example will works for you.

    Please let us know if you still need any help.

    Pinmux_PerCfg_t Trip_zone_Cfg[] =
    {
       /* GPIO0_43 -> GPMC0_CSn2 (P19) */
       {
          PIN_GPMC0_CSN2,
          ( PIN_MODE(5) | PIN_INPUT_ENABLE | PIN_PULL_DISABLE )   },
    
       {PINMUX_END, PINMUX_END}
    };

    Regards,

    Anil.

  • Hello Ofri,

    Do you need any help ?

    Is this issue resolved ?

    Please let us know if you are stuck anywhere.

    Regards,

    Anil.