May 03, 2018
03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 03, 2018
03:12 AM
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
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
- Tags:
- IFX
4 Replies
May 04, 2018
12:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 04, 2018
12:15 AM
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.
May 07, 2018
06:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 07, 2018
06:31 AM
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.
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.
May 08, 2018
12:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2018
12:35 AM
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
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
May 08, 2018
05:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2018
05:30 AM
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);
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);