+ Reply to Thread
Results 1 to 9 of 9

Thread: Problem with PWM_CCU8

  1. #1

    Problem with PWM_CCU8

    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!

  2. #2

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    689
    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
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    Hi jferreira,
    thank you for the answer. So we wait until the update is available.

    Regards,
    Knecht Patrick

  4. #4
    Beginner Beginner phab is on a distinguished road
    Join Date
    Oct 2017
    Posts
    28
    Points
    183.75
    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
    Last edited by phab; Jan 17th, 2020 at 06:29 AM.

  5. #5
    Beginner Beginner phab is on a distinguished road
    Join Date
    Oct 2017
    Posts
    28
    Points
    183.75
    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/threa..._Stop-function

  6. #6

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    689
    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
    Click image for larger version

Name:	PWM_CCU8_0_Signal_Settings.png
Views:	0
Size:	19.1 KB
ID:	4423

    with the following code
    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
    scope_0.bmp


    XMC14
    scope_1.bmp

    Regards,
    Jesus
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  7. #7
    Beginner Beginner phab is on a distinguished road
    Join Date
    Oct 2017
    Posts
    28
    Points
    183.75
    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


    Click image for larger version

Name:	APP properties.jpg
Views:	0
Size:	58.8 KB
ID:	4431

    Click image for larger version

Name:	General Settings.jpg
Views:	0
Size:	74.7 KB
ID:	4426

    Click image for larger version

Name:	External Event Settings.jpg
Views:	0
Size:	120.4 KB
ID:	4427

    Click image for larger version

Name:	Signal Settings.jpg
Views:	0
Size:	94.2 KB
ID:	4428

    Click image for larger version

Name:	Timer Event Settings.jpg
Views:	0
Size:	35.7 KB
ID:	4429

    Click image for larger version

Name:	Pin Settings.jpg
Views:	0
Size:	67.4 KB
ID:	4430

  8. #8

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    689
    Hi Aaron,

    I cannot reproduce the issue also in XMC4500 using the latest version of the APP
    scope_6.bmp
    See also attached project.

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

    Code:
    /*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
    ?????
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  9. #9
    Beginner Beginner phab is on a distinguished road
    Join Date
    Oct 2017
    Posts
    28
    Points
    183.75
    Thanks Jesus, when I get a minute I'll test it again with my hardware.

+ 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.