infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 5 of 5

Thread: Best way to disable PWm output pins

  1. #1
    Beginner Beginner Alberto-g is on a distinguished road
    Join Date
    Oct 2017
    Posts
    15
    Points
    147.5

    Best way to disable PWm output pins

    Hello,
    I'm using the PWM_SVM app and I would like to set the outputs to passive state.
    The app does not seem to support this supposedly easy function.
    Is it necessary to generate a TRAP signal in software? And how to do it?

    Best regards

    Alberto

  2. #2
    Beginner Beginner Tobi is on a distinguished road Tobi's Avatar
    Join Date
    Mar 2018
    Location
    Switzerland
    Posts
    11
    Points
    155
    In the "Manual Pin Allocator" (right click on an App in the App Depedency Tab) You can set the Pins to "Not Selected". Maybe this deactivates the Pins.

  3. #3
    Beginner Beginner Alberto-g is on a distinguished road
    Join Date
    Oct 2017
    Posts
    15
    Points
    147.5
    Thanks, I need to do this by calling a function in my program, for example when an emergency condition arises and power should be cut off..
    Unfortunately it seems I can't get understand the logic behind all of this DAVE thing. I have been using code generators or libraries from other suppliers and found them helpul., DAVE seems to be limited, not so reliable and not flexible.
    Also, Infineon does not seem to care about this forum, many questions never get replied.

  4. #4
    Beginner Beginner andyl is on a distinguished road
    Join Date
    Sep 2015
    Posts
    39
    Points
    206.71875
    I amended the HardFault Handler and the abort()-Function with

    PWM_SetDutyCycle(&M1A, 0);
    PWM_SetDutyCycle(&M1B, 0);
    PWM_SetDutyCycle(&M2A, 0);
    PWM_SetDutyCycle(&M2B, 0);
    PWM_SetDutyCycle(&M3A, 0);
    PWM_SetDutyCycle(&M3B, 0);
    PWM_SetDutyCycle(&M4A, 0);
    PWM_SetDutyCycle(&M4B, 0);
    PWM_SetDutyCycle(&M5A, 0);
    PWM_SetDutyCycle(&M5B, 0);
    PWM_SetDutyCycle(&M6A, 0);
    PWM_SetDutyCycle(&M6B, 0);

    Seems to do the trick, but i concur it's should be an easy hardware function.
    M1A ... are my labels for the PWM instances

  5. #5
    Beginner Beginner Alberto-g is on a distinguished road
    Join Date
    Oct 2017
    Posts
    15
    Points
    147.5
    Thanks, I'm testing something like this, so far so good.
    It works by changing the active state of the Trap pin. Ugly, but it was the quickest way.
    Of course it would be nice if it were possible to change programmatically the default parameters set by the DAVE user interface..
    But you can't, for some reason they are declared const.

    XMC_CCU8_SLICE_EVENT_CONFIG_t Mytrapconfig;

    if (MotorStatus.PWMDisabled) return;
    MotorStatus.PWMDisabled = 1;
    Mytrapconfig.mapped_input = XMC_CCU8_SLICE_INPUT_A;
    Mytrapconfig.edge = XMC_CCU8_SLICE_EVENT_EDGE_SENSITIVITY_NONE;
    Mytrapconfig.level = XMC_CCU8_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_LOW;
    Mytrapconfig.duration = XMC_CCU8_SLICE_EVENT_FILTER_DISABLED;
    XMC_CCU8_SLICE_ConfigureEvent(PWM_SVM_0.phase_ptr[0]->slice_ptr, XMC_CCU8_SLICE_EVENT_2,
    &Mytrapconfig);
    XMC_CCU8_SLICE_ConfigureEvent(PWM_SVM_0.phase_ptr[1]->slice_ptr, XMC_CCU8_SLICE_EVENT_2,
    &Mytrapconfig);
    XMC_CCU8_SLICE_ConfigureEvent(PWM_SVM_0.phase_ptr[2]->slice_ptr, XMC_CCU8_SLICE_EVENT_2,
    &Mytrapconfig);

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.