background image

IMPORTANT NOTICE

The information given in this document shall in no

event be regarded as a guarantee of conditions or

characteristics (“Beschaffenheitsgarantie”) .
With respect to any examples, hints or any typical

values stated herein and/or any information

regarding the application of the product, Infineon

Technologies hereby disclaims any and all

warranties and liabilities of any kind, including

without limitation warranties of non-infringement

of intellectual property rights of any third party.
In addition, any information given in this

document is subject to customer’s compliance

with its obligations stated in this document and

any applicable legal requirements, norms and

standards concerning customer’s products and

any use of the product of Infineon Technologies in

customer’s applications.
The data contained in this document is exclusively

intended for technically trained staff. It is the

responsibility

of

customer’s

technical

departments to evaluate the suitability 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, delivery terms and conditions and

prices please contact your nearest Infineon

Technologies office (

www.infineon.com

).

WARNINGS

Due to technical requirements products may

contain dangerous substances. For information

on the types in question please contact your

nearest Infineon Technologies office.
Except as otherwise explicitly approved by

Infineon Technologies in a written document

signed by authorized representatives of Infineon

Technologies, Infineon Technologies’ products

may not be used in any applications where a

failure of the product or any consequences of the

use thereof can reasonably be expected to result

in personal injury.

Edition 2020-06

Published by

Infineon Technologies AG

81726 Munich, Germany

© 2020 Infineon Technologies AG.

All Rights Reserved.

Do you have a question about this

document?

Email: 

[email protected]

Document reference

GPT12_PWM_Generation_1

_KIT_TC297_TFT

Trademarks

All referenced product or service names and trademarks are the property of their respective owners.

Содержание GPT12 Timer Concatenation 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 GPT12_PWM_Generation_1 for KIT_AURIX_TC297_TFT Generation of PWM via GPT12 Please read the Important Notice and Warnings at the end of this document...

Страница 2: ...ts count direction configured to down counting On underflow of timer T3 the Output Toggle Latch T3OTL is toggled and the value of timer T2 or T4 is transferred into timer T3 depending on T3OTL value T...

Страница 3: ...ure which incorporates several 16 bit timers Block GPT1 contains three timers the core timer T3 and two auxiliary timers T2 and T4 All three timers of block GPT1 can run in one of four modes Timer Mod...

Страница 4: ...rdware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC Step LED D107 1 is used for this example 1 4 2020 06 05 Copyright Infineon Technologies AG 2020 All rights reserv...

Страница 5: ...BPS1 of the divider Configure the frequency for the timer T3 by setting the prescaler value T3I of the divider Configure the timer T3 mode direction and starting value Configure the two auxiliary tim...

Страница 6: ...mer T3 by using the iLLD function IfxGpt12_T3_setMode Set the counting direction of the timer T3 by calling the iLLD function IfxGpt12_T3_setTimerDirection Set the prescaler of timer T3 by calling the...

Страница 7: ...ng the iLLD function IfxGpt12_getModuleFrequency Calculate the timer frequency with the following formula The GPT1 block prescaler is set to IfxGpt12_Gpt1BlockPrescaler_32 is divided by 32 The timer p...

Страница 8: ...g the iLLD functions IfxGpt12_T2_setReloadInputMode and IfxGpt12_T4_setReloadInputMode Set timer T2 value with the iLLD function IfxGpt12_T2_setTimerValue and dutyDownTime as parameter Set timer T4 va...

Страница 9: ...h a pointer to the address of the timer T3 service request the interrupt provider and the interrupt priority number as parameters Enable GPT12 interrupt with the iLLD function IfxSrc_enable and the po...

Страница 10: ...R The ISR implemented in this example calls the iLLD function IfxPort_togglePin to toggle the LED s state The interrupt is triggered every time the timer T3 generates an underflow On underflow of time...

Страница 11: ...n and Test After code compilation and flashing the device observe the LED D107 1 which should be blinking 2 times in a second 1 11 2020 06 05 Copyright Infineon Technologies AG 2020 All rights reserve...

Страница 12: ...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...

Страница 13: ...uct 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 delivery term...

Отзывы: