Problem with PWM_CCU8

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

for a H-Bridge i use the PWM_CCU8 app. Everything works perfect until I want to have a freerunning motor. In case of any error (overvoltage, desaturation detection) I stopped the pwm (PWM_CCU8_Stop) and I was in the meaning that the motor is in freerunning, but it isn't the case.
How can I resolve this Problem and switch of all mosfets in the H-Bridge?
Thanks a lot for your help!
0 Likes
9 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

We have recently identified and fixed an issue in the PWM_CCUx APPs regarding the Stop function, e.g. the STx outputs are not reset.
An update of the APPs is planned for end of the month.

Regards,
Jesus
0 Likes
Not applicable
Hi jferreira,
thank you for the answer. So we wait until the update is available.

Regards,
Knecht Patrick
0 Likes
User13960
Level 3
Level 3
First like received
Hi Jesus,

Has an update of the APP been released ?

I am using version 4.1.26 and I have a problem. When I call "PWM_CCU8_Stop" my channel 1 Inverted Output remains HIGH even though I have set the 'Passive level' to LOW.

Thank you very much
Aaron
0 Likes
User13960
Level 3
Level 3
First like received
Hi All,

I didn't have time to wait around for a solution from Infineon so I've created my own workaround. Unfortunately this seems to be a recurring issue with Infineon. The XMC hardware is first class but the libraries and supporting documentation are pretty average.

Anyway please refer to the following link....

https://www.infineonforums.com/threads/10893-Bug-Undefine-behaviour-in-the-PWM_CCU8-PWM_CCU8_Stop-fu...
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The issue you mention should have been fixed in v4.1.26.
I tested it with the latest version with XMC14 and XMC47 and I can not reproduce your issue.
I use the following configuration
4000.attach

with the following code

PWM_CCU8_Start(&PWM_CCU8_0);

while(1U)
{
if (XMC_GPIO_GetInput(PWM_CCU8_0.config_ptr->gpio_ch1_out0_ptr, PWM_CCU8_0.config_ptr->gpio_ch1_out0_pin))
{
DIGITAL_IO_SetOutputHigh(&DEBUG_IO);
PWM_CCU8_Stop(&PWM_CCU8_0);
}
}



These are the pictures of the oscilloscope (green is direct channel, yellow is inverted channel and blue is a debug io used for triggering)

XMC47



XMC14


Regards,
Jesus
0 Likes
User13960
Level 3
Level 3
First like received
Hi Jesus,

Thank you for looking at this. Version v4.1.26.does not work with my hardware and APP configuration. My channel 1 Inverted Output remains HIGH even though I have set the 'Passive level' to LOW.

I am using the XMC4500 and below are the APP configuration screens. One possible difference is the APP does not start during initialisation, I use the 'PWM_CCU8_Start' function.

Best regards
Aaron


4001.attach

4002.attach

4003.attach

4004.attach

3106.attach

3063.attach
0 Likes
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi Aaron,

I cannot reproduce the issue also in XMC4500 using the latest version of the APP

See also attached project.

The issue was fixed by removing the call to disable the slice clock.

/*Stops the CCU8_CC8 slice. */
PWM_CCU8_STATUS_t PWM_CCU8_Stop(PWM_CCU8_t* handle_ptr)
{
PWM_CCU8_STATUS_t status;

status = PWM_CCU8_STATUS_FAILURE;
XMC_ASSERT("PWM_CCU8_Stop:handle_ptr NULL", (handle_ptr != NULL));
if (PWM_CCU8_STATE_UNINITIALIZED != handle_ptr->state)
{
XMC_CCU8_SLICE_StopTimer(handle_ptr->ccu8_slice_ptr);
XMC_CCU8_SLICE_ClearTimer(handle_ptr->ccu8_slice_ptr);
XMC_CCU8_DisableClock(handle_ptr->ccu8_module_ptr, handle_ptr->slice_number);

handle_ptr->state = PWM_CCU8_STATE_STOPPED;
status = PWM_CCU8_STATUS_SUCCESS;
XMC_DEBUG("PWM_CCU8_Stop:stop PWM");
}
return (status);

} /* end of PWM_CCU8_Stop() api */


Regards,
Jesus
0 Likes
User13960
Level 3
Level 3
First like received
Thanks Jesus, when I get a minute I'll test it again with my hardware.
0 Likes
lock attach
Attachments are accessible only for community members.
User13960
Level 3
Level 3
First like received
Hi Jesus,

The attached project should replicate the problem.

In "Main.c" I am calling "My_PWM_CCU8_Stop". If you replace this with the standard Infineon function "PWM_CCU8_Stop" you should find that one of the PWM outputs remains high.

Thank you very much

PHAB
0 Likes