Infineon PWM Buzzer 1 Скачать руководство пользователя страница 1

AURIX™ TC2xx Microcontroller Training
V1.0.0

PWM_Buzzer_1

PWM controlled melody on Buzzer

Please read the Important Notice and Warnings at the end of this document

Содержание PWM Buzzer 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 PWM_Buzzer_1 PWM controlled melody on Buzzer Please read the Important Notice and Warnings at the end of this document...

Страница 2: ...ed song with a piezo buzzer The generated PWM Pulse Width Modulation signal is controlled by timer TOM1 of the GTM block The signal drives the piezo buzzer via the pin 0 of the port 33 2 2019 10 17 Co...

Страница 3: ...part of the GTM offers sixteen independent channels to generate output signals The Clock Management Unit CMU is responsible for clock generation of the GTM The Fixed Clock Generation FXU subunit of th...

Страница 4: ...re setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC Step The piezo buzzer 1 is used for this example 1 4 2019 10 17 Copyright Infineon Technologies AG 2019 All rights re...

Страница 5: ...g the function IfxGtm_Cmu_enableClocks Initialize the timer configuration with default values by calling the function IfxGtm_Tom_Timer_initConfig Set the timer configuration variable timerCfg with the...

Страница 6: ...hannel used for the timer timerCfg timerChannel IfxGtm_Tom_Ch_4 Select the clock source timerCfg clock IfxGtm_Tom_Ch_ClkSrc_cmuFxclk2 Set port and pin for PWM output timerCfg triggerOut IfxGtm_TOM1_4_...

Страница 7: ...calling the function setVolume This is done by setting the PWM duty cycle with the function IfxGtm_Tom_Timer_setTrigger 3 Start the timer with the iLLD function IfxGtm_Tom_Timer_run 4 Wait until the e...

Страница 8: ...d Test After code compilation and flashing the device listen to the Buzzer 1 which should play the sound from the game Super Mario 1 8 2019 10 17 Copyright Infineon Technologies AG 2019 All rights res...

Страница 9: ...www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questi...

Страница 10: ...of the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology d...

Отзывы: