Page 17
Memory Map and Register Definition..........................583 26.6.1 Low Voltage Detect Status and Control 1 Register (PMC_LVDSC1)............584 26.6.2 Low Voltage Detect Status and Control 2 Register (PMC_LVDSC2)............585 26.6.3 Regulator Status and Control Register (PMC_REGSC)................586 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 41
48.4.3 TSI Threshold Register (TSI_TSHD)......................1279 48.4.4 TSI MODE Register (TSI_MODE)....................... 1280 48.4.5 TSI MUTUAL-CAP Register 0 (TSI_MUL0)....................1282 48.4.6 TSI MUTUAL-CAP Register 1 (TSI_MUL1)....................1285 48.4.7 TSI SINC filter Register (TSI_SINC)......................1288 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 42
48.5.12 Wake up MCU from low power modes......................1306 48.5.13 DMA function support........................... 1306 48.5.14 Spread spectrum clocking..........................1306 48.6 Usage Guide..................................1309 48.6.1 TSI Interrupts..............................1309 48.6.2 How to use TSI module..........................1309 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Chip-specific: The first section, Chip-specific [module name] information, includes the number of module instances on the chip and possible implementation differences between the module instances, such as differences in FIFO depths or the number of Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1.3.2 Example: chip-specific information that refers to a different chapter The chip-specific information below refers to another chapter's chip-specific information. In this case, read both sets of chip-specific information before reading further in the chapter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• The page number on which each register is described • Register figures • Field-description tables • Associated text The register figures show the field structure using the conventions in the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Fixed-width type indicates text that must be typed exactly as shown. It is used for instruction mnemonics, directives, symbols, subcommands, parameters, and operators. Fixed-width type Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Consider undefined locations in memory to be reserved. Write 1 to clear: Refers to a register bitfield that must be written as 1 to be "cleared." Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
-M0+ MCUs and product family. It also presents high-level descriptions of the modules available on the device covered by this document. 2.2 Block Diagram The following figure shows a top-level block diagram of the MCU superset device. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Figure 2-1. MCU block diagram 2.3 Module Functional Categories The modules on this device are grouped into functional categories. The following sections describe the modules assigned to each category in more detail. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Micro Trace Buffer (MTB) • 24-bit system tick timer (SysTick) The detailed architecture and programming model of Cortex-M0+ processor are discussed in the following documents from ARM. • Cortex-M0+ Devices Generic User Guide Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Debugger Wakeup Interrupt Memory Protection interface Controller (WIC) Unit (MPU) Optional Debug Access Bus Matrix Port AHB-Lite interface Optional Optional to system single-cycle Serial-Wire or JTAG IO port debug port Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
SysTick Calibration Value Register (SYST_CALIB) is always zero. • The NOREF bit in SysTick Calibration Value Register (SYST_CALIB) is always set, implying that CORE_CLK is the only available source of reference timing. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Cortex-M0+ Technical Reference Manual 4.2 NVIC configuration The NVIC supports configurable interrupt number and level of priority. The following sections speficy the exact priority level and interrupt vectors implemented on this device. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
5.2 Memory map and register definition NOTE The SIM registers can only be written in the supervisor mode. In the user mode, write accesses are blocked and will result in a bus error. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
E_EN Reset SIM_CHIPCTL field descriptions Field Description 31–20 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 65
This read-only field is reserved and always has the value 0. ADC_ ADC interleave channel enable INTERLEAVE_ Select ADC interleave pins. Bit 1 to 0 are for PTB1 and PTB0 respectively. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTM1 external clock driven by TCLK2 pin. No clock input 25–24 FTM0 External Clock Pin Select FTM0CLKSEL Selects the external pin used to drive the clock to the FTM0 module. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Reset Reset SIM_ADCOPT field descriptions Field Description 31–22 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTM2 CH1 Select FTM2CH1SEL Selects FTM2 CH1 input FTM2_CH1 input exclusive OR of FTM2_CH0, FTM2_CH1, and FTM1_CH1 7–6 FTM2 CH0 Select FTM2CH0SEL Selects FTM2 CH0 input Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 70
Software control for FTM0 hardware trigger synchronization No effect. Write 1 to assert the TRIG1 input to FTM0. Software must clear this bit to allow other trigger sources to assert. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Specifies the silicon feature set identication number for the device. 00010 for this device. PINID Pin identification Specifies the pin count of the device. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
IFR via the PGMPART flash command. Address: 4004_8000h base + 4Ch offset = 4004_804Ch NVMSIZE PFSIZE EEERAMSIZE Reset DEPART Reset * Notes: • x = Undefined at reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 73
Flash accesses are disabled (and generate a bus error) and the Flash memory is placed in a low power state. This bit should not be changed during VLP modes. Relocate the interrupt vectors out of Flash memory before disabling the Flash. Flash is enabled Flash is disabled Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This field concatenated with 13 trailing zeros indicates the first invalid address of data flash (block 1). Reserved This field is reserved. This read-only field is reserved and always has the value 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DMA channel 5 and channel 1 interrupt select bit (logic 1 is ch5 and logic 0 is ch1) SIM_MISCTRL Bit 4 of DMA channel 4 and channel 0 interrupt select bit (logic 1 is ch4 and logic 0 is ch0) SIM_MISCTRL Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 78
Memory map and register definition SIM_MISCTRL field descriptions (continued) Field Description 3–1 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Software Trigger bit to TRGMUX SW_TRG Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The supported integer divide operations include 32/32 signed (SDIV) and unsigned (UDIV) calculations. 6.2.1 Features The key features of the MMDVSQ include: • Lightweight implementation of 32-bit integer divide and square root arithmetic operations Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
A generic block diagram of the processor core and platform for this class of ultra low-end microcontrollers is shown in Figure 6-1. The MMDVSQ module’s location as a memory- mapped co-processor is highlighted. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 81
Peripherals Alt-Master PBRIDGE DMA_4ch Array Figure 6-1. Generic Cortex-M0+ Core Platform Block Diagram Next, a block diagram of the internal structure of the MMDVSQ module is presented. See Figure 6-2. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
MMDVSQ is only clocked when responding to bus requests to its programming model or is busy performing a calculation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Input dividend (numerator) for the divide Divisor (MMDVSQ_DSOR) Input divisor (denominator) for the divide Control/Status (MMDVSQ_CSR) Control for divide, status for divide and square root Result (MMDVSQ_RES) Output result Radicand (MMDVSQ_RCND) Input "square" data Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(read or write) of the DSOR register while the module is busy during a calculation causes the access to be stalled (using wait states) until the calculation completes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 85
Reset * Notes: • x = Undefined at reset. MMDVSQ_DSOR field descriptions Field Description DIVISOR Divisor This is the input divisor operand for divide calculations. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only bit is asserted when the MMDVSQ is performing a divide or square root. When an operation is initiated, the hardware sets this flag. It remains asserted until the operation completes and the Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 87
This indicator configures the MMDVSQ’s response to divide-by-zero calculations. If both CSR[DZ] and CSR[DZE] are set, then a subsequent read of the RES register is error terminated to signal the processor of the attempted divide-by-zero. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 88
CSR[DFS] = 0, it is ignored. This bit always reads as a zero. The state of the register write data defines this bit’s function. No operation initiated If CSR[DFS] = 1, then initiate a divide calculation, else ignore Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ARM Cortex-Mx definition and returns 0x8000_0000 (the lower 32 bits of the +2 result) as the quotient with no indication of the overflow condition. If the remainder is selected as the output of this calculation, it returns 0x0000_0000. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 91
6.5.1.2.2 Square root using Q notation Consider the use of Q notation for square root calculations returning fractional values. The following description is taken from http://en.wikipedia.org/wiki/Q_(number_format). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 92
Q number left justified in the machine word. For a given Qm.n format, using an m+n+1 bit signed integer container with n fractional bits: • its range is [-2 • its resolution is 2 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Stated differently, it represents the time CSR[BUSY] is asserted for a given calculation. In the following two tables, “x” signals a bit with a don’t care value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1. Read DEND, DSOR, and CSR registers and save the values as part of the task state. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 96
2. Reload DEND, DSOR, CSR, and RES registers from the saved state. Since the original context save of the control/status register is guaranteed to have CSR[SRT] = 0, there is no divide operation initiated when this register is reloaded in step Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. Each bit in the AMC field indicates whether there is a corresponding connection to the AXBS master input port. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Cache is on for instruction and off for data. Cache is off for instruction and on for data. Cache is off for both instruction and data. Cache is off. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 101
Disable Flash Controller Speculation DFCS Disables flash controller speculation. Enable flash controller speculation. Disable flash controller speculation. Enable Flash Data Speculation EFDS Enables flash data speculation. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 102
Arbitration select Fixed-priority arbitration for the crossbar masters Round-robin arbitration for the crossbar masters Reserved This field is reserved. This read-only field is reserved and always has the value 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Compute operation entry has completed or compute operation exit has not completed. Compute Operation Request CPOREQ This bit is auto-cleared by vector fetching if CPOWOI = 1. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 104
Memory map/register descriptions MCM_CPO field descriptions (continued) Field Description Request is cleared. Request Compute Operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
BME decorated references are only available on system bus transactions generated by the processor core and targeted at the standard 512 KB peripheral address space based at 0x4000_0000 . The decoration semantic is embedded into address bits[28:19], creating a Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
KB space based at 0x400F_F000 for GPIO accesses. This organization provides compatibility with the Kinetis K Family. Attempted accesses to the memory space located between 0x4008_0000 - 0x400F_EFFF are error terminated due to an illegal address. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The BME module provides a memory-mapped capability and does not include any programming model registers. The exact set of functions supported by the BME are detailed in the Functional description. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
AHB data phase, and then the write is performed in the second AHB data phase. A generic timing diagram of a decorated store showing a peripheral bit field insert operation is shown as follows: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 109
NOTE Any wait states inserted by the slave device are simply passed through the BME back to the master input bus, stalling the AHB transaction cycle for cycle. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 110
Table 8-1. Cycle definitions of decorated store: logical AND Pipeline stage Cycle BME AHB_ap Forward addr to memory; Recirculate captured addr + <next> Decode decoration; Convert attr to memory as slave_wt Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 111
& 0xE00FFFFF, size] // memory read tmp | wdata // modify mem[accessAddress & 0xE00FFFFF, size] = tmp // memory write The cycle-by-cycle BME operations are detailed in the following table. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 112
& 0xE00FFFFF, size] // memory read tmp ^ wdata // modify mem[accessAddress & 0xE00FFFFF, size] = tmp // memory write The cycle-by-cycle BME operations are detailed in the following table. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 113
The "-" indicates an address bit "don't care". Note, unlike the other decorated store operations, BFI uses addr[19] as the least significant bit in the "w" specifier and not as an address bit. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 114
Capture address, attributes BME AHB_dp <previous> Perform memory read; Form Perform write sending bit mask; Form bitwise registered data to memory ((mask) ? wdata : rdata)) and capture destination data in register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
AHB data phase. This is the only decorated transaction that is not an atomic read-modify-write, as it is a simple data read. A generic timing diagram of a decorated load showing a peripheral load-and-set 1-bit operation is shown as follows. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 116
4. Cycle x+2, second AHB data phase: The selected original 1-bit is right-justified, zero-filled and then driven onto the input read data bus, while the registered write data is sourced onto the output write data bus Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 117
• Cycle x, 1st AHB address phase: Read from input bus is translated into a read operation on the output bus with the actual memory address (with the decoration removed) and then captured in a register • Cycle x+1, 2nd AHB address phase: Idle cycle Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 118
// generate bit mask rdata = (tmp & mask) >> b // read data returned to core tmp & ~mask // modify mem[accessAddress & 0xE00FFFFF, size] = tmp // memory write Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 119
// decorated load-and-set 1 mem[accessAddress & 0xE00FFFFF, size] // memory read mask 1 << b // generate bit mask rdata = (tmp & mask) >> b // read data returned to core Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 120
8-11, where addr[30:29] = 10 for peripheral, addr[28] = 1 specifies the unsigned bit field extract operation, addr[27:23] is "b", the LSB identifier, addr[22:19] is "w", the bit field width minus 1 identifier, and mem_addr[18:0] specifies the address Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
AND, OR, XOR, LAC1 and LAS1, this bit functions as a true address bit, while for BFI and UBFX, this bit defines the least significant bit of the "w" bit field specifier. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
9.2.1 Features The crossbar switch includes these features: • Symmetric crossbar bus switch implementation • Allows concurrent accesses from different masters to different slaves Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Additionally, when no master is requesting access to a slave port, the crossbar drives IDLE transfers onto the slave bus, even though a default master may be granted access to the slave port. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The following table describes possible scenarios based on the requesting master port: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
9.5 Initialization/application information No initialization is required for the crossbar switch. See the chip-specific crossbar switch information for the reset state of the arbitration scheme. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This device contains one peripheral bridge. A generic block diagram of the processor core and platform for this class of microcontrollers is shown in the following figure. The AIPS (PBRIDGE) module's location is highlighted. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
4 KB. (It might be possible that all the peripheral slots are not used. See the memory map chapter for details on slot assignments.) The bridge includes separate clock enable inputs for each of the slots to accommodate slower peripherals. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Misaligned accesses are supported to allow memory to be placed on the slave peripheral bus. Peripheral registers must not be misaligned, although no explicit checking is performed by the peripheral bridge. All accesses are performed with a single transfer. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 134
All accesses to the peripheral slots must be sized less than or equal to the designated peripheral slot size. If an access is attempted that is larger than the targeted port, an error response is generated. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1-1 paired up, and are both selected by the same trigger control register. Not every module has pre-trigger input, please refer to the respective module chapter for details. Following is the main structure of TRGMUX, and take ModuleA as an example. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 136
VSS trigger VDD trigger SIM_SW_TRG Software trigger controlled by SIM module TRGMUX_INx TRGMUX external trigger input x LPUARTx_RX_data LPUARTx receive end of word trigger Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 137
LPTMRx timer counter match trigger LPIT_CHx LPIT channel x timer counter match trigger FTMx_TRIG FTMx timer counter match trigger CMPx_OUT CMPx output trigger FlexIO_TRIGx FlexIO timer x counter match trigger Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 139
ADC. There is another PDB pre-trigger scheme existing on this device, which is not through TRGMUX. Please refer to ADC section for details on ADC trigger implementation on this device. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 143
This read/write bit field is used to configure the MUX select for peripheral trigger input 2. Refer to the Select Bit Fields table in the Features section for bit field information. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 144
Reset Bits Reserved SEL1 Reserved SEL0 Reset 11.4.1.3.3 Fields Field Function Enable This bit shows whether the register can be written or not. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 148
11.4.2.2.2 Function TRGMUX Register 11.4.2.2.3 Diagram Bits Rese SEL3 Reserved SEL2 rved Reset Bits Reserved SEL1 Reserved SEL0 Reset 11.4.2.2.4 Fields Field Function Enable Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 149
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.3 TRGMUX EXTOUT0 (TRGMUX_EXTOUT0) 11.4.2.3.1 Address Register Offset TRGMUX_EXTOUT0 40062004h TRGMUX Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 150
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 151
Select Bit Fields table in the Features section for bit field information. 15-14 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 152
SEL0 Reset 11.4.2.5.3 Fields Field Function Enable This bit shows whether the register can be written or not. 0 - Register can be written. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 153
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.6 TRGMUX ADC1 (TRGMUX_ADC1) 11.4.2.6.1 Address Register Offset TRGMUX_ADC1 40062010h TRGMUX Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 154
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 155
This read-only bit field is reserved and always has the value 0. — 13-8 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 156
0 - Register can be written. 1 - Register cannot be written until the next system Reset. This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 157
Select Bit Fields table in the Features section for bit field information. 11.4.2.9 TRGMUX FTM0 (TRGMUX_FTM0) 11.4.2.9.1 Address Register Offset TRGMUX_FTM0 40062028h TRGMUX Register 11.4.2.9.2 Diagram Bits Rese SEL3 Reserved SEL2 rved Reset Bits Reserved SEL1 Reserved SEL0 Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 158
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.10 TRGMUX FTM1 (TRGMUX_FTM1) 11.4.2.10.1 Address Register Offset TRGMUX_FTM1 4006202Ch TRGMUX Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 159
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 160
Select Bit Fields table in the Features section for bit field information. 15-14 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 161
SEL0 Reset 11.4.2.12.3 Fields Field Function Enable This bit shows whether the register can be written or not. 0 - Register can be written. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 162
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.13 TRGMUX FLEXIO (TRGMUX_FLEXIO) 11.4.2.13.1 Address Register Offset TRGMUX_FLEXIO 40062044h TRGMUX Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 163
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 164
Select Bit Fields table in the Features section for bit field information. 15-14 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 165
SEL0 Reset 11.4.2.15.3 Fields Field Function Enable This bit shows whether the register can be written or not. 0 - Register can be written. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 166
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.16 TRGMUX LPUART1 (TRGMUX_LPUART1) 11.4.2.16.1 Address Register Offset TRGMUX_LPUART1 40062050h TRGMUX Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 167
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.17 TRGMUX LPI2C0 (TRGMUX_LPI2C0) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 168
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 169
This read-only bit field is reserved and always has the value 0. — 29-24 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 170
Select Bit Fields table in the Features section for bit field information. 11.4.2.19 TRGMUX LPSPI0 (TRGMUX_LPSPI0) 11.4.2.19.1 Address Register Offset TRGMUX_LPSPI0 4006205Ch TRGMUX Register 11.4.2.19.2 Diagram Bits Rese Reserved Reserved Reserved rved Reset Bits Reserved Reserved Reserved SEL0 Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 171
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.20 TRGMUX LPSPI1 (TRGMUX_LPSPI1) 11.4.2.20.1 Address Register Offset TRGMUX_LPSPI1 40062060h TRGMUX Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 172
This read/write bit field is used to configure the MUX select for peripheral trigger input 0. Refer to the Select Bit Fields table in the Features section for bit field information. 11.4.2.21 TRGMUX LPTMR0 (TRGMUX_LPTMR0) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 173
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 174
This read-only bit field is reserved and always has the value 0. — 29-24 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 175
Select Bit Fields table in the Features section for bit field information. 11.4.2.23 TRGMUX PWT (TRGMUX_PWT) 11.4.2.23.1 Address Register Offset TRGMUX_PWT 4006206Ch TRGMUX Register 11.4.2.23.2 Diagram Bits Rese Reserved Reserved Reserved rved Reset Bits Reserved Reserved Reserved SEL0 Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CPU, which is also useful when CPU is in WAIT/STOP mode. The following are some typical use-cases for TRGMUX. 11.5.1 ADC Trigger Source The following triggers are via the TRGMUX: • CMP out to trigger each ADC Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For details, please refer to “Window Mode” section in the CMP chapter. 11.5.3 FTM Fault Detection Input / Hardware Triggers and Synchronization Please refer to the FTM chapter for more details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• The first four channels additionally provide a trigger functionality. • Each channel router can be assigned to one of the possible peripheral DMA slots or to one of the always-on slots. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DMA channel. (Normal mode) Triggering is enabled. If triggering is enabled and ENBL is set, the DMAMUX is in Periodic Trigger mode. SOURCE DMA Channel Source (Slot) Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Because of the dynamic nature of the system (due to DMA channel priorities, bus arbitration, interrupt service routine lengths, etc.), the number of clock cycles between a trigger and the actual DMA transfer cannot be guaranteed. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 186
This means that if a trigger is seen, but the peripheral is not requesting a transfer, then that trigger will be ignored. This situation is illustrated in the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
12.5.2 DMA channels with no triggering capability The other channels of the DMAMUX provide the normal routing functionality as described in Modes of operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DMA registers after every minor loop. For this option, the DMA channel must be disabled in the DMA channel MUX. • Use an always-enabled DMA source. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DMA channels that have triggering capability. To configure source #5 transmit for use with DMA channel 1, with periodic triggering capability: 1. Write 0x00 to CHCFG1. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Local memory containing transfer control descriptors for each of the 8 channels 13.1.1 eDMA system block diagram Figure 13-1 illustrates the components of the eDMA system, including the eDMA module ("engine"). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
After the minor loop completes execution, the address path hardware writes Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The eDMA module features: • All data movement via dual-address transfers: read from source, write to destination • Programmable source and destination addresses and transfer size • Support for enhanced addressing modes Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In Normal mode, the eDMA transfers data between a source and a destination. The source and destination can be a memory block or an I/O block capable of operation with the eDMA. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0, channel 1, ... channel 7. Each TCDn definition is presented as 11 registers of 16 or 32 bits. 13.3.2 TCD initialization Prior to activating a channel, you must initialize its TCD with the appropriate transfer profile. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(from high to low channel number) without regard to priority. NOTE For correct operation, writes to the CR register must be performed only when the DMA channels are inactive; that is, when TCDn_CSR[ACTIVE] bits are cleared. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 205
When minor loop mapping is disabled (EMLM is 0), all 32 bits of TCDn word2 are assigned to the NBYTES field. Address: 4000_8000h base + 0h offset = 4000_8000h Reserved Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 206
The individual enable fields allow the minor loop offset to be applied to the source address, the destination address, or both. The NBYTES field is reduced when either offset is enabled. Continuous Link Mode Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• A cancel transfer with error bit that will be set when a transfer is canceled via the corresponding cancel transfer control bit Fault reporting and handling for more details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 208
No source offset configuration error The last recorded error was a configuration error detected in the TCDn_SOFF field. TCDn_SOFF is inconsistent with TCDn_ATTR[SSIZE]. Destination Address Error Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The state of the DMA enable request flag does not affect a channel service request made explicitly through software or a linked channel request. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 210
The DMA request signal for the corresponding channel is enabled Enable DMA Request 0 ERQ0 The DMA request signal for the corresponding channel is disabled The DMA request signal for the corresponding channel is enabled Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The error signal for corresponding channel does not generate an error interrupt The assertion of the error signal for corresponding channel generates an error interrupt request Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clear All Enable Error Interrupts CAEE Clear only the EEI bit specified in the CEEI field Clear all bits in EEI 5–3 This field is reserved. Reserved Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Set only the EEI bit specified in the SEEI field. Sets all bits in EEI 5–3 This field is reserved. Reserved SEEI Set Enable Error Interrupt Sets the corresponding bit in EEI Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clear only the ERQ bit specified in the CERQ field Clear all bits in ERQ 5–3 This field is reserved. Reserved CERQ Clear Enable Request Clears the corresponding bit in ERQ. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Set only the ERQ bit specified in the SERQ field Set all bits in ERQ 5–3 This field is reserved. Reserved SERQ Set Enable Request Sets the corresponding bit in ERQ. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clears only the TCDn_CSR[DONE] bit specified in the CDNE field Clears all bits in TCDn_CSR[DONE] 5–3 This field is reserved. Reserved CDNE Clear DONE Bit Clears the corresponding bit in TCDn_CSR[DONE] Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Set only the TCDn_CSR[START] bit specified in the SSRT field Set all bits in TCDn_CSR[START] 5–3 This field is reserved. Reserved SSRT Set START Bit Sets the corresponding bit in TCDn_CSR[START] Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clear only the ERR bit specified in the CERR field Clear all bits in ERR 5–3 This field is reserved. Reserved CERR Clear Error Indicator Clears the corresponding bit in ERR Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clear only the INT bit specified in the CINT field Clear all bits in INT 5–3 This field is reserved. Reserved CINT Clear Interrupt Request Clears the corresponding bit in INT Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Interrupt Request 6 INT6 The interrupt request for corresponding channel is cleared The interrupt request for corresponding channel is active Interrupt Request 5 INT5 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
A zero in any bit position has no affect on the corresponding channel’s current error status. The CERR is provided so the error indicator for a single channel can easily be cleared. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 222
An error in this channel has not occurred An error in this channel has occurred Error In Channel 0 ERR0 An error in this channel has not occurred An error in this channel has occurred Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
A hardware service request for channel 6 is not present A hardware service request for channel 6 is present Hardware Request Status Channel 5 HRS5 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 224
Present on the Channel. After the Request is completed and Channel is free, the HRS bit is automatically cleared by hardware. A hardware service request for channel 0 is not present A hardware service request for channel 0 is present Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Channel priority when fixed-priority arbitration is enabled NOTE: Reset value for the channel priority field, CHPRI, is equal to the corresponding channel number for each priority register, that is, DCHPRI7[CHPRI] = 0b111. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
= Undefined at reset. DMA_TCDn_SOFF field descriptions Field Description SOFF Source address signed offset Sign-extended offset applied to the current source address to form the next-state value as each source read is completed. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The eDMA defaults to privileged data access for all transactions. 8-bit 16-bit 32-bit Reserved 16-byte 32-byte Reserved Reserved 7–3 Destination Address Modulo DMOD See the SMOD definition DSIZE Destination data transfer size See the SSIZE definition Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Which register to use depends on whether minor loop mapping is disabled, enabled but not used for this channel, or enabled and used. TCD word 2 is defined as follows if: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 230
After the minor count is exhausted, the SADDR and DADDR values are written back into the TCD memory, the major iteration count is decremented and restored to the TCD memory. If the major iteration count is completed, additional processing is performed. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The minor loop offset is applied to the SADDR Destination Minor Loop Offset enable DMLOE Selects whether the minor loop offset is applied to the destination address upon minor loop completion. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Address: 4000_8000h base + 1016h offset + (32d × i), where i=0d to 7d Read ELINK LINKCH CITER Write Reset Read CITER Write Reset * Notes: • x = Undefined at reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 234
NOTE: When the CITER field is initially loaded by software, it must be set to the same value as that contained in the BITER field. NOTE: If the channel is configured to execute a single service request, the initial values of BITER and CITER should be 0x0001. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
NOTE: When the CITER field is initially loaded by software, it must be set to the same value as that contained in the BITER field. NOTE: If the channel is configured to execute a single service request, the initial values of BITER and CITER should be 0x0001. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Address: 4000_8000h base + 101Ch offset + (32d × i), where i=0d to 7d Read MAJORLINKCH Write Reset Read ACTIVE MAJORELI DONE DREQ INTHALF INTMAJOR START Write Reset * Notes: • x = Undefined at reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 237
32-byte data structure loaded as the transfer control descriptor into the local memory. NOTE: To support the dynamic scatter/gather coherency model, this field is forced to zero when written to while the TCDn_CSR[DONE] bit is set. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 238
If this flag is set, the channel is requesting service. The eDMA hardware automatically clears this flag after the channel begins execution. The channel is not explicitly started. The channel is explicitly started via a software initiated service request. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CITER field. As the major iteration count is exhausted, the contents of this field are reloaded into the CITER field. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
NOTE: When the software loads the TCD, this field must be set equal to the corresponding CITER field; otherwise, a configuration error is reported. As the major iteration count is exhausted, the Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Descriptor (TCD) eDMA Engine Program Model/ Read Data Channel Arbitration Read Data Address Path Control Data Path Write Data Address eDMA Peripheral eDMA Done Request Figure 13-2. eDMA operation, part 1 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 242
Descriptor (TCD) eDMA Engine Program Model/ Read Data Channel Arbitration Read Data Address Path Control Data Path Write Data Address eDMA Peripheral eDMA Done Request Figure 13-3. eDMA operation, part 2 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 243
En g in e Program Model/ Read Data Channel Arbitration Read Data Address Path Control Data Path Write Data Address eDMA Peripheral eDMA Done Request Figure 13-4. eDMA operation, part 3 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Once all of the channel priorities are set to unique numbers, the DMA may be enabled again by clearing the Halt bit. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 245
The cancel transfer bit does not abort the channel. It simply stops the transferring of data and then retires the channel through its normal shutdown sequence. The application Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
These low priority channels can be configured to not preempt each other, thus preventing a low priority channel from consuming the preempt slot normally available to a true, high priority channel. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
66.7 53.3 83.3 MHz, 32 bit 166.7 83.3 66.7 100.0 MHz, 32 bit 200.0 100.0 80.0 133.3 MHz, 32 bit 266.7 133.3 106.7 150.0 MHz, 32 bit 300.0 150.0 120.0 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 248
The last part of the TCD is read in. This cycle represents the first data phase for the read, and the address phase for the destination write. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 249
A general formula to compute the peak request rate with overlapping requests is: PEAKreq = freq / [ entry + (1 + read_ws) + (1 + write_ws) + exit ] where: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 250
• 11 cycles for a software, that is, a TCDn_CSR[START] bit, request • 12 cycles for a hardware, that is, an eDMA peripheral request signal, request Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The eDMA engine reads the entire TCD, including the TCD control and status fields, as shown in the following table, for the selected channel into its internal address path module. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 252
(BITER). Current major loop iteration Source or destination memory count (CITER) DMA request DMA request DMA request Figure 13-5. Example of multiple loop iterations Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The hardware service request handshake signals, error interrupts, and error reporting is associated with the selected channel. 13.5.3 Arbitration mode considerations This section discusses arbitration considerations for the eDMA. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
TCDn_DOFF = 4 TCDn_ATTR[DSIZE] = 2 TCDn_DLAST_SGA= –16 TCDn_CSR[INT_MAJ] = 1 TCDn_CSR[START] = 1 (Should be written last after all other fields have been initialized) All other TCDn fields = 0 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 255
TCDn_CITER = 1 (TCDn_BITER). 7. The eDMA engine writes: TCDn_CSR[ACTIVE] = 0, TCDn_CSR[DONE] = 1, INT[n] = 1. 8. The channel retires and the eDMA goes idle or services the next channel. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 256
Write 32-bits to location 0x200C → last iteration of the minor loop. 6. eDMA engine writes: TCDn_SADDR = 0x1010, TCDn_DADDR = 0x2010, TCDn_CITER = 1. 7. eDMA engine writes: TCDn_CSR[ACTIVE] = 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 257
TCDn_CITER = 2 (TCDn_BITER). 15. eDMA engine writes: TCDn_CSR[ACTIVE] = 0, TCDn_CSR[DONE] = 1, INT[n] = 16. The channel retires → major loop complete. The eDMA goes idle or services the next channel. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Polling the TCDn_CSR[ACTIVE] bit may be inconclusive, because the active status may be missed if the channel execution is short in duration. The TCD status bits execute the following sequence for a software activated channel: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 259
DADDR, and NBYTES, which decrement to zero as the transfer progresses, can give an indication of the progress of the transfer. All other values are read back from the TCD local memory. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1. Minor loop done → set TCD12_CSR[START] bit 2. Minor loop done → set TCD12_CSR[START] bit 3. Minor loop done → set TCD12_CSR[START] bit 4. Minor loop done, major loop done→ set TCD7_CSR[START] bit Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1. Switch to Round-Robin Channel Arbitration mode, change the channel priorities, then switch back to Fixed Arbitration mode, 2. Disable all the channels, change the channel priorities, then enable the appropriate channels. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 262
TCD is fetched from system memory and loaded into that channel’s descriptor location in eDMA programmer’s model, thus replacing the current descriptor. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 263
(written in the next step) instead of a dlast final offest value. 3. Write the TCD.dlast_sga field with the scatter/gather address. 4. Write 1b to the TCD.e_sg bit. 5. Read back the 16 bit TCD control/status field. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 264
If e_sg = 0b and the dlast_sga did not change, the attempted dynamic link did not succeed (the channel was already retiring). If e_sg = 0b and the dlast_sga changed, the dynamic link attempt was successful (the new TCD’s e_sg value cleared the e_sg bit). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DMA_HRS[HRSn] is 0 for the appropriate channel. If no service request is present, disable the DMA channel by clearing the channel’s ERQ bit. If a service request is present, wait until the request has been processed and the HRS bit reads zero. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Using DMA for pulse counting on Kinetis • Using DMA and GPIO to emulate timer functionality on Kinetis Family devices • Using DMA to Emulate ADC Flexible Scan Mode on Kinetis K Series Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
4G bytes (32-bit address) contiguous memory space. This chapter describes the memory and peripheral locations within that memory space. The following figure shows the system memory and peripheral locations. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The following table shows the high-level device memory map. This map provides the complete architectural address space definition for the various sections. Based on the physical sizes of the memories and peripherals, the actual address regions used may be smaller. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 271
Cortex-M0+ core only 0xF000_3000–0xF000_3FFF Miscellaneous Control Module (MCM) Cortex-M0+ core only 0xF000_4000–0xF000_4FFF Memory Mapped Divide and Square Root (MMDVSQ) Cortex-M0+ core only 0xF000_5000–0xF7FF_FFFF Reserved – Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
A 32-bit read in the alias region returns either: • a value of 0x0000_0000 to indicate the target bit is clear • a value of 0x0000_0001 to indicate the target bit is set Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The peripheral memory map is accessible via a crossbar slave port and the AIPS peripheral bridge. The peripheral bridge converts register access from AHB bus domain to peripheral bus domain. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 276
Peripheral Clock Control (PCC) 0x4006_6000 Low Power I C (LPI C 0) 0x4006_7000 Low Power I C (LPI C 1) 0x4006_8000 — 0x4006_9000 — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Table 14-3. PPB memory map System 32-bit Address Range Resource Additional Range Detail Resource 0xE000_0000–0xE000_DFFF Reserved 0xE000_E000–0xE000_EFFF System Control Space 0xE000_E000–0xE000_E00F Reserved (SCS) 0xE000_E010–0xE000_E0FF SysTick 0xE000_E100–0xE000_ECFF NVIC Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 278
Table 14-3. PPB memory map (continued) System 32-bit Address Range Resource Additional Range Detail Resource 0xE000_ED00–0xE000_ED8F System Control Block 0xE000_ED90–0xE000_EDEF Reserved 0xE000_EDF0–0xE000_EEFF Debug 0xE000_EF00–0xE000_EFFF Reserved 0xE000_F000–0xE00F_EFFF Reserved 0xE00F_F000–0xE00F_FFFF Core ROM Space (CRS) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• For any power mode where the program flash memory or FlexMemory cannot be accessed, the FAU is disabled. 15.1.3 External signal description The FAU has no external (off-chip) signals. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(FAU) is the interface between the flash memory blocks and the system. In a typical configuration, the core and system bus clock speeds are clock significantly faster than the flash memory clock. The FAU includes features designed to accelerate flash accesses. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This can be changed so that only instructions or only data accesses initiate a speculative prefetch. Instruction only prefetching might be desired if random data accesses are mixed in with mostly sequential instruction accesses to the same bank of flash. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 282
0-1 or ways 0-2 are dedicated for instructions and remaining ways are used for data. NOTE The FAU registers should not be modified while accessing the flash. It is recommended executing any code that modifies the FAU settings from the on-chip SRAM. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• FlexRAM for high-endurance data store or traditional RAM Flash memory is ideal for single-supply applications, permitting in-the-field erase and reprogramming operations without the need for any external high voltage power sources. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Section programming for faster bulk programming times • Read access to the program flash block is possible while programming or erasing data in the data flash block or FlexRAM Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 285
• When configured for traditional RAM: • Read and write access possible to the FlexRAM while programming or erasing data in the program or data flash memory Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Data flash sector — The data flash sector is the smallest portion of the data flash memory that can be erased. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 287
EEPROM, valid writes to the FlexRAM generates a new EEPROM backup data record stored in the EEPROM backup flash memory. FTFE Module — All flash blocks plus a flash management unit providing high-level control and an interface to MCU buses. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Secure — An MCU state conveyed to the FTFE module as described in the Chip Configuration details for this device. In the secure state, reading and changing NVM contents is restricted. 16.3 External signal description The FTFE module contains no signals that connect off-chip. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The Program Once field can be read any number of times. This section of the program flash 0 IFR is accessed in 8 byte records using the Read Once and Program Once commands (see Read Once Command Program Once command). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 291
'1' = FlexRAM is loaded with valid EEPROM data during the flash reset sequence This read-only bitfield is reserved and each bit will always read as one. EEESPLIT Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 292
= Unimplemented or Reserved Table 16-4. FlexNVM partition code field description Field Description This read-only bitfield is reserved and must always be written as one. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CCIF. During this initialization period the user may write any register. All register writes are also disabled (except for registers FCNFG and FSTAT) whenever an erase suspend request is active (FCNFG[ERSSUSP]=1). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 294
Undefined 16.4.4.6/ 4002_0013 Program Flash Protection Registers (FTFE_FPROT0) Undefined 16.4.4.7/ 4002_0016 EEPROM Protection Register (FTFE_FEPROT) Undefined 16.4.4.8/ 4002_0017 Data Flash Protection Register (FTFE_FDPROT) Undefined Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 295
The FSTAT register reports the operational status of the FTFE module. The CCIF, RDCOLERR, ACCERR, and FPVIOL bits are readable and writable. The MGSTAT0 bit is read only. The unassigned bits read 0 and are not writable. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 296
The FPVIOL bit is cleared by writing a 1 to FPVIOL while CCIF is set. Writing a 0 to the FPVIOL bit has no effect. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 297
Read collision error interrupt enabled. An interrupt request is generated whenever an FTFE read collision error is detected (see the description of FSTAT[RDCOLERR]). Erase All Request ERSAREQ Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 298
• reads from the FlexRAM return data previously written to the FlexRAM in EEPROM mode and • writes launch an EEPROM operation to store the written data in the FlexRAM and EEPROM backup Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 299
When the SEC field is set to unsecure, the FSLACC setting does not matter. Factory access granted Factory access denied Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 300
Field Description Nonvolatile Option These bits are loaded from flash to this register at reset. Refer to the device's Chip Configuration details for the definition and use of these bits. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 301
Flash address [15:8] Flash address [7:0] Data Byte 0 Data Byte 1 Data Byte 2 Data Byte 3 Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 302
To change the program flash protection that is loaded during the reset sequence, unprotect the sector of program flash memory that contains the Flash Configuration Field. Then, reprogram the program flash protection byte. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 303
Unprotected regions can be changed by writing to the FlexRAM. Address: 4002_0000h base + 16h offset = 4002_0016h Read EPROT Write Reset * Notes: • x = Undefined at reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 304
Unprotected regions can be changed by both program and erase operations. Address: 4002_0000h base + 17h offset = 4002_0017h Read DPROT Write Reset * Notes: • x = Undefined at reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 305
The eight XACC registers allow up to 64 restricted segments of equal memory size. Execute-only access register Program flash execute-only access bits XACCH0 XA[63:56] XACCH1 XA[55:48] XACCH2 XA[47:40] XACCH3 XA[39:32] XACCL0 XA[31:24] XACCL1 XA[23:16] XACCL2 XA[15:8] XACCL3 XA[7:0] Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 306
The eight SACC registers allow up to 64 restricted segments of equal memory size. Supervisor-only access register Program flash supervisor-only access bits SACCH0 SA[63:56] SACCH1 SA[55:48] Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 307
= Undefined at reset. FTFE_SACCn field descriptions Field Description Supervisor-only access control Associated segment is accessible in supervisor mode only Associated segment is accessible in user or supervisor mode Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 308
The flash access segment number register provides the number of program flash segments that are available for XACC and SACC permissions. All bits in the register are read-only. The contents of this register are loaded during the reset sequence. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Individual regions within the flash memory can be protected from program and erase operations. Protection is controlled by the following registers: • FPROTn — Four registers protect 32 regions of the program flash memory as shown in the following figure Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 310
EEPROM backup Last FlexNVM address Figure 16-3. Data flash protection (2 data flash sizes) • FEPROT — Protects eight regions of the EEPROM memory as shown in the following figure Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Access is controlled by the following registers: • FXACC — • eight registers control 64 segments of the program flash memory as shown in the following figure Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Program flash size / 64 SACCH0[SA62] Program flash size / 64 SACCH0[SA63] Last program flash address Figure 16-6. Program flash supervisor access control 16.5.3 FlexNVM Description This section describes the FlexNVM memory. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 313
16-2). The remainder of the FlexRAM not used for EEPROM is not accessible while the FlexRAM is configured for EEPROM (see Set FlexRAM Function command). The EEPROM partition grows upward from the bottom of the FlexRAM address space. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 314
EEPROM data records is copied to the FlexRAM. After the CCIF bit is set, the FlexRAM is available for read or write access. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 315
• EEPROM — allocated FlexNVM based on DEPART; entered with the Program Partition command • EEESIZE — allocated FlexRAM based on DEPART; entered with the Program Partition command • Write_efficiency — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The block arbitration logic detects any simultaneous access and reports this as a read collision error (see the FSTAT[RDCOLERR] bit). 16.5.7 Read while write (RWW) The following simultaneous accesses are allowed: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTFE commands are specified using a command write sequence illustrated in Figure 16-10. The FTFE module performs various checks on the command (FCCOB) content and continues with command execution if all requirements are fulfilled. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 319
Program and erase commands also check the address to determine if the operation is requested to execute on protected areas. If the protection check fails, the FSTAT[FPVIOL] (protection error) flag is set. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 320
FCCOB and FSTAT registers. 4. The FTFE sets the FSTAT[CCIF] bit signifying that the command has completed. The flow for a generic command write sequence is illustrated in the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 321
Program flash 0 Data flash FlexRAM Function 0x00 Read 1s Block × × Verify that a program flash or data flash block is erased. FlexNVM Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 322
IFR are erased then release MCU security. 0x41 Read Once Read 8 bytes of a dedicated 64 byte field in the program flash 0 IFR. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 323
0x4B Erase All Execute- Erase all program only Segments flash execute-only (XA) segments then release flash access control. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 324
FlexRAM Erase Erase Program Program Read Flash Read Flash Read E-Write R-Write Phrase Phrase Sector Sector Read Program Program Phrase flash Erase Flash Sector Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The 'user' and 'factory' levels become, in effect, a minimum safety margin; i.e. if the reads pass at the tighter tolerances of the 'user' and 'factory' margins, then the 'normal' reads have at least this much safety margin before they experience data loss. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The FTFE may return invalid data to the MCU with the collision error flag (FSTAT[RDCOLERR]) set. When required by the command, address bit 23 selects between program flash memory (=0) and data flash memory (=1). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 327
Table 16-9. Read 1s Block Command Error Handling Error Condition Error Bit Command not available in current mode/security FSTAT[ACCERR] An invalid margin choice is specified FSTAT[ACCERR] Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 328
Margin Level Description 0x00 Use the 'normal' read level for 1s 0x01 Apply the 'User' margin to the normal read-1 level 0x02 Apply the 'Factory' margin to the normal read-1 level Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 329
FCCOB. If the comparison at margin-0 fails, the MGSTAT0 bit will be set. The CCIF flag will set after the Program Check operation has completed. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 330
The Version ID field contains an 8 byte code that indicates a specific FTFE implementation. Table 16-16. Read Resource Command FCCOB Requirements FCCOB Number FCCOB contents [7:0] 0x03 (RDRSRC) Flash address [23:16] Flash address [15:8] Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 331
Flash address is not 64-bit aligned FSTAT[ACCERR] 16.5.11.5 Program Phrase command The Program Phrase command programs eight previously-erased bytes in the program flash memory or in the data flash memory using an embedded algorithm. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 332
• Byte 1 data is programmed to byte address start+0b01, • Byte 2 data is programmed to byte address start+0b10, and • Byte 3 data is programmed to byte address start+0b11, etc. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 333
Program flash is selected and the address is out of program flash range FSTAT[ACCERR] Data flash is selected and the address is out of data flash range FSTAT[ACCERR] Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 334
Blocks, Erase All Blocks Unsecure or the Read 1s All Blocks command has not successfully FSTAT[FPVIOL] completed since the last reset Any errors have been encountered during the verify operation FSTAT[MGSTAT0] Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 335
The user may choose to abort a suspended Erase Flash Sector operation by clearing the ERSSUSP bit prior to clearing CCIF for the next command launch. When a suspended operation is aborted, the FTFE starts the new command using the new FCCOB contents. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 336
Data in this sector is not reliable until a new erase command fully completes. The following figure shows how to suspend and resume the Erase Flash Sector operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 337
ERSSCR Suspended Resume Erase? ERSSUSP: Bit in FCNFG register No, Abort SUSPACK: Internal Suspend Acknowledge Clear ERSSUSP User Cmd Interrupt/Suspend Figure 16-11. Suspend and Resume of Erase Flash Sector Operation Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 338
After the Program Section operation has completed, the CCIF flag will set and normal access to the FlexRAM is restored. The contents of the Section Program Buffer are not changed by the Program Section operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 339
6. To program additional flash sectors, repeat steps through 5. 7. To restore EEPROM functionality, execute the Set FlexRAM Function command to make the FlexRAM available for EEPROM. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 340
Table 16-29. Read 1s All Blocks Command Error Handling Error Condition Error Bit Command not available in current mode/security FSTAT[ACCERR] An invalid margin choice is specified FSTAT[ACCERR] Read-1s fails FSTAT[MGSTAT0] Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 341
IFR (see Program flash 0 IFR map Program Once field). Access to the Program Once field is via 12 records, each 8 bytes long. The Program Once field can be Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 342
Any errors have been encountered during the verify operation. FSTAT[MGSTAT0] 1. If a Program Once record is initially programmed to 0xFFFF_FFFF_FFFF_FFFF, the Program Once command is allowed to execute again on that same record. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 343
Any errors have been encountered during the verify operation FSTAT[MGSTAT0] 1. User margin read may be run using the Read 1s All Blocks command to verify all bits are erased. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 345
FSEC[SEC] field to the unsecure state, the security byte (see Flash configuration field description) is programmed to the unsecure state by the Erase All Blocks Unsecure command, and the Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 346
: • sets the read margin for 1s according to Table 16-41, • checks the contents of the program flash execute-only segments are in the erased state. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 347
Read 1s All Execute-only Segments command is executed and fails with the FSTAT[MGSTAT0] bit set. The Erase All Execute-only Segments command aborts if Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 348
FlexRAM load during reset option (only bit 0 used): 0 - FlexRAM loaded with valid EEPROM data during reset sequence 1 - FlexRAM not loaded during reset sequence Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 349
IFR using the values provided. The Program Partition command also verifies that the partition codes read back correctly after programming. The CCIF flag is set after the Program Partition operation completes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 350
16-50) Table 16-50. FlexRAM Function Control FlexRAM Function Action Control Code Make FlexRAM available as RAM: 0xFF • Clear the FCNFG[RAMRDY] and FCNFG[EEERDY] flags Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FSTAT[ACCERR] FlexRAM Function Control Code is not defined FSTAT[ACCERR] FlexRAM Function Control Code is set to make the FlexRAM available for EEPROM, but FSTAT[ACCERR] FlexNVM is not partitioned for EEPROM Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If the keys match, the FSEC[SEC] bits are changed to unsecure the MCU. The entire 8-byte key cannot be all 0s or all 1s, i.e. 0x0000_0000_0000_0000 and 0xFFFF_FFFF_FFFF_FFFF are not accepted by the Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 353
Access Key command) can be run which allows the user to present prospective keys for comparison to the stored keys. If the keys match, the FSEC[SEC] bits are changed to Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
On each system reset the FTFE module executes a sequence which establishes initial values for the flash block configuration parameters, FPROT, FDPROT, FEPROT, FOPT, FSEC, FXACC, FSACC, and FACNFG registers and the FCNFG[RAMRDY, EEERDY] bits. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Using the Kinetis Family Enhanced EEPROM Functionality • Robust Over-the-Air Firmware Updates Using Program Flash Memory Swap on Kinetis Microcontrollers • Using the Kinetis Flash Execute-Only Access Control Feature Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Various modules have module-specific clocks that can be generated from the FIRC_CLK, SIRC_CLK, SOSC_CLK, FLL_CLK clock. In addition, there are various other module-specific clocks that have other alternate sources. While clock selection for Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
SYS_CLK Clocks the Crossbar, NVIC, Flash controller, FTM and PDB, etc. SYS_CLK can run up to CORE_CLK and divided by DIVCORE bits inside SCG. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In default out of reset, the CPU is clocked from internal Fast IRC (IRC48M). The clocks, e.g. core clock and bus clock, are programmed via the SCG module. For the default reset value of divider, please refer to SCG chapter for details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The external clock are synchronized by FTM system clock (SYS_CLK). Therefore, to meet Nyquist criteria considering also jitter, the frequency of the external clock source must not exceed 1/4 of the system clock frequency. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The chosen clock must remain enabled if the LPTMR is to continue operating in all required low-power modes. 17.6.8 RTC Clocking Information The following figure shows the input clock sources available for this module. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
17.6.9 TSI Clocking Information This following figure shows the TSI clocks. SIM_FTMOPT0[FTMnCLKSEL] Peripheral Clocking - TSI TSI module PCC module SCG module Peripheral Interface Clock BUS_CLK SCG DIVSLOW PCC_TSI[CGC] Registers Main Clock (internal) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clock Distribution chapter. 18.1.1.1.1 SCG clock mode transitions The following figure shows the valid clock mode transitions supported by SCG, for this device. For more information, see the Functional description section. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 370
VLPRUN Valid SCS Modes SIRC SOSC Figure 18-1. SCG Valid Mode Transition Diagram 18.1.1.1.2 Clocking configuration on SCG The following figure shows the clocking configuration on SCG, for this device. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Either the slow or the fast clock can be selected as the clock source for the MCU system clocks • 2 programmable post-divider clock outputs for each IRC, which can be used as clock sources for other on-chip peripherals • System Crystal Oscillator: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Fast IRC Configuration Register (SCG_FIRCCFG) 0000_0000h 18.3.15/393 4006_430C Fast IRC Trim Configuration Register (SCG_FIRCTCFG) 0000_0000h 18.3.16/394 4006_4318 Fast IRC Status Register (SCG_FIRCSTAT) See section 18.3.17/395 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DIVPRES field: The reset value is controlled by which SCG System Dividers are used by Soc. • CLKPRES field: The reset value is controlled by which SCG Clock Sources are used by Soc. Please reference the Reference manual clocking chapter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
RUN mode or div-by-4 or div-by-8 when resetting into VLPR mode. SCG_CSR field descriptions Field Description 31–28 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 376
This read-only field is reserved and always has the value 0. DIVSLOW Slow Clock Divide Ratio 0000 Reserved 0001 Divide-by-2 0010 Divide-by-3 0011 Divide-by-4 0100 Divide-by-5 0101 Divide-by-6 0110 Divide-by-7 0111 Divide-by-8 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Fast IRC (FIRC_CLK) 0100 Reserved 0101 Low Power FLL (LPFLL_CLK) 0110 Reserved 0111 Reserved 1111 Reserved Reserved This field is reserved. This read-only field is reserved and always has the value 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This flag is reset on Chip POR only, software can also clear this flag by writing a logic one. System OSC Clock Monitor is disabled or has not detected an error System OSC Clock Monitor is enabled and detected an error Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 383
System OSC Stop Enable SOSCSTEN System OSC is disabled in Stop modes System OSC is enabled in Stop modes if SOSCEN=1. System OSC Enable SOSCEN Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clock divider 2 for System OSC. Used by modules that need an asynchronous clock source. Output disabled Divide by 1 Divide by 2 Divide by 4 Divide by 8 Divide by 16 Divide by 32 Divide by 64 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This bit is reserved. Software should write 0 to this bit field. 7–6 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 386
OSC (SOSC) into the SCG, thus either the crystal oscillator or from an external clock input External reference clock selected Internal crystal oscillator of OSC selected. Reserved This field is reserved. This read-only field is reserved and always has the value 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Slow IRC is not enabled or clock is not valid Slow IRC is enabled and output clock is valid Lock Register This bit field can be cleared/set at any time. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
15–11 This field is reserved. Reserved This read-only field is reserved and always has the value 0. 10–8 Slow IRC Clock Divide 2 SIRCDIV2 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The SIRCCFG register cannot be changed when the slow IRC clock is enabled. When the slow IRC clock is enabled, writes to this register are ignored, and there is no transfer error. Address: 4006_4000h base + 208h offset = 4006_4208h Reset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Slow IRC low range clock (2 MHz) Slow IRC high range clock (8 MHz ) 18.3.13 Fast IRC Control Status Register (SCG_FIRCCSR) Address: 4006_4000h base + 300h offset = 4006_4300h Reset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 391
Fast IRC is enabled in Stop modes Fast IRC Enable FIRCEN If this bit written during clock switching, it should be read back and confirmed before proceeding. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Clock divider 1 for Fast IRC. Used to generate the clock source for modules that need an asynchronous clock source. Output disabled Divide by 1 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
See chip-specific information for supported frequency ranges. Fast IRC is trimmed to 48 MHz Fast IRC is trimmed to 52 MHz Fast IRC is trimmed to 56 MHz Fast IRC is trimmed to 60 MHz Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. TRIMSRC Trim Source Configures the external clock source to tune the Fast IRC. TRMSRC must be configured before programming FIRCSTAT register for trim update Reserved Reserved System OSC Reserved Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FIRC is enabled and auto trimming is enabled (FIRCTREN=1 and FIRCTRUP=1), TRIMFINE register gets uploaded with the trimmed fine value. When FIRCTRUP=0, TRIMFINE register is writeable, to allow user programming of fine trim values. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Memory Map/Register Definition 18.3.18 Low Power FLL Control Status Register (SCG_LPFLLCSR) Address: 4006_4000h base + 500h offset = 4006_4500h Reset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 397
LPFLL Trim LOCK LPFLLTRMLOCK Asserts only when LPFLLTREN=1 and LPFLLTRUP=1 and LPFLL has locked to target frequency. LPFLL not Locked LPFLL trimmed and Locked Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This bit field is reserved. Software should write 0 to this bit field to maintain compatibility. 15–11 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
SCG_LPFLLCFG field descriptions Field Description 31–2 This field is reserved. Reserved This read-only field is reserved and always has the value 0. FSEL Frequency Select Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
LPFLL locks within 2LSB (0.8%) 15–13 This field is reserved. Reserved This read-only field is reserved and always has the value 0. 12–8 LPFLL Trim Predivide TRIMDIV Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Field Description 31–8 This field is reserved. Reserved This read-only field is reserved and always has the value 0. AUTOTRIM Auto Tune Trim Status Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• SOSCEN = 1 • SOSCVLD = 1 In SOSC mode, SCGCLKOUT and system clocks are derived from the external System Oscillator Clock (SOSC). Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 403
Stop recovery. Entering Stop mode, all SCG clock signals are static except the following clocks which can continue to run and stay enabled in the following cases: SIRCCLK is available in Normal Stop and VLPS mode when all the following conditions become true: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 404
SOSCLK is available in following low power stop modes (Normal Stop, VLPS) when all the below conditions are true. • SOSCCSR[SOSCEN] = 1 • SOSCCSR[SOSCSTEN] = 1 • SOSCCSR[SOSCLPEN] = 1 (required only for Low Power Stop modes (VLPS) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Automatic Gain Control (AGC) to optimize power consumption The RTC oscillator operations are described in detail in Functional Description 19.1.2 Block Diagram The following is the block diagram of the RTC oscillator. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
19.2.1 EXTAL32 — Oscillator Input This signal is the analog input of the RTC oscillator. 19.2.2 XTAL32 — Oscillator Output This signal is the analog output of the RTC oscillator module. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
RTC digital core. The oscillator includes an internal feedback resistor of approximately 100 MΩ between EXTAL32 and XTAL32. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Chapter 19 RTC Oscillator (OSC32) 19.6 Reset Overview There is no reset state associated with the RTC oscillator. 19.7 Interrupts The RTC oscillator does not generate any interrupts. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Stop, Doze, and Debug signals. 20.2.1 Features The PCC module enables software to configure the following clocking options for each peripheral: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 415
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 416
This read-only bit field is reserved and always has the value 0. — 26-24 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 417
Reset 20.4.1.4.3 Fields Field Function Enable This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 418
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.5 PCC ADC1 (PCC_ADC1) 20.4.1.5.1 Address Register Offset PCC_ADC1 4006509Ch PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 419
101 - Low-power FLL (LPFLL) clock. 110 - Reserved. 111 - Reserved. 23-4 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 420
This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. 1 - Peripheral is present. Clock Control This read/write bit enables the clock for the peripheral. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 421
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.7 PCC LPSPI1 (PCC_LPSPI1) 20.4.1.7.1 Address Register Offset PCC_LPSPI1 400650B4h PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 422
101 - Low-power FLL (LPFLL) clock. 110 - Reserved. 111 - Reserved. 23-4 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 423
This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. 1 - Peripheral is present. Clock Control This read/write bit enables the clock for the peripheral. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 424
This read-only bit field is reserved and always has the value 0. — 20.4.1.9 PCC PDB0 (PCC_PDB0) 20.4.1.9.1 Address Register Offset PCC_PDB0 400650D8h PCC Register 20.4.1.9.2 Diagram Bits INUS Reserved Reserved Reserved Reset Bits Rese Reserved Reserved rved Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 425
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.10 PCC LPIT0 (PCC_LPIT0) 20.4.1.10.1 Address Register Offset PCC_LPIT0 400650DCh PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 426
101 - Low-power FLL (LPFLL) clock. 110 - Reserved. 111 - Reserved. 23-4 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 427
This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. 1 - Peripheral is present. Clock Control This read/write bit enables the clock for the peripheral. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 428
This read-only bit field is reserved and always has the value 0. — 20.4.1.12 PCC FLEXTMR1 (PCC_FLEXTMR1) 20.4.1.12.1 Address Register Offset PCC_FLEXTMR1 400650E4h PCC Register 20.4.1.12.2 Diagram Bits INUS Reserved Reserved Reserved Reset Bits Rese Reserved Reserved rved Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 429
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.13 PCC FLEXTMR2 (PCC_FLEXTMR2) 20.4.1.13.1 Address Register Offset PCC_FLEXTMR2 400650E8h PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 430
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 431
1 - Peripheral is being used. Software cannot modify the existing clocking configuration. 28-27 This read-only bit field is reserved and always has the value 0. — 26-24 Peripheral Clock Source Select Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 432
This read-only bit field is reserved and always has the value 0. — 20.4.1.15 PCC RTC (PCC_RTC) 20.4.1.15.1 Address Register Offset PCC_RTC 400650F4h PCC Register 20.4.1.15.2 Diagram Bits INUS Reserved Reserved Reserved Reset Bits Reserved Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 433
This read-only bit field is reserved and always has the value 0. — 23-0 This read-only bit field is reserved and always has the value 0. — 20.4.1.16 PCC LPTMR0 (PCC_LPTMR0) 20.4.1.16.1 Address Register Offset PCC_LPTMR0 40065100h PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 434
011 - Fast IRC Clock. 100 - Reserved. 101 - Low-power FLL (LPFLL) clock. 110 - Reserved. 111 - Reserved. 23-0 This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 435
1 - Peripheral is being used. Software cannot modify the existing clocking configuration. 28-27 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 436
Reserved Reset Bits Rese Reserved Reserved rved Reset 20.4.1.18.3 Fields Field Function Enable This bit shows whether the peripheral is present on this device. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 437
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.19 PCC PORTB (PCC_PORTB) 20.4.1.19.1 Address Register Offset PCC_PORTB 40065128h PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 438
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 439
This read-only bit field is reserved and always has the value 0. — 26-24 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 440
Reset 20.4.1.21.3 Fields Field Function Enable This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 441
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.22 PCC PORTE (PCC_PORTE) 20.4.1.22.1 Address Register Offset PCC_PORTE 40065134h PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 442
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 443
This read-only bit field is reserved and always has the value 0. — 26-24 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 444
Reset 20.4.1.24.3 Fields Field Function Enable This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 445
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.25 PCC OSC32 (PCC_OSC32) 20.4.1.25.1 Address Register Offset PCC_OSC32 40065180h PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 446
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 447
This read-only bit field is reserved and always has the value 0. — 26-24 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 448
Reset 20.4.1.27.3 Fields Field Function Enable This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 449
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.28 PCC LPI2C1 (PCC_LPI2C1) 20.4.1.28.1 Address Register Offset PCC_LPI2C1 4006519Ch PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 450
101 - Low-power FLL (LPFLL) clock. 110 - Reserved. 111 - Reserved. 23-4 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 451
This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. 1 - Peripheral is present. Clock Control This read/write bit enables the clock for the peripheral. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 452
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.30 PCC LPUART1 (PCC_LPUART1) 20.4.1.30.1 Address Register Offset PCC_LPUART1 400651ACh PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 453
101 - Low-power FLL (LPFLL) clock. 110 - Reserved. 111 - Reserved. 23-4 This read-only bit field is reserved and always has the value 0. — Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 454
This bit shows whether the peripheral is present on this device. 0 - Peripheral is not present. 1 - Peripheral is present. Clock Control This read/write bit enables the clock for the peripheral. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 455
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — 20.4.1.32 PCC CMP0 (PCC_CMP0) 20.4.1.32.1 Address Register Offset PCC_CMP0 400651CCh PCC Register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 456
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 457
This read-only bit field is reserved and always has the value 0. — 26-24 This read-only bit field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 458
This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — This read-only bit field is reserved and always has the value 0. — Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The MCU exits reset in functional mode where the CPU is executing code. See Boot options for more details. The following figure shows a block diagram of the reset sources for this device. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
System reset begins with the on-chip regulator in full regulation and system clocking generation from an internal reference. When the processor exits reset, it performs the following: • Reads the start SP (SP_main) from vector-table offset 0 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 461
(POR) circuit and an LVD circuit. The LVD system can always be enabled in normal Run, or Wait mode. The LVD system is disabled (LVR active only) when entering VLPx modes or Stop mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 462
The SCG module contains a loss-of-lock detector, to indicate a reset has been caused by a loss of lock in the SCG PLL/FLL. NOTE This reset source does not cause a reset if the chip is in VLPR/ VLPW/VLPS mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Set the core hold reset bit in the MDM-AP control register to hold the core in reset as the rest of the chip comes out of system reset. 21.2.3 MCU Resets A variety of resets are generated by the MCU to reset different modules. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Chip Reset negates after the RESET_b pin is pulled high. Keeping the RESET_b pin asserted externally delays the negation of the internal Chip Reset. 21.3 Boot This section describes the boot sequence, including sources and options. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
MDM-AP register. RESET_b pin is dedicated. The port is configured with pullup enabled, open drain, passive filter enabled. NMI_DIS Enables/disables control for the NMI function. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 466
The boot source remains set until the next System Reset or software can write logic one to clear one or both of the mode bits. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
EEERDY flag. Subsequent system resets follow this same reset flow. The following figure shows the boot sequence. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Visit nxp.com/KPYW for more details. NOTE For this device, ROM does not check the flash FAC function. So it is not recommended to access memory protected by FAC via ROM. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This chapter describes Kinetis Bootloader features, functionality, command structure and which peripherals are supported. Features supported by the Kinetis Bootloader in Kinetis ROM: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Erase the entire flash array, including protected Supported sectors 22.3 Functional Description The following sub-sections describe the Kinetis Bootloader in ROM functionality. 22.3.1 Memory Maps While executing, the Kinetis Bootloader uses ROM and RAM memory. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Bitfield of peripherals to enable. bit 0 LPUART bit 1 LPI2C bit 2 LPSPI Kinetis bootloader will enable the peripheral if corresponding bit is set to Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 473
The tag value is treated as a character string, so bytes 0-3 must be set as shown in the table. Table 22-3. tag Configuration Field Offset tag Byte Value 'k' (0x6B) 'c' (0x63) 'f' (0x66) 'g' (0x67) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
'kcfg' value. If the tag is incorrect, then the configuration values are set to default, as if the data was all 0xFF bytes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 475
The flash sector containing the vector table should not be located in the execute-only region, because the Kinetis bootloader cannot read the PC and SP addresses in an execute-only region. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Alternate clock configurations are supported, by setting fields in the Bootloader Configuration Area (BCA) shown in Table 22-2. • If the HighSpeed flag of the clockFlags configuration value is cleared, the bootloader will enable the internal 48 MHz reference clock. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Example: code to get the entry pointer address from the ROM and start the bootloader. NOTE This entry must be called in supervisor (privileged) mode. // Variables Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Command/Data packet has processed. 22.3.6.1 Command with no data phase The protocol for a command with no data phase contains: • Command packet (from host) • Generic response command packet (to host) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 479
The protocol for a command with an incoming data phase contains: • Command packet (from host) • Generic response command packet (to host) • Incoming data packets (from host) • Generic response command packet (to host) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 480
• Data phases may be aborted by the receiving side by sending the final Generic Response early with a status of Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
A Ping packet must be sent before any other communications. In response to a Ping packet, the target sends a Ping Response packet. Table 22-5. Ping Packet Format Byte # Value Name 0x5A start byte 0xA6 ping Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 482
Byte # Value Parameter 0x5A start byte 0xA7 Ping response code Protocol bugfix Protocol minor Protocol major Protocol name = 'P' (0x50) Options low Options high CRC16 low CRC16 high Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 483
The framing packet contains a data packet payload. 0xA6 kFramingPacketType_Ping Sent to verify the other side is alive. Also used for UART autobaud. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 484
Table 22-12. Commands that are supported Command Name 0x01 FlashEraseAll 0x02 FlashEraseRegion 0x03 Reserved Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 485
The data transfer direction is determined by the last command sent from the host. The data packet is also wrapped within a framing packet, to ensure the correct packet data is received. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 486
The parameter count field in the header is set to greater than 1, to always include the status code and one or many property values. Table 22-15. GetPropertyResponse Parameters Byte # Value Parameter 0 - 3 Status code Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 491
0x5A packetType 0xA4, kFramingPacketType_Command length 0x0C 0x00 crc16 0x67 0x8D Command packet commandTag 0x0C – SetProperty with property tag 10 flags 0x00 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 492
The Command tag for FlashEraseAll command is 0x01 set in the commandTag field of the command packet. The FlashEraseAll command requires no parameters. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 493
22.3.8.6 FlashEraseRegion command The FlashEraseRegion command performs an erase of one or more sectors of the flash memory or a specified range of flash within the connected SPI flash devices. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 496
The backdoor low and high words are the only parameters required for FlashSecurityDisable command. Table 22-29. Parameters for FlashSecurityDisable Command Byte # Command 0 - 3 Backdoor key low word 4 - 7 Backdoor key high word Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 497
The WriteMemory command writes data provided in the data phase to a specified range of bytes in memory (flash or RAM). However, if flash protection is enabled, then writes to protected sectors will fail. Special care must be taken when writing to flash. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 498
The start address and number of bytes are the 2 parameters required for WriteMemory command. Table 22-31. Parameters for WriteMemory Command Byte # Command 0 - 3 Start address 4 - 7 Byte count Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The MCU ROM bootloader provides a flash driver API tree entry (flashDriver) that a user application can use to get the entry points for the whole flash API set that is supported by the bootloader. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For more code examples, get the latest Kinetis bootloader package at http:// www.nxp.com/KBOOT/ bootloader_tree_t* tree; // pointer points to bootloader tree flash_config_t flash_config; // variable used to keep runtime state of flash driver Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• FlexNVM device: FlexNVM memory total size • non-FlexNVM device: unused EEpromTotalSize • FlexNVM device: the size (in bytes) of the EEPROM area that was partitioned from FlexRAM • non-FlexNVM device: unused Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This section describes each function supported in the flash driver API. 22.4.5.1 FLASH_Init Checks and initializes the flash module for the other flash API functions. NOTE FLASH_Init must be always called before calling other API functions. Prototype: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 505
Config pointer is NULL. kStatus_FLASH_AccessError Command is not available under current mode/ security. kStatus_FLASH_ProtectionViolation Any region of the program flash memory is protected. kStatus_FLASH_EraseKeyError Key is incorrect. kStatus_Success This function has performed successfully. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 506
This function has performed successfully. Example: status_t status = FLASH_EraseAllUnsecure(&flashInstance, kFLASH_ApiEraseKey); 22.4.5.4 FLASH_Erase Erases expected flash sectors specified by parameters. For Kinetis devices, the minimum erase unit is one sector. Prototype: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 507
FLASH_Program(flash_config_t *config, uint32_t start, uint32_t *src, uint32_t lengthInBytes); Table 22-43. Parameters Parameter Description Config Pointer to flash_config_t data structure in memory, to store driver runtime state. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 508
Prototype: status_t FLASH_GetSecurityState(flash_config_t *config, flash_security_state_t *state); Table 22-45. Parameters Parameters Description Config Pointer to flash_config_t data structure in memory, to store driver runtime state. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 509
FLASH_SecurityBypass(flash_config_t *config, const uint8_t *backdoorKey); Table 22-48. Parameters Parameter Description Config Pointer to flash_config_t data structure in memory, to store driver runtime state. backdoorKey Pointer to the user buffer containing the backdoor key. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 510
• kFLASH_MarginValueNormal 0 • kFLASH_MarginValueUser 1 • kFLASH_MarginValueFactory 2 Table 22-51. Possible status response Value Constant Description kStatus_InvalidArgument Config or backdoorKey pointers are NULL. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 511
The start address of the desired flash memory to be verified. lengthInBytes The length, given in bytes (not words or long words) to be verified. Must be word-aligned. margin Read margin choice as follows: kFLASH_MarginValueNormal 0 kFLASH_MarginValueUser 1 kFLASH_MarginValueFactory 2 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 512
Command), and compares it with expected data for a given flash area (as determined by the start address and length). FLASH_VerifyProgram is often called after successfully doing FLASH_Program(). Prototype: status_t FLASH_VerifyProgram(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, const uint32_t *expectedData, Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 513
= FLASH_VerifyProgram (&flashInstance, 0x800, 8, &expectedData[0], kFlashMargin_User, NULL, NULL); NOTE For the choice of margin, see the FTFA chapter in the reference manual for detailed information. 22.4.5.11 FLASH_GetProperty Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 514
= FLASH_GetProperty (&flashInstance, kFLASH_PropertyPflashSectorSize, &propertyValue); 22.4.5.12 FLASH_ProgramOnce Programs a certain Program Once Field with the expected data for a given IFR region (as determined by the index and length). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 515
Assume the Program Once Field has not been programmed before. uint32_t expectedData = 0x78563412; status_t status = FLASH_ProgramOnce(&flashInstance, 0, &expectedData, 4); NOTE For the choice of index and length, see the FTFA chapter in RM for detailed information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 516
This function has performed successfully. Example: uint32_t temp; status_t status = FLASH_ReadOnce(&flashInstance, 0, &temp, 4); NOTE For the choice of index and length, see the FTFA chapter in RM for detailed information. 22.4.5.14 FLASH_ReadResource Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 517
This function has performed successfully. Example: uint32_t temp[256]; status_t status = FLASH_ReadResource(&flashInstance, 0, &temp[0], 256, 0); NOTE See the FTFA chapter in RM for detailed information regarding the start, length, and option choices. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The Kinetis Bootloader in ROM supports loading data into flash via the I2C peripheral, where the I2C peripheral serves as the I2C slave. A 7-bit slave address is used during the transfer. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 519
Read 1 byte packet from target Read 1 byte 0x7A 0x5A Report Error received? received? from target Figure 22-14. Host reads ping response from target via I2C Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Figure 22-16. Host reads response from target via I2C 22.5.2 SPI Peripheral The Kinetis Bootloader in ROM supports loading data into flash via the SPI peripheral, where the SPI peripheral serves as a SPI slave. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 521
"dummy" 0x00 bytes (which do not have framing packets). The following flowcharts demonstrate how the host reads a ping response, an ACK and a command response from target via SPI. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 522
Send 0x00 to 0x5A 0xA1 shift out 1 byte received? received? from target Report a Next action timeout error Figure 22-18. Host reads ACK from target via SPI Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(8-bit data, no parity bit and 1 stop bit). If the bytes of the ping packet are sent one-by-one with more than 80 ms delay between them, then the autobaud Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 524
Reached Wait for 1 byte 0x5A 0xA1 maximum received? received? from target retries? Report a timeout error Figure 22-20. Host reads an ACK from target via UART Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Table 22-67. Properties used by Get/SetProperty Commands, sorted by Value Property Writable Tag Value Size Description CurrentVersion Current bootloader version. AvailablePeripherals The set of peripherals supported on this chip. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 526
Identification registers (16 for K series devices, 12 for KL series devices) FacSupport FAC (Flash Access Control) support flag 0 - FAC not supported Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Reserved SPI Slave I2C Slave UART If the peripheral is available, then the corresponding bit will be set in the property value. All reserved bits must be set to 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Requested value cannot be changed because it is read-only. kStatus_OutOfRange Requested value is out of range. kStatus_InvalidArgument The requested command's argument is undefined. kStatus_Timeout A timeout occurred. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 529
The call command in the SB file failed. kStatusRomLdrKeyNotFound 10112 A matching key was not found in the SB file's key dictionary to unencrypt the section. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 530
CRC check is invalid, because the BCA is invalid or the CRC parameters are unset (all 0xFF bytes). kStatus_AppCrcCheckOutOfRange 10404 CRC check is valid but addresses are out of range. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
RCM implements many of the reset functions for the chip. See the chip's reset chapter for more information. AN4503: Power Management for Kinetis and ColdFire+ MCUs for further details on using the RCM. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Field Description 31–24 Major Version Number MAJOR This read only field returns the major version number for the specification. 23–16 Minor Version Number MINOR Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 533
Description This read only field returns the minor version number for the specification. FEATURE Feature Specification Number This read only field returns the feature set number. 0x0003 Standard feature set. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
31–17 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Existence of SRS[CORE1] status indication feature ECORE1 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 535
The feature is available. Existence of SRS[WDOG] status indication feature EWDOG This static bit states whether or not the feature is available on the device. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The reset value of this register depends on the reset source: • POR (including LVD) — 0x82 • LVD (without POR) — 0x02 • Other reset — a bit is set if its corresponding reset source caused the reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 537
Reset caused by peripheral failure to acknowledge attempt to enter stop mode This field is reserved. Reserved This read-only field is reserved and always has the value 0. MDM-AP System Reset Request MDM_AP Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 538
Indicates a reset has been caused by a loss of lock in the SCG PLL/FLL. Reset not caused by a loss of lock in the PLL/FLL Reset caused by a loss of lock in the PLL/FLL Loss-of-Clock Reset Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The bus clock filter is reset when disabled or when entering stop mode. The LPO filter is reset when disabled. Address: 4007_F000h base + Ch offset = 4007_F00Ch Reset RSTFLTSR RSTFLTSEL Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This register includes status flags to indicate the state of the mode pins during the last Chip Reset. Address: 4007_F000h base + 10h offset = 4007_F010h Reset BOOTROM Reset * Notes: • BOOTROM field: The reset state of this register depends on the boot mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
When either bit is set, will force boot from ROM during all subsequent system resets. No effect Force boot from ROM with RCM_MR[1] set. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Software can clear the status flags by writing a logic one to a flag. Address: 4007_F000h base + 18h offset = 4007_F018h Reset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 543
Reset caused by POR Sticky External Reset Pin SPIN Indicates a reset has been caused by an active-low level on the external RESET (RESET_b) pin. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The SRS updates only after the system reset occurs. NOTE This register is reset on Chip POR only, it is unaffected by other reset types. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 545
NOTE: The LOCKUP bit is useful only in devices with more than one core processor. Interrupt disabled. Interrupt enabled. This field is reserved. Reserved This read-only field is reserved and always has the value 0. Global Interrupt Enable Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 546
Reset Delay Time Configures the maximum reset delay time from when the interrupt is asserted and the system reset occurs. 10 LPO cycles 34 LPO cycles 130 LPO cycles 514 LPO cycles Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Following stated are general power modes, which are supported additionally by certain clocking mode options. Clock gating technique is used for general power modes and for the additional clocking mode options. Figure 24-1. Power Infrastructure Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
VLPS (Very Low Same as Stop mode, but PMC_REGSC register provides options to Sleep Deep Interrupt Power Stop)-via gate off unused modules and further reduce power in low power mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Wait mode refers to a power modes in which the CPU execution is halted. The core clock is gated off. The system clock continues to operate. Bus clocks, if enabled, continue to operate. Depending on the on-chip regulator settings, Wait mode has the following configurations: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The clock generators in the SCG and the on-chip regulator in the PMC also remain in Run (or VLP Run) mode. Exit from PSTOP2 can be initiated by a reset, an asynchronous Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 552
Stop mode and then requesting bus slaves to enter Stop mode. In STOP and VLPS modes, SCG and PMC would then also enter their appropriate modes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1.2V domain is powered by the PMC 1.2V regulator. It contains all digital logics and SRAM. Table 24-3. Module power domain summary VDD (5V) GPIOx (all ports) VDDA ADCx CMPx 3V CORE Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In run, wait, and stop modes active power regulation is enabled. The VLPx modes offer a lower power operating mode than normal modes. VLPR and VLPW are limited in frequency. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• System level wait and VLPW modes equate to: SLEEPING & SLEEPDEEP • All other low power modes equate to: SLEEPING & SLEEPDEEP When entering the non-wait modes, the chip performs the following sequence: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• static = Module register states and associated memories are retained. • powered = Memory is powered to retain contents. • low power = Memory is powered to retain contents in a lower power state Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 557
SRAM_L) FlexMemory low power low power low power low power Communication interfaces LPUART Async operation Async operation Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 558
3. CMP in stop or VLPS supports low speed external pin to pin or external pin to DAC compares. Windowed, sampled and filtered modes of operation are not available while in stop or VLPS modes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Flash Doze mode can be used to reduce power consumption, at the expense of a slightly longer wake-up when executing code and vectors from flash. It can also be used to reduce power consumption during Compute Operation when executing code and vectors from SRAM. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Functional in Stop mode Reset wakeup Touch sense wakeup Non-maskable interrupt 24.7 Power supply supervisor This device integrates the following power supervisor circuits: • Power-on reset (POR) • Low voltage detection (LVD) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 561
See PMC chapters for details. For more details on the POR/LVD reset and the LVW interrupt thresholds, see the electrical characteristics section in the Data Sheet. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Stop are the common terms used for the primary operating modes of Kinetis microcontrollers. The following table shows the translation between the Arm CPU modes and the Kinetis MCU power modes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 564
VLPS The core clock is gated off. System clocks to other masters and bus clocks are gated off after all stop acknowledge signals from supporting peripherals are valid. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Feature Specification Number This read only field returns the feature set number. 0x0000 Standard features implemented 25.3.2 SMC Parameter Register (SMC_PARAM) Address: 4007_E000h base + 4h offset = 4007_E004h Reset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For example, if the MCU is in normal RUN mode and AVLP is 0, an attempt to enter VLPR mode using PMCTRL[RUNM] is blocked and PMCTRL[RUNM] remains 00b, indicating the MCU is still in Normal Run mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 568
This field is reserved. Reserved This read-only field is reserved and always has the value 0. This field is reserved. Reserved This read-only field is reserved and always has the value 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
When written, causes entry into the selected run mode. Writes to this field are blocked if the protection level has not been enabled using the PMPROT register. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This register is reset on Chip POR and by reset types that trigger Chip POR. It is unaffected by reset types that do not trigger Chip POR. See the Reset section details for more information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 571
This bit is reserved for future expansion. Software should write 0 to this bit to maintain compatibility. Reserved This field is reserved. This read-only field is reserved and always has the value 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0000_0010 Current power mode is STOP. 0000_0100 Current power mode is VLPR. 0000_1000 Current power mode is VLPW. 0001_0000 Current power mode is VLPS. 0010_0000 Reserved 0100_0000 Reserved 1000_0000 Reserved 25.4 Functional description Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Interrupt or Reset STOP PMCTRL[RUNM]=00, PMCTRL[STOPM]=000 Sleep-now or sleep-on-exit modes entered with SLEEPDEEP set, which is controlled in System Control Register in Arm core. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PMCTRL[STOPM]=000 and STOPCTRL[PSTOPO]=01 or 10, then only a Partial Stop mode is entered instead of VLPS 25.4.2 Power mode entry/exit sequencing When entering or exiting low-power modes, the system must conform to an orderly sequence to manage transitions safely. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 575
Stop mode. 4. After all slaves have acknowledged they are ready to enter Stop mode, all system and bus clocks are gated off. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Halted state when the debugger has been enabled. As part of this transition, system clocking is re-established and is equivalent to the normal RUN and VLPR mode clocking configuration. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 577
In addition, do not modify the clock source in the SCG module or any clock divider registers. Module clock enables in the PCC can be set, but not cleared. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
To further reduce power in this mode, disable the clocks to unused modules. VLPR mode restrictions also apply to VLPW. When an interrupt from VLPW occurs, the device returns to VLPR mode to execute the interrupt service routine. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
A system reset will cause an exit from STOP mode, returning the device to normal RUN mode via an MCU reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• the SCG-generated clock source is enabled, • all system clocks, except the core clock, are disabled, • the debug module has access to core registers, and • access to the on-chip peripherals is blocked. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Low voltage reset (LVR) • Low voltage detect supporting two low voltage trip points and interrupt • Low power oscillator (LPO) with a typical frequency of 128 kHz 26.4 Modes of Operation Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If the supply voltage falls below the reset trip point (V ), a system reset will be generated. If PMC_LVDSC1[LVDRE] is set and the supply voltage falls below V , a system reset will be generated. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Each register's description provides details. NOTE The PMC registers can be written only in supervisor mode. Write accesses in user mode are blocked and will result in a bus error. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This write-only bit is used to acknowledge low voltage detection errors. Write 1 to clear LVDF. Read always return 0. Low Voltage Detect Interrupt Enable LVDIE Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Low-Voltage Warning Acknowledge LVWACK This write-only bit is used to acknowledge low voltage warning errors. Write 1 to clear LVWF. Reads always return 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Low power oscillator in low phase Low power oscillator in high phase 5–3 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 588
This read-only field is reserved and always has the value 0. LPOTRIM LPO trimming bits These bits are used for trimming the frequency of the low power oscillator. See the table above for trimming effect. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
MCU after presenting the correct backdoor key with Verify Backdoor Access Key command. The MEEN bit of FSEC byte can be used to disable the mass erase capability from debug port and the FlashEraseAllUnsecure command from ROM bootloader. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0x00 ~ 0x07. The data can no longer be erased nor modified after programming. The Program Once Field can be read through Read Once commands. Please refer to Program Once field section in the FTFE chapter for more details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 592
General security features Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Independent LPO_CLK clock source • Programmable time-out period specified in terms of number of EWM LPO_CLK clock cycles. • Windowed refresh option • Provides robust check that program flow is faster than expected. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
EWM refresh instructions. 28.1.2.2 Wait Mode The EWM module treats the stop and wait modes as the same. EWM functionality remains the same in both of these modes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
INEN, ASSIN and EWMEN bits can be written once after a CPU reset. Modifying these bits more than once, generates a bus transfer error. Address: 4006_1000h base + 0h offset = 4006_1000h Read INTEN INEN ASSIN EWMEN Write Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This fixed number of cycles is called EWM_refresh_time. 28.3.3 Compare Low Register (EWM_CMPL) The CMPL register is reset to zero after a CPU reset. This provides no minimum time for the CPU to refresh the EWM counter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Field Description COMPAREH To prevent runaway code from changing this field, software should write to this field after a CPU reset even if the (default) maximum refresh time is required. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The EWM_out is a digital output signal used to gate an external circuit (application specific) that controls critical safety functions. For example, the EWM_out could be connected to the high voltage transistors circuits that control an AC motor in a large appliance. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(setting the CTRL[INEN] bit), the EWM_in signal must be in the deasserted state prior to the CPU start refreshing the EWM. This ensures that the EWM_out stays in the deasserted state; otherwise, the EWM_out output signal is asserted. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
EWM Service Register. The CPU must access the EWM service register with correct write of unique data within the windowed time frame as determined by the CMPL and CMPH registers for correct EWM refresh operation. Therefore, three possible conditions can occur: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The divided clock used to run the EWM counter must be no more than half the frequency of the bus clock. 28.5 Usage Guide 28.5.1 EWM low-power modes This table shows the EWM low-power modes and the corresponding chip low-power modes. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The following code segment shows the refresh write sequence of the EWM module. // Refresh EWM DisableInterrupts; // disable global interrupt EWM_SERV= 0xB4; // write the 1st refresh words EWM_SERV= 0x2C; // write the 2nd refresh words EnableInterrupts; // enable global interrupt Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DBG WAIT STOP Reset WDOG_CS field descriptions Field Description 31–16 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 609
System oscillator clock (SOSC, from SCG) Slow internal reference clock (SIRC, from SCG) Watchdog Enable This write-once bit enables the watchdog counter to start counting. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 610
Stop Enable STOP This write-once bit enables the watchdog to operate when the chip is in stop mode. Watchdog disabled in chip stop mode. Watchdog enabled in chip stop mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The watchdog counter (CNT) is continuously compared with the timeout value (TOVAL). If the counter reaches the timeout value, the watchdog forces a reset triggering event. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
31–16 This field is reserved. Reserved This read-only field is reserved and always has the value 0. 15–8 High byte of Watchdog Window WINHIGH WINLOW Low byte of Watchdog Window Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Pass through 125 ns–8.1925 ms Internal 8 MHz (SIRC) ÷256 32 µs–2.09728 s 1 MHz (from bus or external) Pass through 1 µs–65.54 ms Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In addition, if window mode is used, software must not start the refresh sequence until after the time value set in the WIN register. See the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 615
The refresh write sequence can be • either two 16-bit writes ( 0xA602, 0xB480) or four 8-bit writes (0xA6, 0x02, 0xB4, 0x80) if WDOG_CS[CMD32EN] is 0; • one 32-bit write (0xB480_A602) if WDOG_CS[CMD32EN] is 1. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Conversely, if CS[UPDATE] remains 0, the only way to reconfigure the watchdog is by initiating a reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
WDOG logic loses its clock (the bus clock) and can no longer monitor the counter. If the watchdog counter overflows twice in succession (without an intervening reset), the backup reset function takes effect and generates a reset. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(such as the bus clock) for the counter reference. On a power-on reset, the POR bit in the system reset register is set, indicating the user should perform the WDOG fast test. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
It is suggested to disable or reconfigure the watchdog at the very beginning of the software code, e.g. beginning of the startup or main function. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
To refresh the watchdog and reset the watchdog counter to zero, a refresh sequence is required: DisableInterrupts; // disable global interrupt WDOG_CNT = 0xB480A602; // refresh watchdog EnableInterrupts; // enable global interrupt Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Option for inversion of final CRC result • 32-bit CPU register programming interface 30.1.2 Block diagram The following is a block diagram of the CRC. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
When CTRL[WAS] is 1, values written to this field are part of the seed value. When CTRL[WAS] is 0, data written to this field is used for CRC checksum generation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CRC calculation. A new CRC calculation is initialized by asserting CTRL[WAS] and then writing the seed into the CRC data register. Address: 4003_2000h base + 8h offset = 4003_2008h TOTR FXOR WAS Reset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Width of CRC protocol. TCRC 16-bit CRC protocol. 32-bit CRC protocol. Reserved This field is reserved. This read-only field is reserved and always has the value 0. 30.3 Functional description Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
8. When all values have been written, read the final CRC result from CRC_DATA[LU:LL]. Transpose and complement operations are performed on the fly while reading or writing values. See Transpose feature CRC result complement for details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CTRL[TOT] or CTRL[TOTR] fields, according to the CRC calculation being used. The following types of transpose functions are available for writing to and reading from the CRC data register: 1. CTRL[TOT] or CTRL[TOTR] is 00. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 630
= {reg[0:7], reg[8:15],reg[16:23], reg[24:31]} Figure 30-3. Transpose type 10 4. CTRL[TOT] or CTRL[TOTR] is 11. Bytes are transposed, but bits are not transposed. reg[31:0] becomes {reg[7:0], reg[15:8], reg[23:16], reg[31:24]} Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The DATA register is written with MSB of data value first, thus the application with little-endian configured, the data write bytes transpose should be enabled when writing a 32bit value from variable to DATA register. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Through the ARM Debug Access Port (DAP), the debugger has access to the status and control elements, implemented as registers on the DAP bus as shown in Figure 31-1. These registers provide additional control and status for low-power mode recovery and Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 636
Access Port 1 with the available registers shown in the table below. Table 31-2. MDM-AP register summary Address Register Description 0x0100_0000 Status MDM-AP status register 0x0100_0004 Control MDM-AP Control register 0x0100_00FC Read-only identification register that always reads as 0x001C_0020 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Indicates that flash memory has been initialized and debugger can be configured even if system is continuing to be held in reset via the debugger. 0 Flash is under initialization. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Configuration field to control core operation at the end of system reset sequencing. 0 Normal operation—release the core from reset along with the rest of the system at the end of system reset sequencing. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
SRAM controller. The system bus masters, including the processor, have read/write access to all of the SRAM via the AHB-Lite interface, allowing the memory to also be used to store program and data information. The MTB simultaneously stores the trace Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In the case of a secure device, the debugger has the capability of performing only a mass erase operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This document details the functionality of both the MTB_RAM and MTB_DWT capabilities. 32.1.1 Overview A generic block diagram of the processor core and platform for this class of ultra low-end microcontrollers is shown as follows: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 642
PC value changes non-sequentially. A non-sequential PC change can occur during branch instructions or during exception entry. The processor can cause a trace packet to be generated for any instruction. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 643
For an exception return operation, two packets are generated: • The first packet has the: • Source address field set to the address of the instruction that causes the exception return, BX or POP. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Program trace information in RAM available to MCU's application code or external debugger • Program trace watchpoint configuration accessible by MCU's application code or debugger • Location and size of RAM trace buffer is configured by software Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PC >> 1. ATOMIC Input Indicates the processor is performing non-instruction related activities. EDBGRQ Output Request for the processor to enter the Debug state, if enabled, and halt. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
See section 32.3.1.3/ F000_0008 MTB Flow Register (MTB_FLOW) Undefined 32.3.1.4/ F000_000C MTB Base Register (MTB_BASE) Undefined 32.3.1.5/ F000_0F00 Integration Mode Control Register (MTB_MODECTRL) 0000_0000h Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 647
F000_0FF0 Component ID Register (MTB_COMPID0) See section 32.3.1.15/ F000_0FF4 Component ID Register (MTB_COMPID1) See section 32.3.1.15/ F000_0FF8 Component ID Register (MTB_COMPID2) See section 32.3.1.15/ F000_0FFC Component ID Register (MTB_COMPID3) See section Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 648
See the MTB_FLOW register description for more details. Address: F000_0000h base + 0h offset = F000_0000h POINTER Reset POINTER Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 649
If MTB_FLOW[WATERMARK] is used to stop tracing or to halt the processor, MTB_MASTER[MASK] must still be set to a value that prevents MTB_POSITION[POINTER] from wrapping before it reaches the MTB_FLOW[WATERMARK] value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 650
1, then only privileged AHB read and write accesses to the RAM are permitted and user accesses are RAZ/WI. The HPROT[1] signal determines if an access is a user or privileged mode reference. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 651
Cortex-M0+ processor to enter the Debug state. To enter Debug state, the Cortex-M0+ processor might have to perform additional branch type operations. Therefore, the MTB_FLOW[WATERMARK] field must be set below the final entry in the trace buffer region. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 652
Cortex-M0+ processor by asserting the EDBGRQ signal. AUTOSTOP AUTOSTOP If this field is 1 and WATERMARK is equal to MTB_POSITION[POINTER], then MTB_MASTER[EN] is automatically set to 0. This stops tracing. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 653
It is hardwired to specific values used during the auto-discovery process by an external debug agent. Address: F000_0000h base + F00h offset = F000_0F00h MODECTRL Reset MTB_MODECTRL field descriptions Field Description MODECTRL MODECTRL Hardwired to 0x0000_0000 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 654
0. It is hardwired to specific values used during the auto- discovery process by an external debug agent. Address: F000_0000h base + FA4h offset = F000_0FA4h TAGCLEAR Reset MTB_TAGCLEAR field descriptions Field Description TAGCLEAR TAGCLEAR Hardwired to 0x0000_0000 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 655
Where functionality changes on a given security level, this change must be reported in this register. It is connected to specific signals used during the auto-discovery process by an external debug agent. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 656
This register indicates the device architecture. It is hardwired to specific values used during the auto-discovery process by an external debug agent. Address: F000_0000h base + FBCh offset = F000_0FBCh DEVICEARCH Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 657
This register indicates the device type ID. It is hardwired to specific values used during the auto-discovery process by an external debug agent. Address: F000_0000h base + FCCh offset = F000_0FCCh DEVICETYPID Reset MTB_DEVICETYPID field descriptions Field Description DEVICETYPID DEVICETYPID Hardwired to 0x0000_0031. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Component ID0 is hardwired to 0x0000_000D; ID1 to 0x0000_0090; ID2 to 0x0000_0005; ID3 to 0x0000_00B1. 32.3.2 MTB_DWT Memory Map The MTB_DWT programming model supports a very simplified subset of the v7M debug architecture and follows the standard Arm DWT definition. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 659
F000_1FF0 Component ID Register (MTBDWT_COMPID0) See section 32.3.2.10/ F000_1FF4 Component ID Register (MTBDWT_COMPID1) See section 32.3.2.10/ F000_1FF8 Component ID Register (MTBDWT_COMPID2) See section 32.3.2.10/ F000_1FFC Component ID Register (MTBDWT_COMPID3) See section Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 660
MTBDWT_CTRL[8:5] = POSTINIT = 0, cycle counter is not supported MTBDWT_CTRL[4:1] = POSTPRESET = 0, cycle counter is not supported MTBDWT_CTRL[0] = CYCCNTENA = 0, cycle counter is not supported Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 661
[31:x]. The maximum MASK value is 24, producing a 16 Mbyte mask. An attempted write of a MASK value > 24 is limited by the MTBDWT hardware to 24. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 662
FUNCTION Reset MTBDWT_FCT0 field descriptions Field Description 31–25 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 663
Disabled. 0100 Instruction fetch. 0101 Data operand read. 0110 Data operand write. 0111 Data operand (read + write). others Reserved. Any attempts to use this value results in UNPREDICTABLE behavior. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 664
If this read-only flag is asserted, it indicates the operation defined by the FUNCTION field occurred since the last read of the register. Reading the register clears this bit. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 665
MTB's control logic by setting the appropriate enable bits, MTB_MASTER[TSTARTEN, TSTOPEN]. In the event of simultaneous assertion of both TSTART and TSTOP, TSTART takes priority. Address: F000_1000h base + 200h offset = F000_1200h NUMCOMP Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 666
• Data match in MTBDWT_COMP0 and address match in MTBDWT_COMP1 when MTBDWT_FCT0[DATAVMATCH, DATAVADDR0] = {1,1} Trigger TSTOP based on the assertion of MTBDWT_FCT0[MATCHED]. Trigger TSTART based on the assertion of MTBDWT_FCT0[MATCHED]. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 667
This register indicates the device type ID. It is hardwired to specific values used during the auto-discovery process by an external debug agent. Address: F000_1000h base + FCCh offset = F000_1FCCh DEVICETYPID Reset MTBDWT_DEVICETYPID field descriptions Field Description DEVICETYPID DEVICETYPID Hardwired to 0x0000_0004. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Component ID0 is hardwired to 0x0000_000D; ID1 to 0x0000_0090; ID2 to 0x0000_0005; ID3 to 0x0000_00B1. 32.3.3 System ROM Memory Map The System ROM Table registers are also mapped into a sparsely-populated 4 KB address space. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 669
32.3.3.2/ F000_200C End of Table Marker Register (ROM_TABLEMARK) 0000_0000h 32.3.3.3/ F000_2FCC System Access Register (ROM_SYSACCESS) 0000_0001h 32.3.3.4/ F000_2FD0 Peripheral ID Register (ROM_PERIPHID4) See section Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 670
Reset ROM_ENTRYn field descriptions Field Description ENTRY ENTRY Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 671
This register indicates system access. It is hardwired to specific values used during the auto-discovery process by an external debug agent. Address: F000_2000h base + FCCh offset = F000_2FCCh SYSACCESS Reset ROM_SYSACCESS field descriptions Field Description SYSACCESS SYSACCESS Hardwired to 0x0000_0001 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Reset ROM_COMPIDn field descriptions Field Description COMPID Component ID Component ID0 is hardwired to 0x0000_000D; ID1 to 0x0000_0010; ID2 to 0x0000_0005; ID3 to 0x0000_00B1. 32.4 Usage Guide Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Chapter 32 Micro Trace Buffer (MTB) 32.4.1 ARM reference For more information about MTB, please refer to the ARM document ARM Debug Interface Architecture Specification Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PTB0 can be sampled by both ADC0 and ADC1. The interleaved mode is enabled by SIM_CHIPCTL[ADC_INTERLEAVE_EN] bits. For more information, see "ADC Hardware Interleaved Channels" in the ADC chapter of Reference Manual. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The following figure shows the pinout diagram for the devices supported by this document. Many signals may be multiplexed onto a single pin. To determine what signals can be used on which pin, see the previous table of Pin Assignments. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
33.3 Module Signal Description Tables The following sections correlate the chip-level signal name with the signal name used in the module's chapter. They also briefly describe the signal function and direction. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
EWM reset out signal 33.3.3 Clock Modules Table 33-4. OSC (in SCG) Signal Descriptions Chip Module signal name Description signal name EXTAL EXTAL External clock/Oscillator input XTAL XTAL Oscillator output Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Analog voltage inputs ACMP0_OUT CMPO Comparator output DAC0_OUT DAC_OUT DAC output Table 33-9. ACMP1 Signal Descriptions Chip signal name Module signal Description name ACMP1_IN[5:0] IN[5:0] Analog voltage inputs ACMP1_OUT CMPO Comparator output Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 687
FTM channel (n), where n can be 1-0 FTM2_FLT[3:2] FAULTj Fault input (j), where j can be 3-2 TCLK[2:0] EXTCLK External clock. FTM external clock can be selected to drive the FTM counter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 688
LPUART_CTS Clear to send LPUARTn_RTS LPUART_RTS Request to send Table 33-18. FlexIO Signal Descriptions Chip signal name Module signal Description name FXIO_D[7:0] FXIO_D[7:0] Bidirectional FlexIO Shifter and Timer pin inputs/outputs Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 689
PORTC17–PORTC0 General-purpose input/output PTD[17:0] PORTD17–PORTD0 General-purpose input/output PTE[16:0] PORTE16–PORTE0 General-purpose input/output Table 33-20. TSI0 Signal Descriptions Chip signal name Module signal Description name TSI0_CH[24:0] TSI[24:0] TSI sensing pins or GPIO pins Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ALT6 out en ALT7 out en ALT2 out data ALT3 out data ALT4 out data ALT5 out data ALT6 out data ALT7 out data ALT0 input/output (analog) Figure 34-1. Normal I/O structure Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Pin interrupt is functional in all digital pin muxing modes • Digital input filter • Digital input filter for each pin, usable by any digital peripheral muxed onto the • Individual enable or bypass control field per pin Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In Stop mode, the digital input filters are bypassed unless they are configured to run from the LPO clock source. 34.3.2.4 Debug mode In Debug mode, PORT operates normally. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Pin Control Register n (PORTA_PCR0) See section 34.6.1/702 4004_9004 Pin Control Register n (PORTA_PCR1) See section 34.6.1/702 4004_9008 Pin Control Register n (PORTA_PCR2) See section 34.6.1/702 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 696
Interrupt Status Flag Register (PORTA_ISFR) 0000_0000h 34.6.4/706 4004_90C0 Digital Filter Enable Register (PORTA_DFER) 0000_0000h 34.6.5/706 4004_90C4 Digital Filter Clock Register (PORTA_DFCR) 0000_0000h 34.6.6/707 4004_90C8 Digital Filter Width Register (PORTA_DFWR) 0000_0000h 34.6.7/707 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 697
0000_0000h 34.6.2/705 reads 0) 4004_A084 Global Pin Control High Register (PORTB_GPCHR) (always 0000_0000h 34.6.3/705 reads 0) 4004_A0A0 Interrupt Status Flag Register (PORTB_ISFR) 0000_0000h 34.6.4/706 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 698
See section 34.6.1/702 4004_B07C Pin Control Register n (PORTC_PCR31) See section 34.6.1/702 4004_B080 Global Pin Control Low Register (PORTC_GPCLR) (always 0000_0000h 34.6.2/705 reads 0) Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 699
4004_C070 Pin Control Register n (PORTD_PCR28) See section 34.6.1/702 4004_C074 Pin Control Register n (PORTD_PCR29) See section 34.6.1/702 4004_C078 Pin Control Register n (PORTD_PCR30) See section 34.6.1/702 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 700
4004_D064 Pin Control Register n (PORTE_PCR25) See section 34.6.1/702 4004_D068 Pin Control Register n (PORTE_PCR26) See section 34.6.1/702 4004_D06C Pin Control Register n (PORTE_PCR27) See section 34.6.1/702 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 701
4004_D0A0 Interrupt Status Flag Register (PORTE_ISFR) 0000_0000h 34.6.4/706 4004_D0C0 Digital Filter Enable Register (PORTE_DFER) 0000_0000h 34.6.5/706 4004_D0C4 Digital Filter Clock Register (PORTE_DFCR) 0000_0000h 34.6.6/707 4004_D0C8 Digital Filter Width Register (PORTE_DFWR) 0000_0000h 34.6.7/707 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PE field: Varies by port. See Signal Multiplexing and Signal Descriptions chapter for reset values per port. • PS field: Varies by port. See Signal Multiplexing and Signal Descriptions chapter for reset values per port. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 703
The corresponding pin is configured in the following pin muxing slot as follows: Pin disabled (Alternative 0) (analog). Alternative 1 (GPIO). Alternative 2 (chip-specific). Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 704
Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set. Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Corresponding Pin Control Register is updated with the value in GPWD. GPWD Global Pin Write Data Write value that is written to all Pin Control Registers bits [15:0] that are selected by GPWE. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The digital filter configuration is valid in all digital pin muxing modes. The output of each digital filter is reset to zero at system reset and whenever the digital filter is disabled. Each bit in the field enables the digital filter of the same number as the field. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Digital filters are clocked by the LPO clock. 34.6.7 Digital Filter Width Register (PORTx_DFWR) The digital filter configuration is valid in all digital pin muxing modes. Address: Base address + C8h offset FILT Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
When locked, writes to the lower half of that pin control register are ignored, although a bus error is not generated on an attempted write to a locked register. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
After a digital filter is enabled, the input is synchronized to the filter clock, either the bus clock or the LPO clock. If the synchronized input and the output of Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 711
The maximum latency through a digital filter equals three filter clock cycles plus the filter width configuration register. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(15) at address 0x4000_F000. Only some of the BME operations can be accomplished referencing GPIO at address 0x400F_F000. 35.2 Introduction The GPIO registers support 8-bit, 16-bit or 32-bit accesses. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
35.3 Memory map and register definition Any read or write access to the GPIO memory space that is outside the valid memory map results in a bus error. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 716
0000_0000h 35.3.1/717 400F_F0C4 Port Set Output Register (GPIOD_PSOR) (always 0000_0000h 35.3.2/718 reads 0) 400F_F0C8 Port Clear Output Register (GPIOD_PCOR) (always 0000_0000h 35.3.3/718 reads 0) Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Register bits for unbonded pins return a undefined value when read. Logic level 0 is driven on pin, provided pin is configured for general-purpose output. Logic level 1 is driven on pin, provided pin is configured for general-purpose output. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Writing to this register will update the contents of the corresponding bit in the Port Data Output Register (PDOR) as follows: Corresponding bit in PDORn does not change. Corresponding bit in PDORn is cleared to logic 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0. If the Port Control and Interrupt module is disabled, then the corresponding bit in PDIR does not update. Pin logic level is logic 0, or is not configured for use by digital function. Pin logic level is logic 1. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0000_0000h 35.4.1/722 F800_0004 Port Set Output Register (FGPIOA_PSOR) (always 0000_0000h 35.4.2/722 reads 0) F800_0008 Port Clear Output Register (FGPIOA_PCOR) (always 0000_0000h 35.4.3/723 reads 0) Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 721
F800_00D0 Port Data Input Register (FGPIOD_PDIR) 0000_0000h 35.4.5/724 F800_00D4 Port Data Direction Register (FGPIOD_PDDR) 0000_0000h 35.4.6/724 F800_0100 Port Data Output Register (FGPIOE_PDOR) 0000_0000h 35.4.1/722 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Logic level 1 is driven on pin, provided pin is configured for general-purpose output. 35.4.2 Port Set Output Register (FGPIOx_PSOR) This register configures whether to set the fields of the PDOR. Address: Base address + 4h offset PTSO Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Address: Base address + Ch offset PTTO Reset FGPIOx_PTOR field descriptions Field Description PTTO Port Toggle Output Writing to this register will update the contents of the corresponding bit in the PDOR as follows: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Port Data Direction Configures individual port pins for input or output. Pin is configured as general-purpose input, for the GPIO function. Pin is configured as general-purpose output, for the GPIO function. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The corresponding Port Control and Interrupt module does not need to be enabled to update the state of the port data direction registers and port data output registers including the set/clear/toggle registers. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If the DMA attempts to access the GPIO registers on the same cycle as an IOPORT access, then the DMA access will stall until any IOPORT accesses have completed. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1. This package for the product is not yet available. However, it is included in Package Your Way program for Kinetis MCU. Visit nxp.com/KPYW for more details. 36.1.1.2 ADC Connections/Channel Assignment Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DIV2 ALTCLK1 SIRC SIRCDIV2_CLK ALTCLK2 DIV2 ALTCLK3 FIRCDIV2_CLK FIRC ALTCLK4 DIV2 NOTE ALTCLK2~4 are not connected on this chip. 36.1.3 Inter-connectivity Information The ADC inter-connectivity is shown in following diagram. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PTB0 can be sampled by both ADC0 and ADC1. The interleaved mode is enabled by SIM_CHIPCTL[ADC_INTERLEAVE_EN] bits. The hardware interleave implementation on this device is as follows: • ADC0_SE4 and ADC1_SE14 channels are interleaved on PTB0 pin Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 732
• ADC1_SE9 and ADC0_SEx channels are interleaved on PTB14 pin Figure 36-1. ADC0 and ADC1 hardware interleaved channels integration 36.1.4.2 ADC Reference Options The ADC supports the following references: • VREFH/VREFL - connected as the primary reference option Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 733
ADC0 ADHWTSA~ADHWTSB and the another two are for ADC1 ADHWTSA~ADHWTSB. • RTC capable to trigger each ADC • LPTMR capable to trigger each ADC • Software trigger capable to trigger each ADC Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 735
ADC conversion. • With TRGMUX, a single LPIT could be used to trigger 2 ADCs at same time. This is one of the benefits for TRGMUX triggering, compared with PDB triggering. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
36.2.1 Features Following are the features of the ADC module: • Linear successive approximation algorithm with up to 12-bit resolution • Up to 16 single-ended external analog inputs • Output modes: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Temperature sensor • Hardware average function • Selectable voltage reference: external or alternate • Self-Calibration mode 36.2.2 Block diagram The following figure is the ADC module block diagram. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The ADC also requires four supply/reference/ground connections. NOTE For the number of channels supported on this device, see the chip-specific ADC information. The ADC does not produce any output signals. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
SC2[REFSEL]. The alternate voltage reference, V may select additional external pin ALTH or internal source depending on MCU configuration. See the chip configuration information on the Voltage References specific to this MCU. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
USER Offset Correction Register (ADC1_USR_OFS) 0000_0000h 36.4.11/ 4002_70A4 ADC X Offset Correction Register (ADC1_XOFS) 0000_0030h 36.4.12/ 4002_70A8 ADC Y Offset Correction Register (ADC1_YOFS) 0000_0037h Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 741
Status and Control Register 2 (ADC0_SC2) 0000_0000h 36.4.6/749 4003_B094 Status and Control Register 3 (ADC0_SC3) 0000_0000h 36.4.7/751 4003_B098 BASE Offset Register (ADC0_BASE_OFS) 0000_0040h 36.4.8/752 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ADC Plus-Side General Calibration Offset Value Register 9 36.4.28/ 4003_B0E8 0000_0240h (ADC0_CLP9_OFS) 36.4.1 ADC Status and Control Register 1 (ADCx_SC1n) SC1A is used for both software and hardware trigger modes of operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 743
This is a read-only field that is set each time a conversion is completed when one or more of the following is true: • The compare function is disabled Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 744
00110 Exernal channel 6 is selected as input. 00111 Exernal channel 7 is selected as input. 01000 Exernal channel 8 is selected as input. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ADICLK Reset ADCx_CFG1 field descriptions Field Description 31–9 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Configuration Register 2 (CFG2) selects the long sample time duration during long sample mode. NOTE Writing 0 is not supported on this register. Address: Base address + 44h offset SMPLTS Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Address: Base address + 48h offset + (4d × i), where i=0d to 1d Reset ADCx_Rn field descriptions Field Description 31–12 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Data result Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Address: Base address + 88h offset + (4d × i), where i=0d to 1d Reset ADCx_CVn field descriptions Field Description 31–16 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Compare Value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Indicates that a conversion or hardware averaging is in progress. ADACT is set when a conversion is initiated and cleared when a conversion is completed or aborted. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 750
. This voltage may be additional external pin or internal ALTH source depending on the MCU configuration. See the chip configuration information for details specific to this MCU. Reserved Reserved Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Continuous conversions will be performed (or continuous sets of conversions, if AVGE is set) after a conversion is initiated. Hardware Average Enable AVGE Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Rn. If the result is greater than the maximum or less than the minimum result value, it is forced to the appropriate limit for the current mode of operation. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
USR_OFS Reset ADCx_USR_OFS field descriptions Field Description 31–8 This field is reserved. Reserved This read-only field is reserved and always has the value 0. USR_OFS USER Offset Error Correction Value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Field Description 31–8 This field is reserved. Reserved This read-only field is reserved and always has the value 0. YOFS Y offset error correction value 36.4.13 ADC Gain Register (ADCx_G) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CLPx are automatically set when the self-calibration sequence is done, that is, CAL is cleared. If these registers are written by the user after calibration, the linearity error specifications may not be met. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CLP3 field: Reset values are loaded out of IFR. ADCx_CLP3 field descriptions Field Description 31–10 This field is reserved. Reserved This read-only field is reserved and always has the value 0. CLP3 Calibration Value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CLP1 field: Reset values are loaded out of IFR. ADCx_CLP1 field descriptions Field Description 31–9 This field is reserved. Reserved This read-only field is reserved and always has the value 0. CLP1 Calibration Value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CLPX field: Reset values are loaded out of IFR. ADCx_CLPX field descriptions Field Description 31–8 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ADCx_CLP9 field descriptions Field Description 31–8 This field is reserved. Reserved This read-only field is reserved and always has the value 0. This field is reserved. Reserved CLP9 Calibration Value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Reset ADCx_CLP3_OFS field descriptions Field Description 31–4 This field is reserved. Reserved This read-only field is reserved and always has the value 0. CLP3_OFS CLP3 Offset Capacitor offset correction value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. CLP1_OFS CLP1 Offset Capacitor offset correction value 36.4.26 ADC Plus-Side General Calibration Offset Value Register 0 (ADCx_CLP0_OFS) Address: Base address + E0h offset CLP0_OFS Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Reset ADCx_CLP9_OFS field descriptions Field Description 31–12 This field is reserved. Reserved This read-only field is reserved and always has the value 0. CLP9_OFS CLP9 Offset Capacitor offset correction value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This clock source is then divided by a configurable value to generate the input clock ADCK, to the module. The clock is selected from one of the following sources by means of CFG1[ADICLK]. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ADC continues to do conversions on the same SCn register that initiated the conversion. The hardware trigger function operates in conjunction with any of the conversion modes and configurations. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Low-power operation • Long sample time • Continuous conversion • Hardware average • Automatic compare of the conversion result to a software-determined compare value 36.5.4.1 Initiating conversions A conversion is initiated: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 766
36.5.4.2 Completing conversions A conversion is completed when the result of the conversion is transferred into the data result registers, Rn, as indicated in the following table. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 767
If the conversion was aborted by a reset, RA and Rn return to their reset states. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 768
The number of conversions is determined by the AVGS[1:0] bits, which can select 4, 8, 16, or 32 conversions to be averaged. While the hardware average function is in progress, SC2[ADACT] will be set. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Inside range, inclusive Compare true if the result is greater than or equal to CV1 And the result is less than or equal equal to CV2. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Calibrate only one ADC instance at a time. So, when calibrating instance ADC0, the instances ADC1, ADC2, etc. are required to be idle. • Set ADCK (ADC clock) to half the maximum specified frequency. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For example, in 8-bit single-ended mode, OFS[14:7] are subtracted from D[7:0]; OFS[15] indicates the sign (negative numbers are effectively added to the result) and OFS[6:0] are ignored. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If a single conversion is selected and the compare trigger is not met, the ADC will return to its idle state and cannot wake the MCU from Wait mode unless a new conversion is initiated by the hardware trigger. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
2. Update CFG to select the input clock source and the divide ratio used to generate ADCK. 3. Update SC2 to select the conversion trigger, hardware or software, and compare function options, if enabled. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
36.6.6 ADC low-power modes The ADC will be available in STOP, VLPR, VLPW, and VLPS mode. NOTE When in VLPx mode, the ADC clock source is only limited to OSC and SIRC. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Not doing this can result in ADC conversion results with lower than specified accuracy. Calibration needs to be initiated manually by setting the CAL bit. For more details, please refer to "Calibration" section. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The 8-bit DAC sub-block supports selection of two references. For this device, the references are connected as follows: • VDDA -- connected to V of CMP • PMC bandgap buffer out (1V reference voltage) -- connected to V of CMP Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 783
The LPTMR only offers single wire trigger to CMP. And the configuration must be done by LPTMR itself (round robin) before entering low power mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Selectable inversion on comparator output • Capability to produce a wide range of outputs such as: • Sampled • Windowed, which is ideal for certain PWM zero-crossing-detection applications • Digitally filtered: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Option to route the output to internal comparator input 37.3.3 ANMUX key features The ANMUX has the following features: • Two 8-to-1 channel MUXes • Operational over the entire supply range Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
WINDOW=1 to generate COUTA. Sampling does NOT occur when WINDOW = 0. • The Filter block is bypassed when not in use. FILT_PER = 0x00 FILTER_CNT = 0x00 bypass_Filter_Block Figure 37-3. Filter block bypass logic Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For such case, the software workaround is to configure the DAC side SEL[2:0] same as the non-DAC side, i.e. configuration of MSEL and PSEL register bits must be the same. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Individual modes are discussed below. Table 37-3. Comparator sample/filter controls C0[FILTER_CN Mode # C0[EN] C0[WE] C0[SE] C0[FPR] Operation Disabled See the Disabled mode (# 0x00 Continuous Mode Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 790
Note Filtering and sampling settings must be changed only after setting C0[SE]=0, C0[FPR] =0 and C0[FILTER_CNT]=0x00. This resets the filter to a known state. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The path from comparator input pins to output pin is operating in combinational unclocked mode. COUT and COUTA are identical. For control configurations that result in disabling the filter block, see Figure 37-3. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
#3B, the clock to filter block is internally derived. The comparator filter has no other function than sample/hold of the comparator output in this mode (# 3B). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
In Sampled, Filtered mode, the analog comparator block is powered and active. The path from analog inputs to COUTA is combinational unclocked. Windowing control is completely bypassed. COUTA is sampled whenever a rising edge is detected on the filter block clock input. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 794
CMPO COUT To other SOC functions WINDOW/SAMPLE bus clock Clock COUTA CMPO to prescaler divided FILT_PER CGMUX clock SE=1 Figure 37-8. Sampled, Filtered (# 4A): sampling point externally driven Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
WINDOW signal is high. In actual operation, COUTA may lag the analog inputs by up to one bus clock cycle plus the combinational path delay through the comparator and polarity select logic. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 796
For control configurations which result in disabling the filter block, see Figure 37-3. When any windowed mode is active, COUTA is clocked by the bus clock whenever WINDOW = 1. The last latched value is held when WINDOW = 0. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 797
Configuration for this mode is virtually identical to that for the Windowed/Filtered Mode shown in the next section. The only difference is that the value of C0[FILTER_CNT] must be 1. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FILT_PER CGMUX clock SE=0 Figure 37-13. Windowed/Filtered mode The following figure shows the operation timing for this mode, considering uncertainty is introduced by the internal synchronization for the filter block. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
37.8.1/799 4007_4004 CMP Control Register 1 (CMP1_C1) 0000_0000h 37.8.2/803 4007_4008 CMP Control Register 2 (CMP1_C2) 0000_0000h 37.8.3/806 37.8.1 CMP Control Register 0 (CMPx_C0) Access: • Supervisor read/write • User read/write Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 800
Enables the CFR interrupt from the CMP. When this field is set, an interrupt will be asserted when CFR is set. Interrupt is disabled. Interrupt is enabled. Comparator Interrupt Enable Falling Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 801
Low Speed (LS) comparison mode is selected. High Speed (HS) comparison mode is selected, in VLPx mode, or Stop mode switched to Low Speed (LS) mode. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 802
This read-only field is reserved and always has the value 0. Comparator hard block offset control. See chip data sheet to get the actual offset value with each level OFFSET Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CMPx_C1 field descriptions Field Description 31–30 This field is reserved. Reserved This read-only field is reserved and always has the value 0. DAC output Enable DACOE Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 804
If the same channel is selected as the reference voltage, this bit has no effect. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 805
Note: For the round robin mode of operation, the MSEL and PSEL bitfields in CMPx_C1 register must have different values. 10–8 Minus Input MUX Control MSEL Determines which input is selected for the minus mux. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
DACO range is from Vin/256 to Vin. 37.8.3 CMP Control Register 2 (CMPx_C2) Access: • Supervisor read/write • User read/write Address: Base address + 8h offset RRE RRIE FXMXCH Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 807
Channel 7 input changed flag. This bit is set if the channel 7 input changed from the last comparison with CH7F the fixed mux port. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
C0[CFF] is set on a falling edge, and C0[CFR] is set on a rising edge of the comparator output. The optionally filtered CMPO can be read directly through C0[COUT]. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
COUTA when the selected INM and INP input voltages differ by less than the offset voltage of the differential comparator. 37.9.2.1 Enabling filter modes Filter modes can be enabled by: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 810
The following table summarizes maximum latency values for the various modes of operation in the absence of noise. Filtering latency is restarted each time an actual output transition is masked by noise. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The interrupt request is asserted C0[IER] and C0[CFR] are cleared for a rising-edge interrupt The interrupt request is deasserted C0[IEF] and C0[CFF] are cleared for a falling-edge interrupt The interrupt request is deasserted Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1 (CMP_C1). Its supply reference source can be selected from two sources V and V . The module can be powered down or disabled when not in use. When in the Disabled mode, DACO is connected to the analog ground. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CMP and DAC prior to performing a CMP operation and capturing the output. A fixed channel for either the plus-side mux or the minus-side mux is selected by software via C2[FXMP] and Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 814
C0[PMODE]. It is also required to not select the internal reserved channels for round-robin by INPSEL and INNSEL. NOTE In round-robin mode, it is suggested to always configure the DAC output as the fixed port reference. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 815
Trigger Channel Channel 0~7 Mode sweep can be swept (CHNx) with DAC Channel Channel 0~7 sweep can be swept with DAC (CHNx) Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CMPx_C1 = (CMPx_C1 & ~(CMP_C1_ INPSEL_MASK | CMP_C1_PSEL_MASK)) | CMP_C1_INPSEL(1) | CMP_C1_PSEL(3); Then, the CMP output interrupts with their flags would be used to indicate the event of Zero Crossing Detection. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This mode compares multiple input channels with the reference input channel (fixed) in a round-robin manner. It is commonly used to provide a trigger mode to wake up the MCU in STOP mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 818
All channel0~7 as the round robin checker channel in non-fixed port. The comparison result is sampled as soon as the active channel is scanned in one round-robin clock. The initialization delay modulus is set to 64. Enable round robin mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 819
SoC. */ /* Set SoC enter into STOP mode. See the power management chapter. */ /* Change the voltage of input channel to wake up the SoC. */ Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Number of Pulse Out Pulse Out connects to TRGMUX Number of DAC interval triggers 38.1.2 PDB Clocking Information The PDB module is only clocked by system clock shown in following diagram. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Operation in One-Shot or Continuous modes • Optional back-to-back mode operation, which enables the ADC conversions complete to trigger the next PDB channel • One programmable delay interrupt • One sequence error interrupt Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For module to core output triggers implementation, see the chip configuration information. 38.2.3 Back-to-back acknowledgment connections PDB back-to-back operation acknowledgment connections are chip-specific. For implementation, see the chip configuration information. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If the PDB is enabled and external trigger input source is selected, a positive edge on the EXTRG signal resets and starts the counter. 38.4 Memory map and register definition Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Enables the PDB sequence error interrupt. When PDBEIE is set, any of the PDB channel sequence error flags generates a PDB sequence error interrupt. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 830
Trigger-In 11 is selected. 1100 Trigger-In 12 is selected. 1101 Trigger-In 13 is selected. 1110 Trigger-In 14 is selected. 1111 Software trigger is selected. PDB Enable PDBEN Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 831
• LDOK is automatically cleared when the values in the internal buffers are loaded into the registers or when PDBEN bit (PDB Enable) is cleared. • Writing 0 to LDOK has no effect. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PDB. 38.4.3 Counter register (PDBx_CNT) NOTE Writing to this read-only register will generate a transfer error (and possibly a hard fault). Address: 4003_6000h base + 8h offset = 4003_6008h Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Each PDB channel has one control register, CHnC1. The bits in this register control the functionality of each PDB channel operation. Address: 4003_6000h base + 10h offset + (40d × i), where i=0d to 1d Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PDB Channel Flags The CF[m] field is set when the PDB counter (PDB_CNT) matches the value CHnDLYm + 1. Write 0 to clear CF. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Specifies the delay value for the channel's corresponding pre-trigger. The pre-trigger asserts when the counter is equal to DLY. Reading this field returns the value of internal register that is effective for the current PDB cycle. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. POEN PDB Pulse-Out Enable Enables the pulse output. Only lower 8 bits are implemented in this MCU. PDB Pulse-Out disabled PDB Pulse-Out enabled Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(SC[SWTRIG]) is written with 1. For each channel, a delay m determines the time between assertion of the trigger input event to the time at which changes in the pre- trigger m output signal are started. The time is defined as: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 838
ADC conversions can be triggered on the next set of configuration and results registers. When back-to-back operation is enabled by setting the PDB Channel Pre-Trigger Back-to-Back Operation Enable (CHnC1[BB[m]]), then the delay m Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 839
If the Continuous Mode Enable (SC[CONT]) is set, then the counter will then resume a new count; otherwise, the counter operation will stop until the next trigger input event occurs. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
ADC pre-trigger/trigger outputs and Pulse-Out generation have the same time base, because they both share the PDB counter. The pulse-out connections implemented in this MCU are described in the device's chip configuration details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The following registers control the timing of the PDB operation; and in some of the applications, they may need to become effective at the same time. • PDB Modulus register (MOD) • PDB Interrupt Delay register (IDLY) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 842
The following diagrams show the cases of the internal registers being updated with SC[LDMOD] is 00 and x1. CHnDLY1 CHnDLY0 PDB counter SC[LDOK] Ch n pre-trigger 0 Ch n pre-trigger 1 Figure 38-4. Registers update with SC[LDMOD] = 00 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
38.5.6 DMA If SC[DMAEN] is set, PDB can generate a DMA transfer request when SC[PDBIF] is set. When DMA is enabled, the PDB interrupt is not issued. 38.6 Application information Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Therefore, use the lowest possible prescaler and multiplication factor for a given application. 38.7 Usage Guide 38.7.1 Using PDB to precisely control ADC conversion For detailed information, see the ADC trigger sections in the ADC chapter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Compared with the FTM0 configuration, the FTM1 and FTM2 configuration adds the Quadrature decoder feature. 39.1.2 FTM Clocking Information The following figure shows the input clock sources available for this module. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
1/4 of the system clock frequency. 39.1.3 Inter-connectivity Information The FTM inter-connectivity is shown in the following diagram. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 848
The FlexTimer support external hardware trigger input which can be used for timer dynamic synchronization between multiple FlexTimers or counter reset. The FlexTimer hardware trigger are implemented as following. FTM0: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The following figure shows the FTM structure. The central component of the FTM is the 16-bit counter with programmable initial and final values and its counting can be up or up-down. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This section presents a high-level summary of the FTM registers and how they are mapped. The registers and bits of an unavailable function in the FTM remain in the memory map and in the reset value, but they have no active function. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
39.4.6/867 4003_8040 Channel (n) Value (FTM0_C6V) 0000_0000h 39.4.7/869 4003_8044 Channel (n) Status And Control (FTM0_C7SC) 0000_0000h 39.4.6/867 4003_8048 Channel (n) Value (FTM0_C7V) 0000_0000h 39.4.7/869 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 857
4003_809C Half Cycle Register (FTM0_HCR) 0000_0000h 39.4.29/ 4003_8200 Mirror of Modulo Value (FTM0_MOD_MIRROR) 0000_0000h 39.4.30/ 4003_8204 Mirror of Channel (n) Match Value (FTM0_C0V_MIRROR) 0000_0000h Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 858
Capture And Compare Status (FTM1_STATUS) 0000_0000h 39.4.9/870 39.4.10/ 4003_9054 Features Mode Selection (FTM1_MODE) 0000_0004h 39.4.11/ 4003_9058 Synchronization (FTM1_SYNC) 0000_0000h 39.4.12/ 4003_905C Initial State For Channels Output (FTM1_OUTINIT) 0000_0000h Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 859
4003_920C Mirror of Channel (n) Match Value (FTM1_C2V_MIRROR) 0000_0000h 39.4.30/ 4003_9210 Mirror of Channel (n) Match Value (FTM1_C3V_MIRROR) 0000_0000h 39.4.30/ 4003_9214 Mirror of Channel (n) Match Value (FTM1_C4V_MIRROR) 0000_0000h Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 860
Output Mask (FTM2_OUTMASK) 0000_0000h 39.4.14/ 4003_A064 Function For Linked Channels (FTM2_COMBINE) 0000_0000h 39.4.15/ 4003_A068 Deadtime Configuration (FTM2_DEADTIME) 0000_0000h 39.4.16/ 4003_A06C FTM External Trigger (FTM2_EXTTRIG) 0000_0000h Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 861
39.4.30/ 4003_A218 Mirror of Channel (n) Match Value (FTM2_C5V_MIRROR) 0000_0000h 39.4.30/ 4003_A21C Mirror of Channel (n) Match Value (FTM2_C6V_MIRROR) 0000_0000h 39.4.30/ 4003_A220 Mirror of Channel (n) Match Value (FTM2_C7V_MIRROR) 0000_0000h Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. 27–24 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Channel 7 PWM enable bit PWMEN7 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 863
This bit enables the PWM channel output. This bit should be set to 0 (output disabled) when an input mode is used. Channel output port is disabled Channel output port is enabled Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 864
This field is write protected. It can be written only when MODE[WPDIS] = 1. No clock selected. This in effect disables the FTM counter. FTM input clock Fixed frequency clock External clock Prescale Factor Selection Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(TOF) becomes set at the next clock cycle, and the next value of FTM counter depends on the selected counting method; see Counter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 866
Address: Base address + 8h offset Reset FTMx_MOD field descriptions Field Description 31–16 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Modulo Value Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(n) filter is enabled) both them are inside the FTM. NOTE: The CHIS bit should be ignored when the channel (n) is not in an input mode. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 868
Used on the selection of the channel (n) mode. See Channel Modes. This field is write protected. It can be written only when MODE[WPDIS] = 1. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Captured FTM counter value of the input modes or the match value for the output modes 39.4.8 Counter Initial Value (FTMx_CNTIN) The Counter Initial Value register contains the initial value for the FTM counter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If another event occurs between the read and write operations, the write operation has no effect; therefore, CHF remains set indicating an event has occurred. In this case, a CHF interrupt request is not lost due to the clearing sequence for a previous CHF. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 871
Channel 5 Flag CH5F See the register description. No channel event has occurred. A channel event has occurred. Channel 4 Flag CH4F See the register description. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Capture Test mode • PWM synchronization • Write protection • Channel output initialization These controls relate to all channels within this module. Address: Base address + 54h offset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 873
WPEN bit. WPDIS is cleared when 1 is written to WPEN. WPDIS is set when WPEN bit is read as a 1 and then 1 is written to WPDIS. Writing 0 to WPDIS has no effect. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0 and hardware trigger selection, TRIG0, TRIG1, or TRIG2 bits, is likely to result in unpredictable behavior. The synchronization event selection also depends on the PWMSYNC (MODE register) and SYNCMODE (SYNCONF register) bits. See synchronization. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 875
0 input signal. Trigger is disabled. Trigger is enabled. Output Mask Synchronization SYNCHOM Selects when the OUTMASK register is updated with the value of its buffer. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Reset Reset FTMx_OUTINIT field descriptions Field Description 31–8 This field is reserved. Reserved This read-only field is reserved and always has the value 0. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 877
Channel 0 Output Initialization Value CH0OI Selects the value that is forced into the channel output when the initialization occurs. The initialization value is 0. The initialization value is 1. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Channel output is masked. It is forced to its inactive state. Channel 5 Output Mask CH5OM Defines if the channel output is masked or unmasked. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 879
Defines if the channel output is masked or unmasked. Channel output is not masked. It continues to operate normally. Channel output is masked. It is forced to its inactive state. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The deadtime insertion in this pair of channels is disabled. The deadtime insertion in this pair of channels is enabled. Dual Edge Capture Mode Captures For n = 6 DECAP3 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 881
Enables the capture of the FTM counter value according to the channel (n) input event and the configuration of the dual edge capture bits. This field applies only when DECAPEN = 1. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 882
DECAP bit is cleared automatically by hardware if Dual Edge Capture – One-Shot mode is selected and when the capture of channel (n+1) event is made. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 883
DECAP bit is cleared automatically by hardware if dual edge capture – one-shot mode is selected and when the capture of channel (n+1) event is made. The dual edge captures are inactive. The dual edge captures are active. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Divide the FTM input clock by 1. Divide the FTM input clock by 4. Divide the FTM input clock by 16. DTVAL Deadtime Value Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• Selects which channels are used in the generation of the channel triggers Several channels can be selected to generate multiple triggers in one PWM period. See External Trigger Initialization trigger Address: Base address + 6Ch offset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 886
Enables the generation of the trigger when the FTM counter is equal to the CNTIN register. The generation of initialization trigger is disabled. The generation of initialization trigger is enabled. Channel 1 Trigger Enable CH1TRIG Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
That is, the safe value of a channel is the value of its POL bit. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 888
This field is write protected. It can be written only when MODE[WPDIS] = 1. The channel polarity is active high. The channel polarity is active low. Channel 2 Polarity POL2 Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 889
Defines the polarity of the channel output. This field is write protected. It can be written only when MODE[WPDIS] = 1. The channel polarity is active high. The channel polarity is active low. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FAULTF remains set after the clearing sequence is completed for the earlier fault condition. FAULTF is also cleared when FAULTFj bits are cleared individually. No fault condition was detected. A fault condition was detected. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 891
Writing a 1 to FAULTF1 has no effect. FAULTF1 bit is also cleared when FAULTF bit is cleared. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. 15–12 Channel 3 Input Filter CH3FVAL Selects the filter value for the channel input. The filter is disabled when the value is zero. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This configuration allows to put the FTM outputs tri-stated when a fault event is ongoing. This field is write protected. It can be written only when MODE[WPDIS] = 1. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 894
Fault input is enabled. Fault Input 2 Enable FAULT2EN Enables the fault input. This field is write protected. It can be written only when MODE[WPDIS] = 1. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 895
Fault Input 0 Enable FAULT0EN Enables the fault input. This field is write protected. It can be written only when MODE[WPDIS] = 1. Fault input is disabled. Fault input is enabled. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CH0FVAL field of FILTER. The phase A filter is also disabled when CH0FVAL is zero. Phase A input filter is disabled. Phase A input filter is enabled. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 897
The Quadrature Decoder mode has precedence over the other modes. See Channel Modes. This field is write protected. It can be written only when MODE[WPDIS] = 1. Quadrature Decoder mode is disabled. Quadrature Decoder mode is enabled. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Configures the FTM to use an external global time base signal that is generated by another FTM. Use of an external global time base is disabled. Use of an external global time base is enabled. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Fault Input 3 Polarity FLT3POL Defines the polarity of the fault input. This field is write protected. It can be written only when MODE[WPDIS] = 1. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
CNTIN registers synchronization, if FTM clears the TRIGj bit, where j = 0, 1, 2, when the hardware trigger j is detected. Address: Base address + 8Ch offset Reset INVC Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 901
The software trigger does not activate the FTM counter synchronization. The software trigger activates the FTM counter synchronization. Synchronization Mode SYNCMODE Selects the PWM Synchronization mode. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This register has a write buffer. The INVmEN bit is updated by the INVCTRL register synchronization. Address: Base address + 90h offset Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• The CH(n)OCV bits select the value that is forced at the corresponding channel (n) output. This register has a write buffer. The fields are updated by the SWOCTRL register synchronization. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 904
The software output control forces 0 to the channel output. The software output control forces 1 to the channel output. Channel 0 Software Output Control Value CH0OCV Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 905
The channel output is affected by software output control. Channel 0 Software Output Control Enable CH0OC The channel output is not affected by software output control. The channel output is affected by software output control. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The global load mechanism depends on SoC specific information. Refer to FTM SoC specific information to more details. No action. LDOK bit is set. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 907
Channel match is included as a reload opportunity. Channel 1 Select CH1SEL Channel match is not included as a reload opportunity. Channel match is included as a reload opportunity. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Half Cycle Value 39.4.29 Mirror of Modulo Value (FTMx_MOD_MIRROR) This register contains the integer and fractional modulo value for the FTM counter. Address: Base address + 200h offset FRACMOD Reset Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
This read-only field is reserved and always has the value 0. 39.5 Functional description The notation used in this document to represent the counters and the generation of the signals is shown in the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Refer to the chip specific documentation for further information. Due to FTM hardware implementation limitations, the frequency of the fixed frequency clock must not exceed 1/2 of the FTM input clock frequency. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The FTM counter has these modes of operation: • Up counting • Up-down counting • Quadrature Decoder mode 39.5.3.1 Up counting Up counting is selected when: • QUADEN = 0, and • CPWMS = 0 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 912
FTM counting is up and signed. CNTIN[15] = 0 and CNTIN ≠ 0x0000 The initial value of the FTM counter is a positive number, so the FTM counting is up and unsigned. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 913
FTM operation difficult to comprehend. However, there is no restriction on this configuration, and an example is shown in the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 914
The TOF bit is set when the FTM counter changes from MOD to (MOD – 1). If (CNTIN = 0x0000), the FTM counting is equivalent to TPM up-down counting, that is, up-down and unsigned counting. See the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 915
= 2 x (MOD - CNTIN) x period of FTM counter clock = 2 x MOD x period of FTM counter clock Figure 39-10. Example of counter events in up-down counting mode when CNTIN = 0x0000 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 916
• A channel in Input Capture mode with ICRST = 1 (FTM Counter Reset in Input Capture Mode). Note that reseting the counter also generates a counter event. See Counter events more details. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Pin not used for FTM—revert the channel pin to general purpose I/O or other peripheral control Input Capture Capture on Rising Edge Only Capture on Falling Edge Only Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
* Filtering function is only available in the inputs of channel 0, 1, 2, and 3 FTM counter Figure 39-12. Input Capture mode Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 920
(CHnFVAL[3:0] × 4 FTM input clocks) plus a further 4 rising edges of the FTM input clock: two rising edges to the Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 921
CnV register, the CHF bit is set, the channel (n) interrupt is generated (if CHIE = 1) and the FTM counter is reset to the CNTIN register value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
When the counter matches the value in the CnV register of an output compare channel, the channel (n) output can be set, cleared, or toggled. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 923
If (ELSB:ELSA = 0:0) when the counter reaches the value in the CnV register, the CHF bit is set and the channel (n) interrupt is generated if CHIE = 1, however the channel (n) output is not modified and controlled by FTM. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If (ELSB:ELSA = 1:0), then the channel (n) output is forced high at the counter overflow when the CNTIN register value is loaded into the FTM counter, and it is forced low at the channel (n) match (FTM counter = CnV). See the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 925
• 0% EPWM signal if CnV = CNTIN, • EPWM signal between 0% and 100% if CNTIN < CnV <= MOD, • 100% EPWM signal when CNTIN > CnV or CnV > MOD. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If (ELSB:ELSA = 1:0), then the channel (n) output is forced high at the channel (n) match (FTM counter = CnV) when counting down, and it is forced low at the channel (n) match when counting up. See the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The CPWM mode must not be used when the FTM counter is a free running counter. 39.5.9 Combine mode The Combine mode is selected when: • QUADEN = 0 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 928
(n) match channel (n) output with ELSB:ELSA = 1:0 channel (n) output with ELSB:ELSA = X:1 Figure 39-26. Combine mode The following figures illustrate the PWM signals generation using Combine mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTM has many ways to synchronize PWM registers. Current implementation allows to bypass the buffers, use legacy and PWM synchronization (hardware and software trigger) and it is also possible to use a half or full cycle reload strategy. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 937
The following table describes when CnV register is updated: Table 39-9. CnV register update When Then CnV register is updated CLKS[1:0] = 0:0 When CnV register is written, independent of FTMEN bit. Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTM input clock. The PWM synchronization with hardware trigger is initiated when a rising edge is detected at the enabled hardware trigger inputs. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 939
PWMSYNC and REINIT bits. In this case if (PWMSYNC = 1) or (PWMSYNC = 0 and REINIT = 0) then SWSYNC bit is cleared at the next selected loading point after that the Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 940
• if (CNTMAX = 1), when the FTM counter changes from (MOD - 1) to MOD; • if (CNTMIN = 1), when the FTM counter changes from (CNTIN + 1) to CNTIN. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 941
= 0). However, it is expected that the MOD register be synchronized only by the enhanced PWM synchronization. In the case of enhanced PWM synchronization, the MOD register synchronization depends on SWWRBUF, SWRSTCNT, HWWRBUF, and HWRSTCNT bits according to this flowchart: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 942
If the trigger event was a software trigger, then the SWSYNC bit is cleared on the next selected Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 943
SWSYNC bit is cleared according to the following example. If the trigger event was a hardware trigger, then the TRIGn bit is cleared according to Hardware trigger. Examples with software and hardware triggers follow. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 944
FTM input clock write 1 to SWSYNC bit SWSYNC bit software trigger event selected loading point MOD register is updated Figure 39-53. MOD synchronization with (SYNCMODE = 0) and (PWMSYNC = 1) Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 945
SYNCMODE = 0). However, it is expected that the OUTMASK register be synchronized only by the enhanced PWM synchronization. In the case of enhanced PWM synchronization, the OUTMASK register synchronization depends on SWOM and HWOM bits. See the following flowchart: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 946
? clear TRIGn bit Figure 39-54. OUTMASK register synchronization flowchart In the case of legacy PWM synchronization, the OUTMASK register synchronization depends on PWMSYNC bit according to the following description. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 947
If (SYNCMODE = 0), (SYNCHOM = 1), and (PWMSYNC = 1), then this synchronization is made on the next enabled hardware trigger. The TRIGn bit is cleared according to Hardware trigger. An example with a hardware trigger follows. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 948
0) or by the enhanced PWM synchronization (INVC = 1 and SYNCMODE = 1) according to the following flowchart. In the case of enhanced PWM synchronization, the INVCTRL register synchronization depends on SWINVC and HWINVC bits. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 949
HWTRIGMODE bit ? clear TRIGn bit Figure 39-58. INVCTRL register synchronization flowchart 39.5.12.9 SWOCTRL register synchronization The SWOCTRL register synchronization updates the SWOCTRL register with its buffer value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 950
? wait hardware trigger n update SWOCTRL with its buffer value update SWOCTRL with its buffer value HWTRIGMODE bit ? clear TRIGn bit Figure 39-59. SWOCTRL register synchronization flowchart Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 951
= 0). However, the FTM counter must be synchronized only by the enhanced PWM synchronization. In the case of enhanced PWM synchronization, the FTM counter synchronization depends on SWRSTCNT and HWRSTCNT bits according to the following flowchart. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 952
SWSYNC bit is cleared according to the following example. If the trigger event was a hardware trigger then the TRIGn bit is cleared according to Hardware trigger. Examples with software and hardware triggers follow. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 953
Figure 39-64. FTM counter synchronization with (SYNCMODE = 0), (HWTRIGMODE = 0), (REINIT = 1), (PWMSYNC = 1), and a hardware trigger was used Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
NOTE INV(m) bit selects the inverting to the pair channels (n) and (n+1). Figure 39-65. Channels (n) and (n+1) outputs after the inverting in High-True (ELSB:ELSA = 1:0) Combine mode Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The software output control forces the channel output according to software defined values at a specific time in the PWM generation. The software output control is selected when: • QUADEN = 0 • DECAPEN = 0, and • CH(n)OC = 1 Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 956
Software output control forces the following values on channels (n) and (n+1) when the COMP bit is one. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
(FTM counter = C(n)V) occurs, the channel (n) output remains at the high value until the end of the deadtime delay when the channel (n) output is cleared. Similarly, Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 958
• The deadtime feature must be used only in Complementary mode. • The deadtime feature is not available in Output Compare mode. 39.5.15.1 Deadtime insertion corner cases If (PS[2:0] is cleared), (DTPS[1:0] = 0:0 or DTPS[1:0] = 0:1): Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 959
Figure 39-71. Example of the deadtime insertion (ELSB:ELSA = 1:0, POL(n) = 0, and POL(n+1) = 0) when the deadtime delay is comparable to channels (n) and (n+1) duty cycle Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Table 39-12. Output mask result for channel (n) before the polarity control CH(n)OM Output Mask Input Output Mask Result inactive state inactive state active state active state inactive state inactive state active state Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FAULTFn* control detector Fault filter (5-bit counter) FTM input clock * where n = 3, 2, 1, 0 Figure 39-73. Fault input n control block diagram Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 962
If the automatic fault clearing is selected (FAULTM[1:0] = 1:1), then the channels output disabled by fault control is again enabled when the fault input signal (FAULTIN) returns to zero and a new PWM cycle begins. See the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 963
If the manual fault clearing is selected (FAULTM[1:0] = 0:1 or 1:0), then the channels output disabled by fault control is again enabled when the FAULTF bit is cleared and a new PWM cycle begins. See the following figure. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• If POLn = 1, the channel (n) output polarity is low, so the logical zero is the active state and the logical one is the inactive state. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
See the description of the CLKS field in the Status and Control register. 39.5.20 Features priority The following figure shows the priority of the features used at the generation of channels (n) and (n+1) outputs signals. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
0, 1, 2, 3, 4, 5, 6 or 7, then the FTM generates a trigger when the channel (j) match occurs (FTM counter = C(j)V). The external trigger feature provides a trigger signal which has one FTM clock period width and is used for on-chip modules. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
INITTRIGEN = 1 and ITRIGR = 0, then FTM generates a trigger when the FTM counter is updated with the CNTIN register value in the following cases: • In all cycles that FTM counter is automatically updated with CNTIN register value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 969
0x04 0x05 0x06 0x00 0x01 0x02 0x03 0x04 0x05 0x06 FTM counter write to CNT initialization trigger Figure 39-82. Initialization trigger is generated when there is a write to CNT register Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 970
Figure 39-85. Initialization trigger is generated if the channel (n) is in Input Capture mode, ICRST = 1 and the selected input capture event occurs in the channel (n) input Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTM counter. The next reads of CnV registers return the written value to the FTM counter and the next reads of CNT register return FTM counter next value. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 972
If DMA = 1, the CHF bit is cleared either by channel DMA transfer done or reading CnSC while CHF is set and then writing a zero to CHF bit according to CHIE bit. See the following table. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
If these bits select different edges, then it is a pulse width measurement. In the Dual Edge Capture mode, only channel (n) input is used and channel (n+1) input is ignored. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 974
(n+1) is captured. Therefore, while DECAP bit is set, the one-shot capture is in process. When this bit is cleared, both edges were captured and the captured values are ready for reading in the C(n)V and C(n+1)V registers. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 975
(n) ELSB:ELSA bits. The channel (n+1) CHF bit is set and DECAP bit is cleared when the second edge of this pulse is Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 976
(n+1) ELSB:ELSA bits. The channel (n+1) CHF bit indicates when two edges of the pulse were captured and the C(n)V and C(n+1)V registers are ready for reading. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 977
(channel (n) ELSB:ELSA = 1:0 and channel (n+1) ELSB:ELSA = 1:0), then the period between two consecutive falling edges is measured. The period measurement can be made in One-Shot Capture mode Continuous Capture mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 978
Dual Edge Capture mode, so it remains set. While the DECAP bit is set the configured measurements are made. The channel (n) CHF bit is set when the first rising Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 979
(n) input signal, and channel (n+1) to capture the FTM counter value when there is a falling edge at channel (n) input signal. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The Quadrature Decoder mode is selected if (QUADEN = 1). The Quadrature Decoder mode uses the input signals phase A and B to control the FTM counter increment and decrement. The following figure shows the quadrature decoder block diagram. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 981
An edge at phase A must not occur together an edge at phase B and vice-versa. The PHAPOL bit selects the polarity of the phase A input, and the PHBPOL bit selects the polarity of the phase B input. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 982
• there is a rising edge at phase B signal and phase A signal is at logic zero; • there is a rising edge at phase A signal and phase B signal is at logic one. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 983
FTM counter changes from CNTIN to MOD, TOF bit is set and TOFDIR bit is cleared. TOF bit indicates the FTM counter overflow occurred. TOFDIR indicates the counting was down when the FTM counter overflow occurred. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 984
FTM counter CNTIN 0x0000 Time Figure 39-98. Motor position jittering in a mid count value The following figure shows motor jittering produced by the phase B and A pulses respectively: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Stopped is not set The channels outputs are frozen Writes to these registers bypass the registers when the chip enters in Debug buffers mode Table continues on the next page... Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
For example, if the load frequency is zero, then any reload opportunity is also a reload point. Note that when a reload point is Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 987
Note that the example below also uses a channel match as reload opportunity, but generally applications uses only the half cycle match if a non full cycle reload is needed. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 988
After enabling the reload opportunities, the LDOK bit must be set for the reload to occur. In this case, the reload occurs at the next enabled reload point considering the Load Frequency according to the following conditions: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
The figure below shows an example of connection between FTM global load inputs and outputs considering that GLDOK bit is implemented outside from FTM module. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
FTM counters enabled if at least one of the gtb_out signals from one of the FTM modules is 1. There are several possible configurations for the interconnection of the gtb_in and Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
PWM_EN is enabled and there is no fault event ongoing configured to tri-state the outputs by FSTATE bit at FTM_FLTCTRL register. Note that Polarity logic will act before channel enable logic. Therefore, it is imperative that the user program the channel Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
• the FRACMOD is updated with the value of its write buffer, or • the FTM counter is stopped. NOTE For the PWM period dithering, the register MOD_MIRROR should be used instead of the register MOD. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 993
MOD is 0xFFFE for PWM period dithering with unsigned counting and 0x7FFE for PWM period dithering with signed counting. The figure belows an examples of PWM period dithering when the FTM counter is an up counter. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 994
(in decimal) is [(MOD - CNTIN + 1) + (FRACMOD/32)] x T, where the integer value is (MOD - CNTIN + 1) and the fractional value is (FRACMOD/ 32). See the example below. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 995
Due to one unit of FTM counter that can be added to the PWM period, the largest valid value for MOD is 0x7FFE for PWM period dithering in up-down counting (CPWM mode). Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 996
VAL of the register C(n)V is updated with the value of its write buffer. The PWM edge dithering is not available: • to the channel in input modes, and • to the channel in output compare mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 997
T is the period of one unit of FTM counter channel (n) output accumulator 0x1B 0x1E 0x01 overflow Figure 39-107. Channel (n) is in EPWM Mode with PWM Edge Dithering Assuming: Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 998
CPWM duty cycle happens on channel (n) match (FTM counter = C(n)V) when the FTM counter is decrementing, and the final edge of CPWM duty cycle on channel (n) match when the FTM counter is incrementing. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 999
(FTM counter = C(n)V + 0x0001). The figure below shows an example of the channel (n) match edge dithering when the channels (n) and (n+1) are in Combine mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 NXP Semiconductors...
Page 1000
(n+1) match edge happens when (FTM counter = C(n+1)V + 0x0001). The figure below shows an example of the channel (n+1) match edge dithering when the channels (n) and (n+1) are in Combine mode. Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018 1000 NXP Semiconductors...
Need help?
Do you have a question about the Kinetis KE1xZ256 and is the answer not in the manual?
Questions and answers