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.

TMS320F280049: PWMxA & PWMxB Forcing to Low operation not worked as expected in F280049

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi Team,

  My customer want to using OTSFA/OTSFB of AQSFRC to force PWM5A & PWM5B to low which followed with the PWM5A & PWM5B switch output operation,  but the tested waveform of PWM5A&PWM5B shown as figure 2, which from the test waveform, the forcing to low operation didn’t work as expected but followed up with PWM5A & PWM5B switch succeed and PWM5A with Set/Clear operation.

  The detailed description shown as attached file,F280049 PWM5A&PWM5B Issue.docx

  Could you kindly double check the software configuration and forcing to low operation logic?

  Could you kindly give solutions for the PWM5A&PWM5B forcing to low operation and PWM5A&PWM5B switch operation?

  It's quite urgent, and Expect for your reply, thanks.

 

Best Regards

Benjamin

  • Hi Benjamin,

    A TI engineer has been assigned to help with your issue. The response may be delayed due to the holiday. Thanks for your patience.

    Best regards,
    Chen
  • Hi Chen,
    Very appreciated for your quickly response, this issue should be closed before 3rd, Jan. 2018, and expect for the reply ASAP. thanks.

    Best Regards
    Benjamin
  • Hi Team,
    Any feedback for this post?

    Best Regards
    Benjamin
  • Hi Team,
    Any comments on this post?

    Best Regards
    Benjamin
  • Hi Benjamin,

    I want to clarify the problem shown in your attached document.  I understand the customer is looking to use the AQSFRC to disable the PWM for a period of time.

    In the waveform that you posted from the oscilloscope, is the problem with the waveform that it is HIGH instead of LOW or that you have the pulse before the 83us is reached?

    I think the customer is actually wanting to use the Trip Zone feature here.  The AQSFRC is a one time event which will change the output on the PWM, but if another Action Qualifier event happens it will take effect on the pin.  If the customer wants to truly disable the PWM for a period of time, I believe using the TZFRC register would be a better option.

    Regards,

    Kris

  • Hi Kris,
    The problem is that the 83us High & Low pulse should not shown up in the oscilloscope while using the AQSFRC to disable the PWM but the waveform shown up instead, as there is no AQ event during the 83us(new period value), it should force to low during this period.
    One interesting thing is that this problem is not happened for every AQSFRC operation, but happened sometimes, also tried the same operation with F28066, the AQSFRC force to low worked well.
    For TZFRC, do you mean to use one-shot for this operation?
    Expect for your reply, thanks.

    Best Regards
    Benjamin
  • Benjamin,

    I noticed that that oddity as well. I would need to run some experiments to explain that.

    However, I still think we should steer the customer in the direction of the TZ as this is more what it is designed to do. There are quite a few ways to do this, but here's the general flow I'm thinking of:

    (1) Cause a software one-shot trip via the TZFRC register
    (2) Wait until time to clear the trip / shortly before the clear
    (3) If they need a determined point in the PWM cycle for the trip to be released, they could cause an additional software CBC trip which would result in the PWM resuming at TBCTR = 0
    (4) Clear both trips at the same time

    If the 83us is all the customer cares about and not starting the PWM cycle at TBCTR = 0, then they can skip step 3.

    Regards,
    Kris
  • Hi Kris,
    Could you kindly provide the demo code based on the waveform required in the previous attached file? And also could you kindly help to clarify what's the difference between the F28004x PWM and F28066 oddity PWM which would affect this issue?
    Expect for you reply, thanks.

    Best Regards
    Benjamin
  • Benjamin,

    I want to clarify why there are choosing 83 us. It looks like in the notes they are configured to run at 12 KHz which gives a period of 83 us. Is the end goal for when the trigger comes in to shut the PWM off for the remainder of the period?

    Where is the trigger coming from?

    I'm not sure why this would be behave any different on F28066. How are you sure that there are no action qualifier events during the given time?

    Regards,
    Kris
  • Hi Kris,
    About 83us, this is customer requirement, the period can be changed which just used for shut down the PWM for a period.
    The trigger source is triggered by software;
    The AQ operation only happened in initialization and software force trigger, which can be confirmed no other AQ event during the given time. echo to F28066 description, not happened.
    For this issue's solution, would it be possible to using AQCSFR in immediately mode?

    Expect for your reply, thanks.

    Best Regards
    Benjamin
  • Benjamin,

    This is the perfect scenario for a CBC trip as it can be set to clear at the end of the PWM period regardless of where the trip (hardware or software) comes in. I believe CBC is the best option for your customer and let's steer them in that direction. It is also a better safety option as even if somehow another AQ event takes effect, the PWM output is truly blocked at the pin so it cannot propagate.

    It looks like c2000Ware does not have an example of this. I'll put something together and post it today or tomorrow.

    Regards,
    Kris
  • Hi Benjamin,

    I have attached an example here.  You can drop this into any of the HRPWM projects for F28004x in C2000Ware for it to work.

    The project shows the use of TZFRC to create a CBC interrupt every 3rd PWM period (the example uses the PWM ISR on every 3rd period but the register can be used at any time) which is automatically cleared at the next TBCTR=0.  The comments will have more details, but you can monitor GPIO2 and GPIO11 during the example with a scope.

    Regards,

    Kris

    epwm_cbc_trip.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    //###########################################################################
    //
    // FILE: epwm_trip_zone.c
    //
    // TITLE: ePWM module using Trip-Zone submodule.
    //
    //! \addtogroup cpu01_example_list
    //! <h1> EPWM Trip Zone Module (epwm_trip_zone)</h1>
    //!
    //! This example configures ePWM2 to perform a software cycle-by-cycle trip-zone.
    //! The trip is performed every 3rd PWM cycle in epwm2_isr.
    //!
    //! During the test, monitor ePWM2 and GPIO11 on a scope.
    //!
    //! \b External \b Connections \n
    //! - EPWM2A is on GPIO2
    //! - GPIO11 is the TZ ISR status
    //!//
    //
    //###########################################################################
    // $TI Release: F2837xD Support Library v3.02.00.00 $
    // $Release Date: Jan 23, 2018 15:29:00 CDT 2017 $
    // $Copyright:
    // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
    //
    // Redistribution and use in source and binary forms, with or without
    // modification, are permitted provided that the following conditions
    // are met:
    //
    // Redistributions of source code must retain the above copyright
    // notice, this list of conditions and the following disclaimer.
    //
    // Redistributions in binary form must reproduce the above copyright
    // notice, this list of conditions and the following disclaimer in the
    // documentation and/or other materials provided with the
    // distribution.
    //
    // Neither the name of Texas Instruments Incorporated nor the names of
    // its contributors may be used to endorse or promote products derived
    // from this software without specific prior written permission.
    //
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    // $
    //###########################################################################
    //
    // Included Files
    //
    #include "F28x_Project.h"
    //
    // Globals
    //
    Uint32 EPwm2TZIntCount;
    //
    // Function Prototypes
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX