An5117 PDF
An5117 PDF
An5117 PDF
Contents
1. Introduction 1. Introduction........................................................................ 2
1.1. Part numbering and mask set information ............... 3
This document describes the details of migrating from 2. System level comparison ................................................... 3
Kinetis K10-120 MHz to KV5x-240 MHz 2.1. KV5x 240 MHz device overview ........................... 3
microcontrollers. Migrating between the two devices may 2.2. K10 120 MHz device overview .............................. 3
2.3. High level comparison ............................................ 4
require hardware and/or software changes. This document 2.4. System modules comparison ................................... 7
describes the changes required when migrating from 3. Peripheral module comparison ......................................... 17
Kinetis K10-120 MHz to KV5x-240 MHz. 3.1. Unchanged modules .............................................. 18
3.2. Modified modules ................................................. 20
3.3. New modules ........................................................ 35
4. Hardware comparison ...................................................... 37
4.1. Package/pinout differences ................................... 38
4.2. GPIO considerations ............................................. 43
4.3. Clocking considerations ........................................ 43
5. Revision history ............................................................... 43
This document is focused on addressing the changes in functionality between these Kinetis
microcontrollers. For general hardware and software design for the Kinetis V microcontrollers, see the
Quick Reference Users Guide (KVQRUG.pdf).
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 3
System level comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
4 NXP Semiconductors
System level comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 5
System level comparison
MCG CLKGEN
4 MHz IRC FCRDIV
MCGIRCLK Clock options for
CG
32 kHz IRC MCGFFCLK some peripherals
2
(see note)
PLL 1
OUTDIV4 CG Flash clock
MCGFLLCLK
MCGPLLCLK/
FRDIV MCGPLL0CLK MCGFLLCLK
MCGPLL1CLK
System oscillator 0
MCGPLL1CLK
MCG SIM
PLL
OUTDIV3 CG Flexbus clock
FRDIV
MCGFLLCLK
MCGPLLCLK
PRDIV OUTDIV4 CG Bus /Flash clock
Nano-edge1x clock
System oscillator Nano-edge2x clock
EXTAL OSCCLK
XTAL_CLK OSCERCLK_UNDIV
CG
OSC
DIV OSCERCLK
logic
XTAL OSC32KCLK
ERCLK32K
PMC
LPO
PMC logic
CG Clock gat e
N ot e : See subsequent sect ions for det ails on where t hese clocks are used.
Figure 2. KV5x 240 MHz clocking diagram
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
6 NXP Semiconductors
System level comparison
As can be seen in the KV5x clocking diagram, the main clock (MCGOUTCLK) is routed to four
dividers just as in K10. However, in KV5x, OUTDIV2 is routed to a new clock path, the fast peripheral
clock. The Bus and Flash clock are now combined onto OUTDIV4 in KV5x. The following sections
describe which peripherals are used by which clocks.
NOTE
The Fast Peripheral clock on KV5x is capable of much higher frequencies
than the Bus clock on K10. This is considered in the migration from K10
to KV5x.
Other key differences include only a single PLL and a single oscillator for KV5x. If your application
uses PLL1, System Oscillator 1, or the RTC oscillator, you will need to remove the code and the
hardware associated with these items and migrate to the main oscillator (System Oscillator 0) and PLL
(PLL0).
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 7
System level comparison
hardware change. For details on hardware changes, see to the pin mux comparison in this migration
guide. See Figure 3 and Figure 4 for a block diagram comparison.
CME0
CME1 External LOCS0 PLLS
Clock DRS
CME2 Monitor LOCS1
IREFS
LOCS2 DMX32 Filter DCO
LOCRE0
LOCRE1 FLTPRSRV
/ 2n /2
5
LOCRE2
DCOOUT MCGFLLCLK
n=0-7
FLL
FCRDIV MCGFFCLK
Peripheral RANGE0 /2
BUSCLK Sync LOLIE0
LP Clock Valid
PLLCLKEN0
Lock
Phase Charge Detector
/ ( 1,2,...8) MCGPLL0CLK
Detector Pump VCO /2
Internal
PRDIV0
VDIV0 Filter LOLS0 LOCK0 MCGPLL0CLK2X
PLLREFSEL0
/ ( 16,17,18....47) VCOOUT VCOOUT_90 MCGDDRCLK2X
PLL0
LOLIE1 MCGPLL1CLK
Phase Charge
/ ( 1,2,...8) VCO
Detector Pump /2
Lock MCGPLL1CLK2X
PRDIV1 Internal Detector
VDIV1 Filter
PLLREFSEL1
LOLS1 LOCK1
PLLCLKEN1 / ( 16,17,18....47) VCOOUT
PLL1
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
8 NXP Semiconductors
System level comparison
Crystal Oscillator
CLKS
OSCINIT0 PLLCLKEN0 MCG Crystal Oscillator
EREFS0 IREFS Enable Detect
HGO0 PLLS
ATMS
RANGE0 STOP
CME0/ MCGFLLCLK
CME LOCRE0
DRS
External
Clock DMX32 Filter DCO
Monitor
FLTPRSRV
PRDIV0
LOLIE0
/(1,2,3,4,5....,25) Phase Charge
Detector Pump VCO Lock
PLLCLKEN0 Detector
IREFST Internal
VDIV0
Filter
PLLST LOLS0 LOCK0
Peripheral BUSCLK MCGPLLCLK
CLKST VCOOUT
/(24,25,26,...,55)
IRCST
PLL
ATMST
Multipurpose Clock Generator (MCG)
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 9
System level comparison
Added bits:
FCFTRIM: Fast Internal Reference Clock Fine Trim This addition enables greater
resolution in the Fast Internal Reference Clock Fine Trim.
Removed bits:
PLLREFSEL0: PLL0 External Reference Select This is because KV5x has only one
reference selection and the PLLREFSEL0 bit has been removed.
Added bits:
LOLRE: PLL Loss of Lock Reset Enable. This bit enables the loss of lock detection
circuitry to request a reset of the chip upon loss of PLL lock.
Removed bits:
LOCRE1: Loss of Clock Reset Enable This bit was used strictly for the second
oscillator, which is not present on KV5x.
CME1: Clock Monitor Enable 1 This bit was strictly for the second oscillator, which is
not present on KV5x.
LOCS1: RTC Loss of Clock Status This bit was used strictly for the RTC clock, which
is not present on KV5x.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
10 NXP Semiconductors
System level comparison
2.4.2. Oscillator
There are two major differences between the oscillators on these two devices:
The K10 120 MHz device contains two high-frequency capable oscillators. If you are using the
second oscillator, you should migrate to the first.
The KV5x device adds a mechanism to divide OSCERCLK to allow more flexibility in
peripheral frequencies. This results in a slight block diagram modification and memory map
register definition modification.
Figure 8 is a block diagram of the KV5x Oscillator block with the highlighted addition.
EXTAL XTAL
OSC_CLK_OUT
OSC Clock Enable Mux
OSCERCLK_UNDIV
ERCLKEN
OSC32KCLK
4096 CNT_DONE_4096
ERCLKEN EREFSTEN OSC_EN
Counter
STOP
The following is a comparison of the memory map of the K10 and KV5x oscillators
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 11
System level comparison
Since there are no changes between the K10 120 MHz device OSC Control register and the KV5x OSC
Control register, your code should work as is on the KV5x device and no memory map comparison is
needed. Only the new OSC_DIV register are briefly discussed below.
Added bits:
ERPS: ERCLK prescaler This bit field allows the oscillator to be divided by 1, 2, 4, or 8
enabling flexibility in the clock frequency that is fed to the peripheral modules.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
12 NXP Semiconductors
System level comparison
Added bits:
AHSRUN: Allow High Speed RUN mode This bit has been added to allow the High Speed
Run mode.
Removed bits:
ALLS: Allow Low-Leakage Stop mode This bit has been removed because KV5x does not
support the Low-Leakage Stop mode.
Removed bits:
LPWUI: Low Power Wake Up on Interrupt The LPWUI bit has been removed from the KV5x
SMC_PMCTRL register because KV5x does not support this functionality.
Figure 14. SMC Stop Control register (SMC_STOPCTRL; formerly SMC_VLLSCTRL) KV5x
Added bits:
PSTOPO: Partial Stop Option Controls the Partial STOP mode options. Partial stop is an
added clocking option of the STOP mode and allows the customization of which clocks to
disable when entering STOP.
PORPO: POR Power Option Controls whether the POR detect circuit is enabled or disabled in
VLLS0.
RAM2PO: RAM2 Power Option Determines whether the RAM2 section is powered in
VLLS2.
LPOPO: LPO Power Option Enables or disables the 1 kHz LPO clock in VLLSx modes.
low-voltage detect circuit. The high-voltage detect circuit is configured to reset the device or simply
generate an interrupt. The PMC registers are of the same width and are in the same locations on both
the devices. So you can port the K10 code can directly to the KV5x code. The following is a detailed
look at the enhancements of the KV5x PMC.
Figure 15. PMC Regulator Status and Control register (PMC_REGSC) KV5x
Added bits:
BGEN: Bandgap Enable in VLPx Operation KV5x adds the BGEN bit which allows the
bandgap voltage reference to be enabled in VLPx and VLLSx modes.
Figure 16. PMC High Voltage Detect Status and Control 1 register (PMC_HVDSC1) KV5x
Added bits:
HVDF: High-Voltage Detect Flag Indicates if a high-voltage detect event has occurred.
HVDACK High-Voltage Detect Acknowledge This bit is used to acknowledge high voltage
detect errors and clears the HVDF bit.
HVDIE: High-Voltage Detect Interrupt Enable Enables the High-Voltage Detect interrupt.
HVDRE: High-Voltage Detect Reset Enable Enables the ability to generate a reset when a
high-voltage event occurs.
HVDV: High-Voltage Detect Voltage Select Selects the trip point voltage for high-voltage
events.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
14 NXP Semiconductors
System level comparison
Added bits:
LOL: Loss-of-Lock Indicates that reset was caused by a loss of lock in the PLL.
Removed bits:
EZPT: The EZPT bit has been removed from the RCM_SRS1 register as KV5x does not include
the EZ Port module.
Figure 20. RCM Sticky System Reset Status register 0 (RCM_SSRS0) KV5x
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 15
System level comparison
Added bits:
SPOR: Sticky Power-On Reset Indicates a reset has been caused by the power-on detection
logic; must be cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx
resets.
SPIN: Sticky External Reset Pin Indicates a reset has been caused by an active-low level on the
external RESET pin; must be cleared by software as it is unaffected by resets except for POR,
LVD, or VLLSx resets.
SWDOG: Sticky Watchdog Indicates a reset has been caused by the watchdog timer timing
out; must be cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx
resets.
SLOL: Sticky Loss-of-Lock Reset Indicates a reset has been caused by a loss of lock in the
MCG PLL; must be cleared by software as it is unaffected by resets except for POR, LVD, or
VLLSx resets.
SLOC: Sticky Loss-of-Clock Reset Indicates a reset has been caused by a loss of the external
clock; must be cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx
resets.
SLVD: Sticky Low-Voltage Detect Reset Indicates a reset has been caused by the device
supply voltage dropping below the LVD trip point (and PMC_LVDSC1[LVDRE] is set); must
be cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx resets.
SWAKEUP: Sticky Low Leakage Wakeup Reset Indicates a reset has been caused by an
enabled LLWU module wakeup source while the device was in a low leakage mode; must be
cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx resets.
Figure 21. RCM Sticky System Reset Status register 1 (RCM_SSRS1) KV5x
Added bits:
SSACKERR: Sticky Stop Mode Acknowledge Error Reset Indicates a reset has been caused by
a failure of one or more peripherals to acknowledge a Stop mode entry signal; must be cleared by
software as it is unaffected by resets except for POR, LVD, or VLLSx resets.
SMDM_AP: Sticky MDM-AP System Reset Request Indicates a reset has been caused by the
host debugger setting the System Reset Request bit in the MDM-AP Control Register; must be
cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx resets.
SSW: Sticky Software Reset Indicates a reset has been caused by setting the SYSRESETREQ
bit in the Application Interrupt and Reset Control Register in the core; must be cleared by
software as it is unaffected by resets except for POR, LVD, or VLLSx resets.
SLOCKUP: Sticky Core Lockup Indicates a reset has been caused by a software LOCKUP
event; must be cleared by software as it is unaffected by resets except for POR, LVD, or VLLSx
resets.
SJTAG: Sticky JTAG Generated Reset Indicates a reset has been caused by selection of certain
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
16 NXP Semiconductors
Peripheral module comparison
IR codes (EXTEST, HIGHZ, and CLAMP) by the JTAG module; must be cleared by software
as it is unaffected by resets except for POR, LVD, or VLLSx resets.
ADC 4x 1x Changed
HS ADC 0x 4x +
HSCMP 4x 4x Unchanged
DAC 2x 1x Unchanged
VREF 1x 0x -
PGA 4x 0x -
I2C 2x 2x Changed
SPI 3x 3x Unchanged
UART 6x 6x Changed
CMT 1x 0x -
FlexCAN 2x 3x Changed
SAI 2x 0x -
Ethernet 0x 1x +
PIT 1x 1x Changed
PDB 1x 2x Unchanged
LPTMR 1x 1x Unchanged
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 17
Peripheral module comparison
FlexTimer 4x 4x Changed
eFlexPWM 0x 2x +
RTC 1x 0x -
WDOG 1x 1x Unchanged
EWM 1x 1x Changed
Tamper 1x 0x -
CRC 1x 1x Changed
TRNG 0 1x +
TSI 1x 0x -
LCDC 1x 0x -
GPIO 5V Tolerant 3V only Changed
3.1.1. HSCMP
While the comparator peripheral blocks are the same, there are slight integration differences. The
comparators rely mainly on the reference provided to them and the timing module that is used for the
Sample/Window timing (if your application utilizes this feature). First, the voltage reference
information are examined.
3.1.2. DAC
The KV5x device implements only one DAC module, DAC0. If your application was making use of
DAC1, you will need to migrate to DAC0. Both DAC types (K10 and KV5x) implement a FIFO on the
DAC module. There are slight differences in the integration of the DAC reference voltages.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
18 NXP Semiconductors
Peripheral module comparison
3.1.3. SPI
The SPI module on KV5x is essentially unchanged from the version used on the 120MHz K10.
However, it is important to note that there is a clocking change that will affect your code. This is
described in section 3.1.3.1.
3.1.3.1. Clocking
The K10 SPI modules source clock is the Bus clock, which is restricted to a maximum of 75 MHz. On
the KV5x device, however, the SPI modules are sourced by the Fast Peripheral clock. This clock is
restricted to a maximum of 120 MHz and is not required to be slower than the Core/System clock as in
the K10. The calculations for the SPI baud rate remain the same, but you may need to account for a
higher frequency clock if your application configures MCGOUTCLK to the maximum achievable
frequency.
3.1.4. WDOG
Although the WDOG programming models are the same between the two devices, the clocking between
the two are not. Both devices still support the 1 kHz LPO clock as a source and both still support the
Bus clock as a source. However in the case of the KV5x device, the Bus clock is sourced from the same
clock divider as the Flash clock. Therefore, the Bus clock on KV5x will be limited to 27.5 MHz or less.
If your application uses the Bus clock as a source for the WDOG, you may need to account for the
slower clock frequency.
3.1.5. EWM
There are no differences between the EWMs on the K10 and KV5x devices. Your application code
should migrate directly between the two devices without modification.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 19
Peripheral module comparison
3.1.6. PDB
The PDB of KV5x device has compatible registers and programming model as the K10 device so your
PDB driver code should not need any modifications. The trigger options and output options are slightly
different. The KV5x also adds a PDB instance to provide extra triggering options and flexibility. It was
mainly added to allow for triggering of the second HS ADC through the FTM modules if so desired.
For the PDB trigger connection information of KV5x, see the PDB chapter in the KV5x reference
manual (document: KV5XP144M240RM).
3.2.1.1. ADC
The legacy 16-bit ADC module implements the following changes.
Removes ADC1, ADC2, ADC3.
Removes the PGA module.
Changes in the clock selections.
Changes in the trigger selections.
Updated register bit attributes.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
20 NXP Semiconductors
Peripheral module comparison
clock (OSC0ERCLK), and an Asynchronous clock (internal to the ADC peripheral). The KV5x
removes the bus clock divided by two options and replaces it with a second alternate clock option.
Another consideration that must be taken into account is the fact that the bus clock on KV5x is now
combined with the flash clock and as such, it is also limited to 27.5 MHz.
3.2.1.6. I2C
The KV5x I2C peripheral adds the following functionality.
Start/Stop bit detection interrupt.
STOP mode entry delay when an I2C transaction is in progress.
Additionally, the KV5x also has clocking changes that should be considered when transitioning from
K10 to KV5x.
Figure 22. I2C Programmable Input Glitch Filter register (I2Cx_FLT) KV5x
Added bits:
SHEN: Stop Hold EnableThis bit enables/disables the delay of entry to stop mode when any
data transmission or reception is occurring.
STOPF: I2C Bus Stop Detect FlagThis bit is set when the I2C buss stop status is detected and
must be cleared by software.
SSIE: I2C Bus Stop or Start Interrupt EnableThis bit enables the interrupt for I2C bus stop or
start detection.
STARTF: I2C Bus Start Detect FlagThis bit is set when the I2C buss start status is detected
and must be cleared by software.
3.2.1.9. UART
Basic functionality of the KV5x UART has not changed. There are clocking and CEA709.1-B changes
of which you should be aware. First, the clocking changes will be discussed.
Added bits:
SBNS: Stop Bit Number Select Selects the number of stop bits used. Chose between 1 and 2.
Bit 7 6 5 4 3 2 1 0
Read 0 0 0
TDMAS RDMAS LBKDDMAS
Writ e
Reset 0 0 0 0 0 0 0 0
Added bits:
LBKDDMAS: LIN Break Detect DMA Select Bit This bit configures the LIN break detect
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 23
Peripheral module comparison
Bit 7 6 5 4 3 2 1 0
Read ADTE
WTE CWTE BWTE I NI TDE GTVE TXTE RXTE
Writ e
Reset 0 0 0 0 0 0 0 0
Added bits:
ADTE: ATR Duration Timer Interrupt Enable This bit configures the IS7816[ADT] flag to
generate an interrupt.
Bit 7 6 5 4 3 2 1 0
Added bits:
ADT: ATR Duration Time Interrupt This bit indicates that the ATR duration time has
exceeded the programmed value. Software must clear this bit by writing a 1 to it.
Bit 7 6 5 4 3 2 1 0
Read
PEI E WBEI E I SDI E PRXI E PTXI E PCTEI E PSI E TXDI E
Writ e
Reset 0 0 0 0 0 0 0 0
Added bits:
PEIE: Preamble Error Interrupt Enable Enables / disables the preamble error interrupt
capability.
In addition to adding a bit to the UARTx_IE register, a second register is added to further expand the
interrupt capabilities of the CEA709.1-B standard. This register is at the offset 0x24 and takes the place
of the Beta1 Timer register (this register has been moved/expanded).
Bit 7 6 5 4 3 2 1 0
Read 0
RPLOFI E CTXDI E CPTXI E
Writ e
Reset 0 0 0 0 0 0 0 0
Added bits:
RPLOFIE: Receive Packet Length Overflow Interrupt Enable Enables/disables the receive
packet length overflow functionality.
CTXDIE: Collision during transmission of byte sync or later packet Interrupt Enable
Enables/disables the interrupt function for collisions during transmission of byte sync or later
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
24 NXP Semiconductors
Peripheral module comparison
packets.
CPTXIE: Collision during preamble transmission Interrupt Enable Enables / disables the
interrupt on collision during preamble transmission.
Bit 7 6 5 4 3 2 1 0
Added bits:
LNF: LON Noise Flag Indicates that noise is present during the sampling of received packets.
Changed bits:
RPLOF: Received Packet Length Overflow Flag This bit replaces the Initial Synchronization
Fail Flag. It now indicates that the received packet length exceeds 255 bytes.
TXDF: Transmission Delay Flag This bit replaces the improper line code violation bit. It is
asserted if a packet that is queued for transmission has been delayed because a receive packet
starting coming in before the packet could be transmitted.
3.2.1.12. FlexCAN
The KV5x FlexCAN adds the following features:
Flexible message buffers (MBs), totaling 64 message buffers of 8 bytes data length each,
configurable as Rx or Tx.
ISO 11898-1 standard compliance.
DMA Support
Low Power mode enhancements.
Extended Bit Time Control
NOTE
The KV5x device adds a third FlexCAN module. If you are using NXP
supplied header files, the changes should be relatively simple. If not (or if
using assembly code), you will need to make note of the changes. The
CAN instances are located at the addresses listed in Table 7.
Table 7. CAN instance addresses
CAN Instance Address
CAN0 0x4002_4000
CAN1 0x4002_5000
CAN2 0x400A_4000
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 25
Peripheral module comparison
NOTRDY
FRZACK
LPMACK
R
WAKSRC
WAKMSK
SOFTRST
SLFWAK
SRXDI S
WRNEN
DOZE
HALT
SUPV
MDI S FRZ RFEN I RMQ
Reset 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
Reserved
Reserved
LPRI OEN
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
Added bits:
WAKSRC: Wake Up Source Enables / disables the integrated low-pass filter on the Rx CAN
Input to protect from spurious wake up events.
DOZE: Doze Mode Enable Enables / disables the Doze mode functionality of the FlexCAN
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
26 NXP Semiconductors
Peripheral module comparison
module (note: Doze mode will only be entered when this bit is set and the software requests a
low power mode entry of the SoC).
DMA: DMA Enable Enables / disables the DMA feature for the Rx FIFO.
Address:Base address + 20h offset
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BOFFDONEI NT
RWRNI NT
TWRNI NT
ERROVR
SYNCH
R 0 0
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
W
w1c w1c w1c
w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BOFFINT
FRMERR
CRCERR
BIT1ERR
BIT0ERR
ACKERR
STFERR
RXWRN
WAKINT
ERRINT
TXWRN
IDLE
R TX FLTCONF RX
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 27
Peripheral module comparison
Added Bits:
ERROVR: Error Overrun bit This bit indicates that an error condition occurred when any
error flag is already set.
BOFFDONEINT: Bus Off Done Interrupt This bit is set when the Tx Error Counter
(TXERRCNT) has finished counting 128 occurrences of 11 consecutive recessive bits on the
CAN bus and is ready to leave Bus Off.
R BUF31TO8I
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BUF0I
BUF7I
BUF6I
BUF5I
R BUF31TO8I BUF4TO1I
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Changed bits:
BUF4TO1I: This bit was changed from BUF4TO0I. It now controls the clearing of the
interrupts for MBs 4 to 1 instead of 4 to 0.
Added bits:
BUF0I: This bit indicates and clears the interrupt for MB 0. It was separated into its own bit
because it now controls the clearing of the FIFO when the Rx FIFO is enabled.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
28 NXP Semiconductors
Peripheral module comparison
BOFFDONEMSK
R 0 0
Reserved
EACEN
RFFN TASD MRP RRS
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0 0 0 0
Reserved
Reset
Figure 34. FlexCAN Control 2 register (CANx_CTRL2) KV5x
Added bits:
BOFFDONEMSK: Bus Off Done Interrupt Mask This bit provides a mask for the Bus Off
Done Interrupt.
Removed bits:
WRMFRZ: Write-Access to Memory in Freeze Mode Enables / disables write access to the
FlexCAN memory in Freeze mode (no effect outside of Freeze mode).
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 29
Peripheral module comparison
Reserved
BTF EPRESDI V ERJW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Added Bits:
BTF: Bit Timing Format Enable This bit enables the use of the extended CAN bit timing fields
EPRESDIV, EPROPSEG, EPSEG1, EPSEG2, and ERJW and can only be written in Freeze
mode.
EPRESDIV: Extended Prescale Division Factor This bit defines the ratio between the PE
clock frequency and the Serial Clock frequency and extends the CAN_CTRL1[PRESDIV] value
range.
ERJW: Extended Resync Jump Width This bit field defines the maximum number of time
quanta that a bit time can be changed by on synchronization (extends the CAN_CTRL1[RJW]
value range.
EPROPSEG: Extended Propagation Segment This bit field defines the length of the
Propagation Segment in the bit time (extends the CAN_CTRL1[PROPSEG] value range. It can
only be written in Freeze mode.
EPSEG1: Extended Phase Segment 1 This bit field defines the length of Phase Segment 1 in
the bit time (extends the CAN_CTRL1[PSEG1] value range). It can only be written in Freeze
mode.
EPSEG2: Extended Phase Segment 2 This bit field defines the length of Phase Segment 2 in
the bit time (extends the CAN_CTRL1[PSEG2] value range. It can only be written in Freeze
mode.
Clocking Changes
Figure 36 and Figure 37 compare the clock control trees for the FlexCAN modules. First is the K10
clock tree and the second is the KV5x clock tree.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
30 NXP Semiconductors
Peripheral module comparison
OSC0ERCLK
FlexCAN clock
Bus clock
CANx_CTRL1[ CLKSRC]
Figure 36. K10 FlexCAN clock tree
OSCERCLK
FlexCAN clock
Fast Peripheral clock
CANx_CTRL1[ CLKSRC]
Figure 37. KV5x FlexCAN clock tree
As shown in Figure 36 and Figure 37, the only change is that the KV5x device replaces the Bus clock
option with the Fast Peripheral clock option. This is important because this clock is sourced at a higher
frequency than the bus clock. You will need to take this into account if you were using the bus clock in
your application.
3.2.1.13. CRC
There is only one difference between the K10 CRC module and the KV5x CRC module. The CRC Data
register in KV5x is named CRC_DATA while the data register in K10 is named CRC_CRC. Therefore,
the only change your software will need is to rename the CRC_CRC accesses to CRC_DATA. Figure 39
illustrates the memory map comparison.
Absolute
Width
address Register name Access Reset value
(in bits)
(hex)
4003_2000 CRC Data register (CRC_DATA) 32 R/W FFFF_FFFFh
4003_2004 CRC Polynomial register (CRC_GPOLY) 32 R/W 0000_1021h
4003_2008 CRC Control register (CRC_CTRL) 32 R/W 0000_0000h
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 31
Peripheral module comparison
Absolute
Width
address Register name Access Reset value
(in bits)
(hex)
4003_2000 CRC Data register (CRC_DATA) 32 R/W FFFF_FFFFh
4003_2004 CRC Polynomial register (CRC_GPOLY) 32 R/W 0000_1021h
4003_2008 CRC Control register (CRC_CTRL) 32 R/W 0000_0000h
R 0 I SF 0
I RQC
W w1c
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0 0
LK MUX DSE ODE PFE SRE PE PS
W
Reset 0 0 0 0 * * * * 0 * 0 * 0 * * *
Changed bits:
MUX: Pin Mux Control This bit field was expanded to accommodate more options for each
GPIO pin.
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 0
W GI WD GI WE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Added bits:
GIWD: Global Interrupt Write Data The value written to this register will be written to all Pin
Control Register bits that are selected by GIWE.
GIWE: Global Interrupt Write Enable Selects which Pin Control Registers (15 through 0) to
update with the value in GIWD.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
32 NXP Semiconductors
Peripheral module comparison
R 0 0
W GI WD GI WE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Added bits:
GIWD: Global Interrupt Write Data The value written to this register will be written to all Pin
Control Register bits that are selected by GIWE.
GIWE: Global Interrupt Write Enable Selects which Pin Control Registers (31 through 16) to
update with the value in GIWD.
Software impact:
The main impact that should be taken into consideration is the expansion/changes of the MUX
selections. For each pin used in your application, it is recommended that you check the table in the
Hardware Impacts section of this document to find the new MUX selection for the desired functionality.
For applications which implement digital filtering, there are two items to consider:
The bus clock, which optionally provides the clock for the digital filtering has the possibility of
being much lower due to the clock frequency restriction of the KV5x bus clock
PORT D pins are the only pins which support digital filtering
Therefore, it is recommended to double check that the pins which require digital filtering in your
application are PORT D pins. You may also want to change your digital filtering settings as the bus
clock is now limited to 27.5 MHz (will be the same frequency as the flash clock).
3.2.2. Additions
The peripherals listed in this section have only additions to their registers or memory maps. They can
achieve the same functionality as in the 120MHz K10 but also include features that may enhance your
application or ease coding.
3.2.2.1. PIT
The PIT module in KV5x adds the capability to chain timers together. This allows the timer to measure
greater amounts of time. The registers that contain the additional features are shown below.
Address:4003_7000h base + 108h offset + ( 16d i) , where i= 0d t o 3d
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R 0 CHN TI E TEN
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 33
Peripheral module comparison
NOTE
When enabled, the timer which is chained will automatically chain to the
previous timer, for example, PIT timer 2 chains to PIT timer 1.
Clocking Changes
The KV5x combines the bus clock with the flash clock. Therefore, the PIT is limited to a maximum of
27.5 MHz. You need to consider PIT limitation when migrating, as the K10 120MHz devices allow the
PIT to be clocked to a maximum of 75 MHz.
3.2.2.2. FlexTimer
The FlexTimer adds counter reset upon input capture event.
Other than the above additional feature, the programming models of the two devices are the same.
However, the base addresses are different. If you are using the NXP approved header files and macros,
the same macros may be used and migration will be seamless. If you have written your application in
assembly and/or programmed the base addresses manually, you need to know the base address changes
listed in Table 8.
Table 8. Memory map comparison
FTM Instance K10 KV5x
FTM0 0x4003_8000 0x4003_8000
FTM1 0x4003_9000 0x4003_9000
FTM2 0x400B_8000 0x4003_A000
FTM3 0x400B_9000 0x4002_6000
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
34 NXP Semiconductors
Peripheral module comparison
R 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CHF
R 0
I CRST
CHI E MSB MSA ELSB ELSA DMA
W 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Figure 44. FTM Channel (n) Status and Control register (FTMx_CnSC) KV5x
Added bits:
ICRST: FTM Counter reset by the selected Input capture event Initiates an FTM counter reset
by the selected event of a channel (n) in the Input Capture Mode.
If your application is using input capture, this feature may reduce the calculations necessary for your
application, as the input capture feature can then provide an absolute count value from the last capture
event.
3.3.1. HSADC
The HSADC is a new ADC to Kinetis devices. It is an ADC with 12-bit resolution capable of five mega
samples per second. The KV5x device contains two instances of this device with each instance capable
of scanning up to 16 dedicated channels sequentially. Each instance contains two independent
conversion machines making simultaneous conversions possible. This makes the new ADC well suited
for motor control applications. The new ADC contains the following features.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 35
Peripheral module comparison
3.3.2. Ethernet
The Ethernet module is not a new IP to Kinetis. If you plan to add Ethernet to your application, it is best
to consult the Kinetis SDK HAL based Ethernet examples.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
36 NXP Semiconductors
Hardware comparison
3.3.3. eFlexPWM
The eFlexPWM is not a peripheral that is available in the K series Kinetis devices and the KV5x devices
contain an FTM peripheral (which is available on the K series K10). The KV5x devices also contain the
same number of FTM instances and channels. Therefore, when migrating from a K10 device to a KV5x
device, there will be no software or hardware impacts. However, if you plan to use eFlexPWM, it is
best to use the Kinetis SDK HAL based eFlexPWM examples to get started. For more information on
how to use the eFlexPWM module, see the document AN5142: Features of the FlexTimer Module.
3.3.4. TRNG
The TRNG is a hardware accelerator module that generates a 512-bit random number as needed by
modules or software routines that may need a random number. It is intended for direct use by functions
that generate secret keys, per-message secrets, random challenges, and other similar quantities used in
cryptographic algorithms.
4. Hardware comparison
The following section outlines the differences and hardware considerations when migrating from the
K10 120 MHz device to the KV5x 240 MHz device.
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 37
Hardware comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
38 NXP Semiconductors
Hardware comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 39
Hardware comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
40 NXP Semiconductors
Hardware comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 41
Hardware comparison
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
42 NXP Semiconductors
Revision history
5. Revision history
Table 10. Revision history
Revision number Date Substantive changes
0 10/2015 Initial release
1 06/2016 Changed KV5x-120 MHz to KV5x-
240 MHz
Kinetis Migration Guide: K10 - 120 MHz to KV5x, Application Note, Rev. 1, 06/2016
NXP Semiconductors 43
How to Reach Us: Information in this document is provided solely to enable system and software
implementers to use NXP products. There are no express or implied copyright licenses
Home Page:
granted hereunder to design or fabricate any integrated circuits based on the
nxp.com
information in this document. NXP reserves the right to make changes without further
Web Support: notice to any products herein.
nxp.com/support
NXP makes no warranty, representation, or guarantee regarding the suitability of its
products for any particular purpose, nor does NXP assume any liability arising out of the
application or use of any product or circuit, and specifically disclaims any and all
liability, including without limitation consequential or incidental damages. Typical
parameters that may be provided in NXP data sheets and/or specifications can and do
vary in different applications, and actual performance may vary over time. All operating
parameters, including typicals, must be validated for each customer application by
customers technical experts. NXP does not convey any license under its patent rights
nor the rights of others. NXP sells products pursuant to standard terms and conditions
of sale, which can be found at the following address: nxp.com/SalesTermsandConditions.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, Freescale,
the Freescale logo, and Kinetis are trademarks of NXP B.V. All other product or service names
are the property of their respective owners. ARM, the ARM Powered logo, and Cortex are
registered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere.