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.

TMS320F280049C: Issue with trip zone action

Part Number: TMS320F280049C

Hello,

I am using, at least attempting to use, the 280049C to drive a synchronous buck converter.  I would like to use the trip-zones to do peak current control and 0 current detection during DCM. I don't appear to be able to use the trip-zone module to do both peak current control and 0 current detection at the same time. I can get them to work independently but not together. I am using one of the comparator subsystems to measure and compare the current to the internal DAC high and low and have verified the outputs of the comparator subsystem to be functioning properly using the X-bar outputs driving GPIO. I am using the CBC feature being driven from the digital compare module A2 force event and the digital compare 1 force event to detect the 0 current. Both events, TZA and DCBEVT1, are configured to drive their respective pins low at the appropriate times. All other events have been configured to "do nothing, trip action disabled". I have verified this works correctly when only one event is enabled. 

What I believe is happening when both actions are enabled is the do nothing, trip action disabled of TZB is maintaining priority over the DCBEVT1 event. TZB is being set active by the peak current detect CBC latch. I thought that disabling TZB, setting its action to "do nothing, trip action disabled",  would allow DCBEVT1, or 2 if 1 was disabled, to take control of the pin. Is my assumption that setting the action to do nothing should take away priority and allow another event to take action incorrect? If my assumption is wrong, is this the intent of the module or is this a bug?

If this is the intent, or at least current function, of the trip zone action configuration I will stop bashing my head against the wall and figure out another way to do what I need to do. If it is not, I may ask for more help to determine what I am doing wrong. 

Thanks for the help!

  • Hi Michael,

    Just want to let you know I am looking into it and will get back to you soon.

    Regards,
    Chen
  • Hi Michael,

    Thanks for your question. I know you are using CBC for peak current control. Are you also using CBC for 0 current detection at the same time? What EPWM action do you need when you get the DCEVT signal?

    Also for the priority, the answer below should help.

    TZCTL[TZA]/[TZB] are used to control ePWMxA/ePWMxB output actions as a result of a OSHT or CBC trip event. So if any of the bits in TZSEL register are set, then TZA and TZB bits should be used to control the ePWMxA/B actions.
    a. For CBC - the output changes per TZCTL[TZA/B] settings immediately upon detection of event, but output returns back to original state when TBCTR = 0x0000.
    b. For OSHT - the output changes per TZCTL[TZA/B] settings immediately upon detection of event and remains in changed condition until user manually writes clear bit to clear the event.

    TZCTL[DCxEVT1/2] are used to control ePWMxA/ePWMxB output actions upon detection of the DCxEVT1/2 events.
    a. For DC event - the output changes per TZCTL[DCxEVT1/2] settings immediately upon detection of event, and as soon as event condition is gone, the output returns back to original state.
    b. When OSHT or CBC mode is enabled via TZSEL register, the TZCTL[TZA]/[TZB] have higher priority, and so the ePWM module looks to those bits to see what action should occur on a CBC or OSHT basis (that's why the trip zone module didn't perform any action when you set EPwm3Regs.TZCTL.bit.DCAEVT2 = TZ_FORCE_LO - because TZSEL register has bits set to 1, indicating OSHT/CBC action takes precedence- so it instead looks at the TZA/TZB bits).
    c. Therefore, if you want the TZCTL[DCxEVT1/2] actions to apply instead, you can only use these when TZSEL = 0x0000.

    Regards,
    Chen
  • Hi Chen,

    I appreciate you looking into this. My original intent was to use the CBC trip for peak current and the DCEVT for 0 current, DCEVT directly not through the CBC or OSHT. I would have preferred to use CBC for both but because of the ORing of the TZA and TZB source that wasn't an option. 

    I get how the TZ module works, but I appreciate the description you provided. The piece that threw me off was the wording in the TZCTL register for "disabling" the event. The statement "Do nothing, no action is taken on EPWMx[A/B]", made me think the action was bypassed allowing an alternate action to be used, DCEVT[1/2] to control the pin. From your statements and what I was seeing this is not how it works. 

    The fortunate benefit of this is that it caused me to dig in deeper and I realized there are the trip events that feed into the action qualifier module now too. Using the T1/2 events into the action qualifier has actually simplified some things for me and is working well. 

    Thanks you again for your help.

    Thanks,

    Mike