How to use MPC574xR tool to easily calculate device frequency domains
Rev. 5 — October 2018
by:NXP Semiconductors
Contents
1 Introduction
NXP’s MPC574xR is a dual-core 32-bit microcontroller intended for scalable
engine control and powertrain applications. This application note will refer to
any device in the MPC574xR family, MPC5743R, MPC5745R, and MPC5746R,
as simply “MPC5746R.”
The MPC5746R supports an 8-40 MHz external oscillator (XOSC), a 16 MHz
internal RC oscillator (IRCOSC), and two phase locked loops (PLL) for a
maximum operating frequency of 200 MHz. The IRCOSC is selected out of
reset so increasing the operating frequency from 16 MHz requires additional
configuration. The MPC574xR Clock Calculator is meant to complement the
reference manual. It seeks to simplify the clock configuration process by providing a graphical, interactive tool to help the user
find the correct register settings in order to achieve the desired clock frequencies.
Accompanying this application note is the clock calculator. You can download it from MPC574xR_Clock_Calculator.
The clock calculator makes use of macros to perform functions like resetting the spreadsheet to initial values, configuring all clock
frequencies to the maximum allowable settings, and copying generated code. Macros must be enabled in the user’s MS Excel to
access these features. If macros are turned off, however, the tool will still be able to calculate clock frequencies, but the
aforementioned features will be disabled. To turn on macros in MS Excel 2016, go to the Developer tab on the top toolbar and
click on Macro Security. A popup window will appear, select Enable all macros.
The MPC574xR clock calculator takes the form of an interactive Microsoft Excel spreadsheet organized into multiple tabs as shown
in the following figure.
NXP Semiconductors
Clock calculator design
Figure 2. MPC574xR Clock calculator setup
Clock sources (e.g. oscillators and PLLs) propagate to the various clock domains from which the MCU modules take their clocks.
Most cells representing clock domain frequencies are not to be modified manually. The user is meant to enter frequencies to the
few select clock sources and all clock domain frequencies derive from these sources. Several clock domain inputs are meant to
be modified manually as they represent external clocks that are driven into a pin. There are also input cells that set muxes and
clock dividers. All cells that take entries have blue borders instead of black, as shown in the figure below.
Figure 3. Input cells vs. Output cells
There are limits to what frequencies can be entered to the input frequency cells. Values that are out of range will be rejected and
the user will receive an error message. Invalid clock domain frequencies that arise from valid input values and legal, but improper,
dividers will be shaded in red, as will be explained in greater depth later in this application note.
Frequency values are linked across tabs, so PER_CLK in the Tree tab will always be the same as PER_CLK in the PeripheralDomains tab. Hyperlinks are provided to duplicate domain names to link back to their points of origin. For example, PER_CLK
originates in Tree. So clicking the PER_CLK textbox in Peripheral Domains will take the user to PER_CLK in Tree. Textboxes that
are links, when hovered over, will cause the mouse cursor to turn into a hand icon and a pop-up to appear, showing the address
of the destination, as shown in the following figure.
Application Note
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
2 / 28
NXP Semiconductors
Clock calculator design
Figure 4. Clicking on a link
The following subsections will explain in depth the purpose of each tab.
2.1
Tree
is the centerpiece of the tool. This tab is the starting point for all clock frequency calculations. It is organized to resemble the
Tree
MPC5746R clock tree as presented in the following figure.
Application Note
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
3 / 28
NXP Semiconductors
Clock calculator design
Figure 5. MPC5746R reference manual clock tree
The following figure shows, in part, the diagram’s clock tool counterpart. The difference between the two is that the latter is
interactive.
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
Application Note
4 / 28
NXP Semiconductors
Clock calculator design
Figure 6. Clock calculator tree
The flow of the diagram generally goes from left to right. On the left are the MPC5746R clock sources and on the right are the
clock domains. MCU modules run on one or more of these clock domains.
Clock domain frequency values are displayed in the outlined cells next to their labels. Most cells are not meant to be written to;
their values are dependent on the frequencies of preceding steps in the clock tree. Take PER_CLK, for example: its value is
sourced from either the IRCOSC, XOSC, or PLL0_PHI. Now look at the IRCOSC block. IRCOSC is at 16 MHz, but the frequency
that propagates depends on the next block, IRCOSC Source Controller. Therefore, the actual input frequency received by blocks
that take IRCOSC as a source is the IRCOSC frequency of 16 MHz, filtered by the IRCOSC controller block. The same goes for
XOSC. PLL0_PHI is configured in the PLL0 tab. PER_CLK selects from these three clock sources by selecting the value of the
AUX Clock Selector 0 block. Then finally the selected signal is divided by the PER_CLK prescaler value.
It is important to note, though, that the user input for the divider field is not the desired divider, but the bitfield value that one would
have to enter to achieve the desired divider. That is why the divider block says “/(1+(0…63))” rather than simply “/1…64”. The user
provides a value between 0 and 63, to which the hardware automatically adds 1 to calculate a divider that is between 1 and 64.
Each auxiliary clock and the system clock can feed into multiple domains that each have their own dividers. The number to the
left of the prescaler shows the number of the divider that is associated with that clock. In the case of PER_CLK, the number “0”
is shown next to the PER_CLK enable. This means that PER_CLK is configured by Divider 0 of Auxiliary Clock 0.
Application Note
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
5 / 28
NXP Semiconductors
Figure 7. Buttons
Clock calculator design
2.2 Oscillator control
Oscillator Control controls the generation of the external oscillator (XOSC) frequency. MPC5746R supports two ways of XOSC
generation. The chip has two external oscillator pins, XTAL and EXTAL. An 8-40 MHz external oscillator can be connected to both
pins. This external oscillator is also referred to simply as XTAL. If the XOSC Select block selects XTAL, XOSC will derive its
frequency from the external oscillator (XTAL) block. Alternatively, a waveform can be driven directly to the EXTAL pin. This signal
is also referred to simply as EXTAL. When the XOSC Select block selects EXTAL, XOSC will derive its frequency from the EXTAL
pin. Shown below is a screenshot.
Figure 8. Oscillator control
Application Note
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
6 / 28
NXP Semiconductors
Clock calculator design
2.3 Peripheral domains
Peripheral Domains is an in-depth diagram of MPC5746R modules. Where Tree leaves off at the clock domain level, Peripheral
Domains picks up and progresses to the module level, shown below.
Figure 9. Peripheral domains
The clock domains are color-coded. Black lines are reserved for clock domains that only a few modules use. For example, the
FlexCAN module takes both PBRIDGE_x_CLK and CAN_CLK. CAN_CLK is black because only the FlexCAN uses that clock. As
a rule of thumb, clock domains are represented with black lines if all modules using it can fit within a single window without having
to scroll. The frequencies on this tab are not meant to be modified and are dependent on frequency values in the Tree tab.
LFAST clocking
2.4
The LFAST is a versatile, but intricate module. It supports its own PLL which generates multiple phases and generates a signal
within specification only if its inputs are certain frequencies. These intricacies make it necessary to give LFAST its own dedicated
tab. Peripheral Domains still hosts an LFAST clock that shows its input clocks and is hyperlinked to LFAST Clocking, as shown
in the following figure.
Application Note
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
7 / 28
NXP Semiconductors
Figure 10. LFAST in peripheral domains
Clock calculator design
LFAST Clocking presents a block diagram of the module with various clocks going into it. It also supports LFAST_PLL
configuration to increase the LFAST frequency up to 320 MHz. The LFAST also supports a low-speed mode as well as a highspeed mode. This tool allows the user to select between the two modes. Below is a screenshot of the sheet.
Figure 11. LFAST block diagram
Since the LFAST signal must be generated from an input clock of 10, 13, 20, or 26 MHz, this tool blocks any input from the signal
RF_REF other than these four values. RF_REF can technically be set to any value, but the signal goes through the clock
calculator’s LFAST Input Filter block to become lfast_sys_clk, which in turn is the signal that gets fed into the LFAST PLL and
phase generators, as shown in the following figure.
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
Application Note
8 / 28
NXP Semiconductors
Clock calculator design
Figure 12. LFAST clocking input filter
If RF_REF is 10, 13, 20, or 26 MHz, lfast_sys_clk is the same; otherwise, lfast_sys_clk is 0. MPC5746R does not actually filter
RF_REF the way this tool does. The purpose of the LFAST Input Filter block is to simulate how the user can technically set
RF_REF to any value, but the resulting LFAST output would be unusable. Therefore if a user were to enter an invalid input frequency
(i.e. not 10, 13, 20, or 26 MHz), all subsequent frequencies would be 0, and the user would know to change the input.
PLLx
2.5
PLL0 and PLL1 are visual abstractions of the PLL digital interface, as in the next figure.
Figure 13. PLL0 control
The input source of PLL0 and PLL1 are selected by the auxiliary clock selectors AUX Clock Selector 3 and AUX Clock Selector
4 in the Tree tab,respectively. Then, from the source, the dividers and multipliers located in the PLL0 and PLL1 tabs are set in
order to achieve the PLL output frequencies. The PLL output frequencies are in turn propagated to the PLLx_PHIn clock domains
in the Tree tab.
MPC574xR Clock Calculator Guide, Rev. 5, October 2018
Application Note
9 / 28
Loading...
+ 19 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.