Download Print this page
Infineon CCU6 PWM Generation 1 Manual

Infineon CCU6 PWM Generation 1 Manual

Generation of pwm via ccu6, aurix tc2xx microcontroller training
Hide thumbs Also See for CCU6 PWM Generation 1:

Advertisement

Quick Links

CCU6_PWM_Generation_1
Generation of PWM via CCU6
AURIX™ TC2xx Microcontroller Training
V1.0.0
Please read the Important Notice and Warnings at the end of this document

Advertisement

loading

Summary of Contents for Infineon CCU6 PWM Generation 1

  • Page 1 CCU6_PWM_Generation_1 Generation of PWM via CCU6 AURIX™ TC2xx Microcontroller Training V1.0.0 Please read the Important Notice and Warnings at the end of this document...
  • Page 2: Scope Of Work

    (25%, 50% and 75%). T12 is configured to count up and down and the three signals are center aligned. The generated PWM signals are sent to the pins available on the board and can be observed with an oscilloscope. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 3 › Timer 12 (T12) is provided with three comparators. By synchronizing them, up to three synchronized PWM signals can be generated. These signals can be center aligned or edge aligned. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 4: Hardware Setup

    KIT_AURIX_TC297_TFT_BC-Step. Three oscilloscope probes are needed to observe the generated PWM signals. These need to be connected to the three output port pins. Ground Channel 1 Channel 2 Channel 3 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 5 100% Period › When compare value is equal to the period, the duty cycle is equal to 0% Channel 1 duty cycle Channel 2 duty cycle Channel 3 duty cycle 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 6 Interrupts are then re-enabled using the function IfxCpu_restoreInterrupts() at the end of the initialization phase, which also restores the initial state of the interrupts. The above functions are provided by the iLLD header IfxCpu.h. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 7 IfxStdIf_Timer_CountDir_upAndDown in order to enable the generation of center-aligned PWM signals To apply the configuration, the function IfxCcu6_TimerWithTrigger_init() is finally used. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 8 PWM signals is then set with the function IfxCcu6_PwmHl_setMode(), passing the parameter Ifx_Pwm_Mode_centerAligned. It is important to execute the last two instructions in the right order, because the function IfxCcu6_PwmHl_init() always resets the mode to the default value. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 9 IfxCcu6_TimerWithTrigger_applyUpdate(), which enables the transfer of the compare values to the three channels. Finally, the timer and the generation of the PWM signals can be started using the function IfxCcu6_TimerWithTrigger_run(). 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 10 The duty-cycle is inversely proportional to the relative compare value as explained in the previous slide. Therefore, the compare value can be found with: = P – dutycycle = 5000 – 1250 = 3750 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 11 After code compilation and flashing the device, observe the oscilloscope screen. Three center-aligned PWM signals can be observed, with the configured duty cycles and a period of 50 us each. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 12 More code examples can be found on the GIT repository: › https://github.com/Infineon/AURIX_code_examples › For additional trainings, visit our webpage: › https://www.infineon.com/aurix-expert-training › For questions and support, use the AURIX™ Forum: › https://www.infineonforums.com/forums/13-Aurix-Forum 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 13 Infineon Technologies in in personal injury. customer’s applications. The data contained in this document is exclusively intended for technically trained staff.