Configuration workflow
The typical workflow of the GTM configuration tool starts with the configuration of the Cluster Clock Management Unit (CCM). The following configuration options are available for CCM:
- Enablement of all the clusters.
- Division of the input clock source.
- Independent unit enablement.
The Cluster Configuration Module (CCM) is responsible for configuring the units available in each cluster, as well as providing a configurable clock signal to each enabled unit.
The CMU (Cluster Management Unit) is present only in cluster 0, but the said cluster ensures that all enabled units have access to the enabled signals.
CCM can be used to enable/disable unused units and even configure used clock signals for the units that require them. The user can decide which clusters should be in use. All unused clusters can be directly disabled within the tool from the 'Cluster Clock Management Unit' section. Additionally, we can also disable the unused units of clusters in use from the 'Cluster Control Management' section of the 'Cluster Clock Management Unit'. Each individual clock source CCM CLK RES from 'Cluster Clock Management Unit' section can be switched between TIM External Capture, CMU Clock resolution 8, or mapped with CMU clock sources. CMU Clock 8 is a clock source by default enabled and can be switched between GTM global clock and external clock.
|
The next step is to configure the CMU according to the requirements. The following configuration options are available for CMU:
- Custom division ratio can be achieved via the nominator/denominator settings.
- Enablement of all the CMU channels.
- Enablement of the CMU fixed clock source.
- Custom divider for each CMU channel.
The global clock source of the CMU is the cluster 0 clock, configured in the previous step via the Cluster Clock Management Unit. The frequency of the CMU global clock can be configured by changing the Global Clock Numerator and Denominator fields.
The input clock source of the CMU is divided by the following ratio:
![]()
The ratio of these two fields must be a number in the interval (0, 1], otherwise a problem would be signaled.
Channels 0-7 of the CMU can be enabled and used as a fixed clock source or as an input clock source for the ATOM channels. The CMU FX (fixed) clock source can be enabled and used as a source for the TOM channels. The fixed clock source is set by default to the CMU global clock frequency and can be changed to any of the enabled CMU channels. Additionally, the CMU channels’ output frequency can be changed by changing the value of the Clock Divider Count.
The equation used to determine the output frequency of a CMU channel is the following:
![]()
The architecture of the CMU offers 24-bit width registers for Global Clock Numerator, Denominator and individual clock divider counts with a maximum value of: 224 – 1.
|
After both CCM and CMU have been configured, the ATOM or the TOM configurations will be available.
The following configuration options are available for ATOM:
- Clock source setting to any enabled CMU channel.
- Working mode.
- Trigger command.
- Counting mode.
- Signal polarity.
- Update mode.
- Period, duty cycle and timer counter ticks (offset/deadtime).
The GTM IP has 3 ATOM modules, each of them with 8 channels. The first configuration step is to select an ATOM module and enable one of the channels. The clock source of the channel can be set to any available CMU clock source.
Currently, only for SOMP working mode is supported in the PWM driver, the rest of the modes will be added in future work.
By setting the trigger command to Trigger OUT, an ATOM channel can be used internally to trigger the next channel in a cascading manner. If the trigger command is set to Reset on Trigger, the ATOM channel’s PWM signal is influenced by the signal of previous channels. In this way, the ATOM channels can be used to generate synchronized signals. An ATOM channel can be used to output its PWM signal by setting the channel output combo-box. Trigger command is currently not supported by the PWM driver and will be added.
The Counting Mode offers flexibility in setting the PWM generating mode: Centered-aligned (Up-Down counting) and Edge-aligned (Up counting).
The signal polarity of the ATOM channel can be set to HIGH/LOW. Together with the duty cycle and period options, the waveform of the ATOM channel can be easily configured.
The update mode is set by default to synchronous mode, as the PWM driver currently does not support async mode.
The period and duty cycle can be set via the available text boxes. The ratio between the period and the duty cycle should be a maximum of 1, otherwise a problem would occur. The counter offset is currently not supported driver-wise and will be added in future releases.
The output frequency information depends on the selected counting mode and period value. For counting mode UP, output frequency is calculated as input frequency divided to period value. For other counting modes the formula uses double the period. Output period depends on output frequency.
The architecture of the ATOM offers 24-bit width registers. For this reason, the maximum value for the period, duty cycle and counter ticks is equal to: 224 – 1.
More information about the ATOM configuration can be found in the in-tool documentation and use-cases, any of which represent a good starting point for development.
|
The following configuration options are available for TOM:
- Clock source setting to the CMU fixed clock source.
- Update mode.
- Counting mode.
- Signal Polarity.
- Trigger Command.
- Period, duty cycle and counter ticks.
The GTM IP has 2 TOM modules, each of them with 16 channels. The first configuration step is to select a TOM module and enable one of the channels. The clock source of the channel is set to the CMU fixed clock source. By design, the fixed clock source can be divided by 1, 16, 256, 4096 or 65536, offering some flexibility to the input clock frequency of the TOM channels. The architecture of the TOM offers 16-bit width registers. For this reason, the maximum value for the period, duty cycle and counter ticks is equal to: 216 – 1.
The rest of the configuration options have the same limitations and yield the same behavior as the ATOM.
|
The following configuration options are available for TIM:
- Measurement Mode.
- Input Selection.
- General Purpose Registers 0 and 1.
- Input Level.
- Clock source.
The TIM can be used to measure the period and duty cycle of internal signals or incoming external signals fed into the GTM input port currently using ICU Edge Counter as measurement modes.
The GTM IP has 3 TIM modules, each of them with 8 channels. The first configuration step is to select a TIM module and enable one of the channels. The clock source of the channel is set by default to CMU Clock not used as TIM module currently does not support any other clock source being supported only ICU Edge Counting.
TIM offers support for ICU(Input Capture Unit) driver which means the measurement mode offers the possibility to choose between ICU Edge Counter and ICU Signal Edge Counter.
The General Purpose Registers 0 and 1 should be set to the internal counter register, TIM channel CNT and its shadow register TIM channel CNTS, as time resolution reference.
The input selection source is set by default to Use TIM channel, as the ICU driver currently does not support internal auxiliary signals.
Depending the desired edge for measurement, the Input Level can be set to HIGH/LOW or there is the possibility to choose that the bits are not modified.
|
The following configuration options are available for TBU:
- Clock Source
- Register Resolution
- Base
The Time Base Unit (TBU) provides common time bases for the GTM−IP. The TBU submodule is organized in channels, where the number of channels is device dependent. There are up to three channels implemented inside the TBU, fourth channel currently not available.
The time base values are generated within the TBU time base channels in two independent modes: Free Running Counter and Forward/Backward Counter modes.
TBU channel 0 provides a 27−bit counter in a free running counter mode: depending on the register resolution selection the lower 24 bits or the upper 24 bits are provided to the GTM submodules.
TBU channel 1 and channel 2 provides a 24−bit counter in a free running counter mode and a 24−bit forward/backward counter given by the mode selection. The Time Base of TBU channel 0 is 27 bits wide and it is configurable whether the lower 24 bits or the upper 24 bits are provided to the GTM. The two TBU channels 1 and channel 2 have a time base register of 24−bit length.
|