13.4 Peripherals Supported
This section describes the peripherals (UART, I2C, SPI, USB) supported by the Kinetis
Flashloader.
13.4.1 I2C Peripheral
The Kinetis Flashloader 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.
The Kinetis Flashloader uses 0x10 as the I2C slave address, and supports 400 kbps as the
I2C baud rate.
Because the I2C peripheral in serves as an I2C slave device, each transfer should be
started by the host, and each outgoing packet should be fetched by the host.
• An incoming packet is sent by the host with a selected I2C slave address and the
direction bit is set as write.
• An outgoing packet is read by the host with a selected I2C slave address and the
direction bit is set as read.
• 0x00 will be sent as the response to host if the target is busy with processing or
preparing data.
The following flow charts demonstrate the communication flow of how the host reads
ping packet, ACK and response from the target.
Fetch
Ping response
Yes
Yes
End
Report Error
No
No
Read 1 byte
from target
0x5A
received?
packet
Read leftover bytes
of ping response
0x7A
received?
Read 1 byte
from target
Figure 13-18. Host reads ping response from target via I2C
Chapter 13 Kinetis Flashloader
K22F Sub-Family Reference Manual , Rev. 3, 7/2014
Freescale Semiconductor, Inc.
315