![Infineon TRAVEO T2G family CYT4D Series Скачать руководство пользователя страница 54](http://html1.mh-extra.com/html/infineon/traveo-t2g-family-cyt4d-series/traveo-t2g-family-cyt4d-series_manual_2055097054.webp)
Application Note
54 of 80
002-26071 Rev. *B
2021-09-07
Clock configuration setup in TRAVEO™ T2G family CYT4D series MCUs
Configuring the internal clock
5.9.1
Example of PCLK setting
5.9.1.1
Use case
•
Input clock frequency: 80 MHz
•
Output clock frequency: 2 MHz
•
Divider type: Clock divider 16.0
•
Used divider: Clock divider 16.0#0
•
Peripheral clock output number: 31 (TCPWM0, Group#0, Counter#0)
Start
Divide number = Input freq/output freq
Define PCLK_TCPWMx_CLOCKSx_COUNTER,
Define TCPWM_PERI_CLK_DIVIDER_NO_COUNTER
Set input/output frequency and divide number
End
Configure the Clock Divider 16.0#0
Enable Clock Divider 16.0#0
Assign divider to peripheral
Clock Divider 16.0#0 assign to
TCPWM0 Group#0 Channel#0
Figure 18
Example procedure for setting the PCLK
5.9.1.2
Configuration
lists the functions of the configuration part of in the SDL for the
PCLK (example of the TCPWM timer) settings.
Table 17
List of PCLK (example of the TCPWM timer) parameters
Parameters
Description
Value
PCLK_TCPWMx_CLOCKSx_
COUNTER
PCLK of TCPWM0
PCLK_TCPWM0_CLOCKS0
= 31ul
TCPWM_PERI_CLK_DIVIDER_NO
_COUNTER
Number of dividers to be used
0ul
CY_SYSCLK_DIV_16_BIT
Divider type:
CY_SYSCLK_DIV_8_BIT = 0u, 8 bit divider
CY_SYSCLK_DIV_16_BIT = 1u, 16 bit divider
CY_SYSCLK_DIV_16_5_BIT = 2u, 16.5 bit
fractional divider
CY_SYSCLK_DIV_24_5_BIT = 3u, 24.5 bit
fractional divider
1ul
periFreq
Peripheral clock frequency
80000000ul (80 MHz)
(1)
(4)
(3)
(2)