Mfi 2.0B
Mfi 2.0B
Mfi 2.0B
0B
.
td n
n s L m.c
Su stic .co
st u d
re co th
Fo D A (at) 781
TH st -00
Specification
e 7
for -0
2009-07-27
6
Release R5
C5
Fo D A (at) 781
TH st -00
for -0
re co th
ENTIRE RISK AS TO ITS QUALITY AND
ACCURACY.
Apple Inc.
IN NO EVENT WILL APPLE BE LIABLE FOR
C5
st
reproduced, stored in a retrieval system, or THE WARRANTY AND REMEDIES SET
e
transmitted, in any form or by any means, FORTH ABOVE ARE EXCLUSIVE AND IN
LIEU OF ALL OTHERS, ORAL OR WRITTEN,
mechanical, electronic, photocopying, EXPRESS OR IMPLIED. No Apple dealer, agent,
recording, or otherwise, without prior or employee is authorized to make any
modification, extension, or addition to this
6
Su stic .co
above limitation or exclusion may not apply to
to print copies of documentation for you. This warranty gives you specific legal
personal use provided that the rights, and you may also have other rights which
vary from state to state.
documentation contains Apple’s copyright
notice.
The Apple logo is a trademark of Apple Inc.
7
re co th
Contents
C5
st
e
Chapter 1 Introduction 7
6
Overview 7
Authentication Protocol 7
Terminology Used in This Document 8
Su stic .co
Related Documents 9
System Voltage 15
Reset 15
Communication Modes 15
Low-Power Sleep Mode 16
d
Register Addresses 17
Register Descriptions 19
Device Version 19
Firmware Version 20
Authentication Protocol Major and Minor Versions 20
td n
Device ID 20
Error Code 20
Authentication Control and Status 21
Signature Data Length 22
Signature Data 22
.
3
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C O N T E N T S
Fo D A (at) 781
TH st -00
iPod Certificate Data Length 24
iPod Certificate Data 25
for -0
re co th
Chapter 5 Authentication Data Flows 27
C5
st
e
Chapter 6 I2C Communication Protocol 31
6
Su stic .co
Writing to the Coprocessor 31
Reading from the Coprocessor 32
4
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
Fo D A (at) 781
TH st -00
for -0
re co th
Figures and Tables
C5
st
e
Chapter 1 Introduction 7
6
5
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
F I G U R E S A N D T A B L E S
Fo D A (at) 781
TH st -00
Chapter 7 SPI Communication Protocol 33
for -0
re co th
Figure 7-1 SPI_nSS timing 33
Figure 7-2 SPI data transmission timing 35
C5
Figure 7-3 Command byte that starts an SPI write action to the CP 35
Figure 7-4 Coprocessor write timing 36
Figure 7-5 Command byte that starts a read action from the CP 36
st
Figure 7-6 Coprocessor read timing 37
e
Table 7-1 Maximum SPI transaction delay times 34
6
Su stic .co
Figure 8-1 Typical power-on reset timing and voltage limits 41
Figure 8-2 Typical external reset timing and voltage limits 42
Figure 8-3 Typical I/O port input waveform 42
Figure 8-4 2.0B iPod Authentication Coprocessor QFN-20 package 43
7
6
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 1
Fo D A (at) 781
TH st -00
Introduction
for -0
re co th
C5
st
e
6
Su stic .co
NOTICE OF PROPRIETARY PROPERTY: THE INFORMATION CONTAINED HEREIN IS THE
PROPRIETARY PROPERTY OF APPLE INC. THE POSSESSOR AGREES TO THE FOLLOWING: (I)
TO MAINTAIN THIS DOCUMENT IN CONFIDENCE, (II) NOT TO REPRODUCE OR COPY IT,
(III) NOT TO REVEAL OR PUBLISH IT IN WHOLE OR IN PART, (IV) ALL RIGHTS RESERVED.
ACCESS TO THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN IS GOVERNED
7
BY THE TERMS OF THE MADE FOR IPOD LICENSE AGREEMENT AND/OR THE IPOD
TECHNOLOGY EVALUATION LICENSE AND CONFIDENTIALITY AGREEMENT. ALL OTHER
n
u
USE SHALL BE AT APPLE’S SOLE DISCRETION.
Overview
Earlier versions of the iPod Authentication Coprocessor (1.0 and 2.0A) were implemented in a QFN-40
package. The current version, 2.0B, is available in two smaller and more efficient industry-standard
packages: the QFN-20 (20-pin Quad Flat No-lead) package and the SOP-8 (8-pin Small Outline)
package. This document describes the configuration, usage, and specifications of Apple’s iPod
Authentication Coprocessor 2.0B in both packages.
td n
Authentication Protocol
The authentication protocol supported by the iPod Authentication Coprocessor 2.0B is based on
.
standard X.509 version 3 certification. Each certificate is generated and signed by a recognized certificate
authority and has a unique serial number. Information about the X.509 standard can be found at the
IETF website http://tools.ietf.org/html/3280.
For information about the iAP General lingo commands required to perform authentication using
the iPod Authentication Coprocessor 2.0B, see Apple’s iPod Accessory Protocol Interface Specification,
Release R36.
Overview 7
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 1
Introduction
Fo D A (at) 781
TH st -00
The iPod Authentication Coprocessor 2.0B supports iAP General lingo commands 0x14 through 0x1F,
providing five authentication-related services:
for -0
re co th
For iPod authentication of the accessory:
C5
■ Certificate delivery: To initiate authenticatication of the accessory that contains it, the CP supplies
an X.509 digital certificate for public key verification by the attached iPod.
Signature generation: To complete authentication of the accessory that contains it, the CP generates
st
■
a valid digital signature in response to a challenge from an attached iPod. This signature authorizes
e
the iPod to respond to messages and commands from the accessory.
6
■ iPod certificate validation: To initiate the authentication of an iPod attached to an accessory, the
Su stic .co
CP verifies that the X.509 certificate supplied by iPod has been signed by the proper certificate
authority.
■ Challenge generation: To continue the authentication of an iPod attached to an accessory, the
accessory’s CP can generate a challenge to be sent to the iPod.
7
■ Signature verification: To complete the authentication of an iPod attached to the accessory, the
n CP can verify the signature returned by the iPod in response to the previous challenge.
u
Terminology Used in This Document
Certain technical terms specific to this document are defined in Table 1-1.
Term Definition
d
application-specific logic.
Challenge A random number sent via iAP from an iPod to an accessory controller,
or vice versa. The device being challenged must perform a digital signature
td n
Digital signature The result obtained by performing a digital signing process on an offered
challenge.
.
iAP iPod Accessory Protocol. See Apple’s iPod Accessory Protocol Interface
Specification.
Fo D A (at) 781
TH st -00
Term Definition
for -0
re co th
I2C bus A 2-wire serial bus designed by Philips to allow easy communication
between components that reside on the same circuit board. The I2C
C5
st
SPI bus A 4-wire serial communications interface used by many microprocessor
e
peripheral chips.
STD configuration The standard temperature range configuration of the 2.0B coprocessor chip.
6
WTR configuration The wide temperature range configuration of the 2.0B coprocessor chip.
Su stic .co
X.509 certification A standard defined by the International Telecommunication Union (ITU)
that governs the format of certificates used for authentication and sender
identity verification in public-key cryptography. X.509 certificates contain
the public keys used in the iPod’s accessory authentication process.
7
Parts of this document contain specification requirements that are incorporated by reference into legal
n
agreements between Apple Inc. and its licensees. The use of the words “must,” “should,” “may,” and
u
“reserved” in these specifications have the following meanings:
■ “May” means that the indicated action or feature does not contravene this specification.
■ When a data field is marked “reserved,” accessories writing to it must set it to 0 and accessories
reading it must ignore its value.
Related Documents
td n
For further information about authenticating iPods and their attached accessories, see the iPod Accessory
Protocol Interface Specification, Release R36.
.
Related Documents 9
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 1
Introduction
Fo D A (at) 781
TH st -00
for -0
re co th
C5
st
e
6
Su stic .co
7
n
u d
s L m.c
td n
.
10 Related Documents
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 2
Fo D A (at) 781
TH st -00
Signal Descriptions and Reference Circuits
for -0
re co th
C5
st
e
6
Su stic .co
This chapter defines the pinout, signals, and reference circuitry of the iPod Authentication Coprocessor
2.0B supplied by Apple, Inc.
n
u
The 2.0B CP chip signal descriptions are given in Table 2-1 and its pinouts for both QFN-20 and SOP-8
packages are shown in Figure 2-1 (page 11).
Fo D A (at) 781
TH st -00
Figure 2-1 CP chip pinouts, top view
for -0
I2C_SDA/SPI_SOMI
I2C_SCL/SPI_SIMO
re co th
MODE0/SPI_CLK
C5
VSS
st
e
8 7 6 5
NC
NC
NC
NC
NC
20 19 18 17 16
6
NC 1 15 NC
Su stic .co
MODE1/SPI_nSS 2 14 MODE0/SPI_CLK
(top view)
NC 3 (top view) 13 I2C_SDA/SPI_SOMI
nRESET 4 12 I2C_SCL/SPI_SIMO
VCC 5 11 VSS
7
6 7 8 9 10
n
u
NC
NC
NC
NC
NC
1 2 3 4
MODE1/SPI_nSS
NC
nRESET
VCC
QFN-20 package SOP-8 package
Note: The MODE0 and MODE1 inputs must not be left unconnected. The next section describes their
usage.
d
s L m.c
When nRESET is driven low to initiate a CP reset cycle, the states of MODE0 and MODE1 must be
set to select the CP’s communication mode, as shown in Table 2-2 (page 13). After nRESET goes high,
td n
the states of these and the other CP inputs must be held static for at least 30 ms to complete the reset
cycle (see “Reset” (page 15)). After reset completion, if SPI mode has been selected, the MODE0 input
switches its functionality to SPI_CLK and the MODE1 input switches to SPI_nSS.
.
Fo D A (at) 781
TH st -00
Table 2-2 Mode selection signals
for -0
re co th
Signal state Communication mode I2C addresses
MODE1 MODE0 Write Read
C5
st
0 1 Reserved
e
1 0 0x20 0x21
I2C slave mode
6
1 1 0x22 0x23
Su stic .co
See “Communication Modes” (page 15) for interface details of the communication modes listed in
Table 2-2.
n
u
The 2.0B CP may be used either as an I2C slave or an SPI slave, but not as both. The alternate uses of
QFN-20 pins 2, 12, 13, and 14 (SOP-8 pins 1, 6, 7, and 8) are shown in Table 2-1 (page 11). When the
CP chip is being reset, the states of QFN-20 pins 2 and 14 (SOP-8 pins 1 and 8) set its communication
mode to I2C or SPI, as described in “Communication Mode Selection” (page 12).
The reference circuit for I2C operation of the CP is shown in Figure 2-2.
VCC
d
s L m.c
VCC
10 k
VCC VSS
td n
0.1 F
.
Fo D A (at) 781
TH st -00
SPI Reference Circuit
for -0
re co th
The reference circuit for SPI operation of the CP is shown in Figure 2-3 (page 14).
C5
st
e
See note 1 MODE1/SPI_nSS MODE0/SPI_CLK See note 1
SPI_SOMI
VCC
6
VCC VSS
Su stic .co
0.1 F
■ Note 1: Hold MODE1 and MODE0 low at reset time (see “Communication Mode Selection” (page
12)). This selects SPI mode, after which the low signal on SPI_nSS addresses the CP as an SPI
n
u
slave.
■ Note 2: An active-low voltage supervisor (not shown) is recommended. nRESET should be
connected either to a GPIO on the accessory’s controller or to the active-low voltage supervisor.
Further details of external connections to the CP are given in “Hardware Configuration and
Interface” (page 15).
d
s L m.c
td n
.
Fo D A (at) 781
TH st -00 Hardware Configuration and Interface
for -0
re co th
C5
st
e
6
Su stic .co
This chapter describes the operating modes of the iPod Authentication Coprocessor 2.0B and the
ways that it interacts with other circuitry.
System Voltage
7
n
u
The 2.0B CP may be used either in an iPod-powered accessory or in a device that has its own power
source.
Reset
The nRESET pin may be used to force a reset of the CP. While nRESET is low, the CP does not operate.
After nRESET goes high, the states of all I/O pins must remain the same for at least 30 ms. After that
time, the CP is in its reset state and ready to operate.
d
The CP is available in both standard (STD) and wide temperature range (WTR) configurations (see
s L m.c
“Recommended Operating Conditions” (page 39)). If an attempt is made to operate either configuration
outside its specified temperature or voltage range, internal sensors will force it to its reset state. If this
happens, or if any unexpected error condition occurs, the CP should be brought back to its specified
operating environment and then externally reset.
Note: The nRESET pin must not be left unconnected and must be tied to VCC if not actively driven
by the accessory controller or another component, such as a voltage supervisor (the use of which is
td n
recommended).
Communication Modes
.
The CP may be addressed using either I2C or SPI. In both cases, the CP is the slave device. The
communication mode is set by the states of MODE1 and MODE0 when nRESET goes high, as described
in “Communication Mode Selection” (page 12).
System Voltage 15
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 3
Hardware Configuration and Interface
Fo D A (at) 781
TH st -00
When operating, the 2.0B CP chip is internally clocked at a nominal rate of 6 MHz.
for -0
When used in I2C mode, the CP is addressed as a standard 7-bit I2C slave. The I2C slave address is
re co th
configured upon reset and is based on the MODE0 input. The I2C effective slave address for writing
C5
is shown in Figure 3-1 (page 16) and the corresponding read address in Figure 3-2 (page 16).
Figure 3-1 2
I C slave write address
st
e
A6 A5 A4 A3 A2 A1 A0 R/nW
0 0 1 0 0 0 MODE0 0
6
Figure 3-2 2
I C slave read address
Su stic .co
A6
0
A5
0
A4
1
A3
0
A2
0
A1
0
A0
MODE0
R/nW
1
7
In I2C mode, the CP has both a write address and a read address, as is typical for an I2C device. The
I2C write address of the CP consists of the seven bits [A6:A0] followed by 0 for the R/nW bit. The I2C
n
u
read address of the CP consists of the seven bits [A6:A0] followed by 1 for the R/nW bit. If the MODE0
input is connected to ground, the write and read addresses of the CP are 0x20 and 0x21 respectively;
if it is pulled high, the write and read addresses of the CP are 0x22 and 0x23.
In SPI mode, the CP does not have a protocol-level slave address. Instead, as is typical for an SPI
device, the CP is addressed by means of its slave-select pin (SPI_nSS).
The 2.0B CP does not automatically enter a low-power mode. It can be forced to sleep by using the
s L m.c
Authentication Control/Status register. See “Authentication Control and Status” (page 21) for details.
Once it has gone into Sleep mode, the CP must be reset to resume normal operation. See “Reset” (page
15).
Note: To optimize accessory power usage, the CP should be put into Sleep mode whenever it is not
being used for authentication.
td n
.
Fo D A (at) 781
TH st -00
Coprocessor Registers
for -0
re co th
C5
st
e
6
Su stic .co
Registers within the iPod Authentication Coprocessor 2.0B (CP) are accessed via either I2C or SPI
transport, as discussed in “Communication Modes” (page 15). Also see “I2C Communication
Protocol” (page 31) and “SPI Communication Protocol” (page 33) for register addressing details and
telegram formats.
7
n
Register Addresses
u
Registers and their addresses in the CP are listed in Table 4-1. Each register is discussed in the sections
that follow.
Note: Registers in the same block with consecutive addresses may be read from sequentially in
increasing numerical order. With the exception of the iPod certificate data registers (addresses
0x51-0x5F), registers in the same block with consecutive addresses may also be written to sequentially
in increasing numerical order. Multibyte numeric values are stored in big-endian order; for example,
the first byte in a two-byte register is the MSB of the stored value and the second byte is its LSB.
d
s L m.c
Version
Register Addresses 17
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
Register
address
Block Register name Length
in bytes
Contents after
reset
Access mode
for -0
re co th
C5
st
e
0x12 1 Signature Data 128 Undefined Read/write
6
Su stic .co
0x21 2 Challenge Data 20 Undefined Read/write
Length
n
0x31 3 Accessory Certificate Data 128 Certificate Read-only
u
(Page 1)
(Page 5)
s L m.c
(Page 8)
18 Register Addresses
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00Register
address
Block Register name Length
in bytes
Contents after
reset
Access mode
for -0
re co th
0x3C 3 Accessory Certificate Data 128 Certificate Read-only
(Page 12)
C5
st
e
0x3E 3 Accessory Certificate Data 128 Certificate Read-only
(Page 14)
6
Su stic .co
0x40 4 Self-test Control/Status 1 0x00 Read/write
7
n
0x50 5 iPod Certificate Data Length 2 Undefined Read/write
u
0x51 5 iPod Certificate Data (Page 1) 128 Undefined Read/write
Register Descriptions
td n
This section describes the ways that the CP registers listed in Table 4-1 are used.
Device Version
.
The Device Version read-only register contain the version number of the coprocessor device. The
current Authentication 2.0B coprocessor is designated as device version 0x03. The previous 2.0A CP
is device version 0x02 and the 1.0 CP is device version 0x01.
Register Descriptions 19
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
Firmware Version
for -0
re co th
The Firmware Version read-only register contains the version number of the coprocessor firmware.
Firmware version numbers advance by whole integers.
C5
st
e
The Authentication Protocol Major Version and Authentication Protocol Minor Version read-only
registers provide the version number of the authentication protocol that the CP supports. This
6
Su stic .co
Device ID
The Device ID read-only register identifies the accessory and is accessed by the iAP command
7
n
u
Error Code
The Error Code read-only register stores the most recent communication or authentication process
error code generated since the register was last cleared. The error code register is cleared after it is
read. The possible error codes are listed in Table 4-2.
Code Description
0x00 No error
d
s L m.c
20 Register Descriptions
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
Code Description
for -0
re co th
0x0B–0xFF Reserved
C5
If a single communication operation happens to produce multiple errors (for example, by writing an
invalid signature length during a multiregister write that also attempts to continue past the end of
the corresponding block) then only the highest-numbered error code is stored.
st
e
Authentication Control and Status
6
The Authentication Control/Status read/write register provides control and status information for
the CP’s authentication processes.
Su stic .co
When read from, the Authentication Control/Status register provides the status of the most recently
requested CP process, as shown in Figure 4-1 and Tables 4-3 and 4-4.
7
n 7 6 5 4 3 2 1 0
u
ERR_SET PROC_RESULTS 0 0 0 0
Value Description
1 The Error Code register contains the most recent process or communication error. Both this
bit and the Error Code register itself are cleared after the Error Code register is next read.
d
s L m.c
Value Description
5-7 Reserved
When written to, the Authentication Control/Status register controls the start of CP processes, as
shown in Figure 4-2 and Table 4-5.
Register Descriptions 21
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
Figure 4-2 Authentication Control/Status register, write-only bits
for -0
7 6 5 4 3 2 1 0
re co th
0 0 0 0 0 PROC_CONTROL
C5
st
e
Table 4-5 Authentication PROC_CONTROL values
Value Description
6
0 No effect
Su stic .co
1 Start new signature-generation process
6-7 Reserved
Before a signature-generation process begins, this register should contain 0x80, the maximum allowable
s L m.c
signature length. After completion of the signature-generation process, the CP updates this register
to contain the actual length of the generated signature. This updated value should be read in order
to determine how much of the Signature Data register contains valid signature bytes.
Before a signature-verification process begins, this register should hold the actual length of the
signature being verified.
td n
Signature Data
In the case of a signature-generation process, the Signature Data read/write register holds the newly
generated signature. In the case of a signature-verification process, it holds the signature to be verified.
.
22 Register Descriptions
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
Challenge Data Length
for -0
re co th
The Challenge Data Length read/write register holds the length, in bytes, of the current challenge.
This challenge may either be written into the CP, during iPod authentication of an accessory, or
C5
Before starting a signature-generation process on the current challenge during iPod authentication
st
of an accessory, this register should contain the length of the challenge.
e
Before starting a new challenge-generation process during accessory authentication of an iPod, this
register should contain the requested challenge length.
6
The required length of a challenge, whether offered by the iPod or by an accessory, is 20 bytes. This
length requirement may not hold in future versions of the authentication protocol.
Su stic .co
Challenge Data
7
The Challenge Data read/write register holds the current challenge. This challenge may either be
written into the CP (during iPod authentication of an accessory) or generated by the CP (during
n
accessory authentication of an iPod).
u
Accessory Certificate Data Length
The Accessory Certificate Data Length read-only register holds the length of the X.509 certificate that
the iPod uses to authenticate an accessory. The length of a certificate varies but is always less than or
equal to 1920 bytes. This length limit may not hold for future versions of the authentication protocol.
The Accessory Certificate Data read-only register holds the X.509 Certificate that the iPod uses to
authenticate an accessory. The Accessory Certificate may be read from the coprocessor in 128-byte
pages starting at any Accessory Certificate Data Page address, or it may be read in a continuous
stream starting at Page 1. Since the length of the Accessory Certificate varies, fewer than all of the
pages may be used. The Accessory Certificate Data Length value can be read to determine which
Accessory Certificate Data Pages contain the certificate data.
td n
7 6 5 4 3 2 1 0
0 0 0 0 0 PROC_CONTROL
Register Descriptions 23
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
Note: Attempts to write to other bits are ignored.
for -0
re co th
Table 4-6 Self-test PROC_CONTROL values
C5
0 None
st
e
1 Run X.509 certificate and private key tests
2-7 Reserved
6
When read from, bits 7–4 of the Self-test Control/Status register report the results of the X.509 certificate
Su stic .co
and private key tests, as shown in Figure 4-4 and Table 4-7. The CP detects a read cycle and resets
the control/status register to 0x00 after it; hence bits 7–4 must all be retrieved in one operation.
7 6 5 4 3 2 1 0
n Self-Test results 0 0 0 0
u
Table 4-7 Self-test result bits
0 1
7 X.509 certificate Certificate not found Certificate found in memory (see note below)
6 Private key Private key not found Private key found in memory (see note below)
d
s L m.c
5-4 Reserved
Note: The X.509 and private key tests only verify that these elements are present in Flash memory;
no authentication is performed.
td n
and signature verification processes. The length of an iPod certificate varies but is always less than
or equal to 1024 bytes. This length limit may not hold for future versions of the authentication protocol.
24 Register Descriptions
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
iPod Certificate Data
for -0
re co th
The iPod Certificate Data register holds the X.509 Certificate that an accessory uses to authenticate
an iPod in both the certificate validation and signature verification processes. The iPod Certificate
C5
may be written to the coprocessor in 128-byte pages starting at any iPod Certificate Data Page address,
but it may not be written in a multipage stream. Since the length of the iPod Certificate varies, not all
of the pages need to be used. The iPod Certificate Data Length value determines which iPod Certificate
st
Data Pages contain valid certificate data.
e
6
Su stic .co
7
n
u d
s L m.c
td n
.
Register Descriptions 25
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 4
Coprocessor Registers
Fo D A (at) 781
TH st -00
for -0
re co th
C5
st
e
6
Su stic .co
7
n
u d
s L m.c
td n
.
26 Register Descriptions
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 5
Fo D A (at) 781
TH st -00
Authentication Data Flows
for -0
re co th
C5
st
e
6
Su stic .co
Authentication involves communication between the accessory controller (AC), the Authentication
Coprocessor (CP) in the accessory, and the iPod attached to the accessory.
Communication between the accessory controller and the CP takes place via the transport mode (I2C
or SPI) described in “Communication Modes” (page 15). Communication between the accessory
7
controller and the iPod takes place via the iPod Accessory Protocol. See the iPod Accessory Protocol
n
Interface Specification, Release R36, for full details.
u
This chapter summarizes the kinds of information that pass between the AC, the CP, and the attached
iPod.
The sequence of interactions by which an iPod authenticates an accessory is shown in Table 5-1 (page
27). At the beginning of this process the accessory controller is granted access by iPod to the iAP
lingo or lingoes it requests; however, if the process does not finish successfully that access is terminated.
d
s L m.c
StartIDPS (iAP) AC –> iPod The accessory controller initiates and completes
td n
Fo D A (at) 781
TH st -00Command or action Direction Comments
for -0
re co th
Read Accessory Certificate Length CP –> AC Accessory controller reads Accessory certificate
and Data from CP
C5
st
returned by the CP
e
AckDevAuthenticationInfo iPod –> AC The status of the authentication version
6
Su stic .co
GetDevAuthentication-
Signature (iAP)
iPod –> AC iPod sends accessory controller a challenge and
requests that it provide corresponding digital
signature
7
Write Challenge Length and AC –> CP Accessory controller writes challenge into CP
Challenge Data
n
u
Write Authentication Control: AC –> CP Accessory controller starts signature-generation
PROC_CONTROL = 1 process in CP
Wait for process completion CP –> AC Accessory controller waits for CP to finish
processing
Read Signature Data Length and CP –> AC Accessory controller reads signature from CP
Signature Data
d
Signature (iAP)
The sequence of interactions by which an accessory authenticates an iPod is shown in Table 5-2 (page
28).
.
Fo D A (at) 781
TH st -00
Command or action Direction Comments
for -0
re co th
The accessory controller performs the accessory identification and authentication processes listed
in Table 5-1 (page 27).
C5
These processes, by which the iPod authenticates the accessory, must finish successfully before the
sequence by which the accessory authenticates the iPod can continue.
st
GetiPodAuthenticationInfo AC –> iPod Accessory controller requests iPod
e
(iAP) authentication information
(iAP) certificate
Write iPod Certificate length and AC –> CP Accessory controller writes iPod Certificate
Su stic .co
data into CP
Wait for process completion CP –> AC Accessory controller waits for CP to finish
processing
n
u
Read Authentication Status CP –> AC Accessory controller reads Authentication
Status and checks PROC_RESULTS field
Wait for process completion CP –> AC Accessory controller waits for CP to finish
processing
d
s L m.c
Read Challenge Length and CP –> AC Accessory controller reads challenge from
Challenge Data CP
td n
Write Signature Data Length and AC –> CP Accessory controller writes digital signature
Signature Data into CP
Fo D A (at) 781
TH st -00
Command or action Direction Comments
for -0
re co th
Write Challenge Length and AC –> CP Accessory controller writes challenge into
Challenge CP (it needs to write this into the CP only if
C5
st
PROC_CONTROL = 3 signature-verification process in CP
e
Wait for process completion CP –> AC Accessory controller waits for CP to finish
6
processing
Su stic .co
status and checks PROC_RESULTS field
n
u d
s L m.c
td n
.
Fo D A (at) 781
TH st -00
I2C Communication Protocol
for -0
re co th
C5
st
e
6
Su stic .co
When configured for I2C mode, the iPod Authentication Coprocessor (CP) acts as an I2C slave.
I2C_SCL is the I2C clock line and is usually driven by the accessory controller. I2C_SDA is the I2C
data line and is driven by whichever device is currently sending data. The CP may perform I2C slave
7
clock synchronization by stretching I2C_SCL, so the accessory controller must allow for this possibility.
n
The maximum supported I2C clock rate is 50 kHz. If the I2C bus is shared with other devices, the CP
u
must either be put in Sleep mode or held in reset status during any communication that exceeds this
rate.
During reset, the MODE1 pin must be held high for at least 30 ms to select I2C operation, as described
in “Communication Mode Selection” (page 12). As an I2C slave, the CP is then selected in-band via
its I2C address. The least significant bit of the I2C slave address controls whether a write or a read
d
s L m.c
Coprocessor Busy
When the CP is busy processing it is unable to handle incoming communication attempts. If the
td n
coprocessor does not ACK its slave address during an attempted I2C communication, then the
coprocessor is busy. The accessory controller must repeatedly attempt communication until the
coprocessor sends an ACK after receiving its slave address.
.
Fo D A (at) 781
TH st -00
1. Send the I2C start sequence.
for -0
re co th
2. Send the I2C write address of the CP.
C5
3. Check for an ACK from the slave; if it is not received, loop back to Step 1.
st
5. Send the data bytes.
e
6. Send the I2C stop sequence.
6
Su stic .co
Reading from the Coprocessor
3. Check for an ACK from the slave; if it is not received, loop back to Step 1.
8. Check for an ACK from the slave; if it is not received, loop back to Step 6.
Any additional reads after an I2C read stop sequence continue with the byte following the previous
byte read until an invalid register address or an end of block is reached, at which point the slave
returns 0xFF in response to all further reads.
.
Fo D A (at) 781
TH st -00
SPI Communication Protocol
for -0
re co th
C5
st
e
6
Su stic .co
When configured for SPI mode, the iPod Authentication Coprocessor (CP) acts as an SPI slave.
The SPI clock (SPI_CLK) controls data transfer on the master-to-slave (SPI_SIMO) and slave-to-master
(SPI_SOMI) data lines; it must be driven by the accessory controller.
7
n
u
Slave Selection and Reset
To select SPI mode, both the MODE1 and MODE0 pins must be held low for at least 30 ms during
reset, as described in “Communication Mode Selection” (page 12).
Before attempting to communicate with the CP via SPI, the accessory controller must ensure that the
SPI slave-select pin (SPI_nSS) is low.
When SPI_nSS is low, the CP drives SPI_SOMI. When SPI_nSS is high, the CP leaves SPI_SOMI
undriven and ignores any activity on SPI_CLK and SPI_SIMO.
d
s L m.c
After completing a transaction, the accessory controller may return SPI_nSS high, but it is not required
to do so. A rising-edge signal on SPI_nSS causes the CP to reset its SPI module. If the CP is the only
SPI slave in the accessory, SPI_nSS may be tied directly to ground.
If SPI_nSS is not tied to ground, its timing relations with SPI_SOMI during a typical SPI transaction
are as shown in Figure 7-1. The TSOMI_READY and TSOMI_RELEASE times are shown in Table 7-1.
td n
T SOMI_READY T SOMI_RELEASE
SPI_nSS
Fo D A (at) 781
TH st -00
Table 7-1 lists the maximum values of various delays during SPI transactions by the CP. The accessory
controller should wait for at least these times at the appropriate stages of each transaction.
for -0
re co th
Table 7-1 Maximum SPI transaction delay times
C5
TSOMI_READY 50 µs Delay before SPI_SOMI indicates the ready status of the coprocessor
st
e
TSOMI_RELEASE 50 µs Delay between deasserting SPI_nSS and SPI_SOMI becoming a
high-impedance input
6
Su stic .co
Timing and Polarity
7
The CP latches the state of SPI_SIMO on the falling edge of SPI_CLK. The accessory controller should
update SPI_SIMO on the rising edge of SPI_CLK.
n
u
When SPI_nSS is low, the CP updates SPI_SOMI on the rising edge of SPI_CLK. The accessory
controller should latch SPI_SOMI on the falling edge of SPI_CLK.
For both SPI_SIMO and SPI_SOMI, the most significant bit of a data byte is the first to be transmitted.
Coprocessor Busy
When the coprocessor is busy processing it is unable to handle incoming communication attempts.
In SPI mode, the coprocessor uses its SPI_SOMI line to indicate when it is ready to communicate.
d
s L m.c
SPI_SOMI is set low when the coprocessor is busy and set high when the coprocessor is ready for
further communication.
Before starting a new SPI transaction, the accessory controller must wait for SPI_SOMI to be set high.
Once SPI_SOMI has been set high, the accessory controller may transmit the command and length
bytes. After receiving the command and length bytes, the coprocessor will be busy preparing for the
transaction. The coprocessor sets the SPI_SOMI line high when it is ready to continue with the data
byte portion of the transaction.
td n
The overall SPI data transmission timing is shown in Figure 7-2 (page 35).
.
Fo D A (at) 781
TH st -00
Figure 7-2 SPI data transmission timing
for -0
Cycle number 1 2 3 4 5 6 7 8
re co th
SPI_UCLK
C5
SPI_nSS
SPI_SIMO/
st
MSB LSB
SPI_SOMI
e
SPI data byte moved
to transmit buffer
6
Su stic .co
Writing to the Coprocessor
7
n
u
To write data to the CP using SPI, follow these steps:
1. Set SPI_nSS low and wait for the TSOMI_READY delay time before continuing (see Table 7-1 (page
34)).
3. Send the command byte on SPI_SIMO. This byte consists of a write bit plus the register address;
see Figure 7-3. SPI_SOMI goes low after the first bit.
6. Send the data bytes on SPI_SIMO; SPI_SOMI goes low after the first bit.
7. Wait for the TSOMI_READY delay time before continuing (see Table 7-1 (page 34)).
Figure 7-3 Command byte that starts an SPI write action to the CP
7 6 5 4 3 2 1 0
.
The overall timing of an SPI write transaction is shown in Figure 7-4 (page 36).
Fo D A (at) 781
TH st -00
Figure 7-4 Coprocessor write timing
for -0
re co th
SPI_CLK
C5
st
SPI_SOMI
e
Wait for SPI_SOMI high
6
before continuing
Su stic .co
Reading from the Coprocessor
1. Set SPI_nSS low and wait for the TSOMI_READY delay time before continuing (see Table 7-1 (page
n
u
34)).
3. Send the command byte on SPI_SIMO. This byte consists of a read bit plus the register address;
see Figure 7-5. SPI_SOMI goes low after the first bit.
6. Send a number of dummy bytes on SPI_SIMO equal to the number of data bytes to be read. While
the dummy bytes are being clocked out, read the incoming data bytes on SPI_SOMI.
d
s L m.c
7. Wait for the TSOMI_READY delay time before continuing (see Table 7-1 (page 34)).
Figure 7-5 Command byte that starts a read action from the CP
7 6 5 4 3 2 1 0
The overall timing of an SPI read transaction is shown in Figure 7-6 (page 37).
Fo D A (at) 781
TH st -00
Figure 7-6 Coprocessor read timing
for -0
T SOMI_READY
re co th
SPI_CLK
C5
st
e
SPI_SOMI data1 data2 dataN
6
Su stic .co
7
n
u d
s L m.c
td n
.
Fo D A (at) 781
TH st -00
for -0
re co th
C5
st
e
6
Su stic .co
7
n
u d
s L m.c
td n
.
Fo D A (at) 781
TH st -00
CP Device Characteristics
for -0
re co th
C5
st
e
6
Su stic .co
This chapter provides technical details and tolerances for the Apple iPod Authentication Coprocessor
2.0B (CP) chip.
n
u
Table 8-1 lists the CP’s absolute maximum electrical and free-air temperature ranges. Stresses to the
CP chip beyond the ranges listed in Table 8-1 may cause permanent damage. Exposure to either end
of any range for extended periods may affect device reliability.
The CP is available in both standard (STD) and wide temperature range (WTR) configurations. Internal
td n
sensors force it to its reset state if any of the conditions listed in Table 8-2 are exceeded. Attempting
to operate the CP in this state is not recommended and may lead to device failure or unreliability.
Fo D A (at) 781
TH st -00
DC Electrical Characteristics
for -0
re co th
Tables 8-3 through 8-5 show the DC electrical characteristics of the CP chip over its recommended
C5
voltage and temperature ranges. Unless otherwise specified in these tables, VCC = 1.8 to 3.6 V; for the
STD configuration, TA = –25 °C to +85 °C and for the WTR configuration, TA = –40 °C to +85 °C.
st
Table 8-3 Supply current into VCC, excluding external current
e
Parameter Test conditions Minimum Typical Maximum Unit
6
I(AM) 7.5 mA
Active mode (authentication process running)
Su stic .co
I(sleep)
Sleep mode
TA ≤ 50 °C
TA > 50 °C
100
200
µA
7
n
Table 8-4 Inputs
u
Symbol Parameter Test conditions Minimum Typical Maximum Unit
VIH High-level input voltage VCC = 2.2 to 3.6 VCC × 0.7 VCC + 0.3 V
VIL Low-level input voltage VCC = 2.2 to 3.6 –0.3 VCC × 0.2
VOH High-level output voltage IOH = +200 µA; VCC × 0.7 VCC V
40 DC Electrical Characteristics
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 8
CP Device Characteristics
Fo D A (at) 781
TH st -00
Timing Characteristics
for -0
re co th
This section documents the typical timing characteristics of the CP’s internal and external resets and
C5
its I/O inputs. In all cases, VCC = 1.8 to 3.6 V; for the STD configuration, TA = –25 °C to +85 °C and
for the WTR configuration, TA = –40 °C to +85 °C.
st
Figure 8-1 illustrates the timing of the CP’s internal reset during a typical power-on sequence. In the
e
diagram, TPOR1 represents the minimum time during which external power is held below VPOR1.
Table 8-6 lists the parameter values in Figure 8-1.
6
Su stic .co
VCC
T PWON1
VPOR1
VCC-min
7
n T POR1 T PRST
u
Internal reset signal
(Enable low)
TPWON1 Supply voltage rise time when power-on reset is 0.5 ms TPOR1 ≥ 1 sec
d
s L m.c
cancelled
1 ms TPOR1 ≥ 10 sec
Figure 8-2 illustrates a typical externally-controlled reset sequence, both immediately after power-up
td n
and at an arbitrary later time while power is on. Table 8-7 lists the parameter values in Figure 8-2.
.
Timing Characteristics 41
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
C H A P T E R 8
CP Device Characteristics
Fo D A (at) 781
TH st -00
Figure 8-2 Typical external reset timing and voltage limits
for -0
re co th
1.8V
VCC
C5
st
RES
VCC x 0.2 VCC x 0.2 VCC x 0.2
e
T RW L 1 T RW L 2
6
Su stic .co
TRLW1
TRLW2
Reset pulse width, cold reset
Figure 8-3 illustrates the CP’s typical I/O port input signal timing and voltage limits. Table 8-8 lists
n
u
the parameter values in Figure 8-3.
TF TR
The 2.0B CP is available in two packages: no-lead QFN-20 and SOP-8. The QFN-20 package is shown
in Figure 8-4 (page 43) and its dimensions in millimeters are listed in Table 8-9 (page 43). The SOP-8
package is shown in Figure 8-5 (page 44) and its dimensions in millimeters are listed in Table 8-10 (page
.
44). These drawings and their dimensions are subject to change without notice.
Fo D A (at) 781
TH st -00
Figure 8-4 2.0B iPod Authentication Coprocessor QFN-20 package
for -0
HD
re co th
D
11 12 13 14 15
C5
10 16
st
9 17
e
e
HE E 8 18
7 19
6
6 20
ZE
LP
Su stic .co x4
t
y1
ZD
5 4 3
b
b1
2 1
x M
7
Bottom View
c
c1
n A2 A
u
A1
y
D 4.0
E 4.0
A2 0.89
d
s L m.c
A 0.95
e 0.5
x 0.05
y 0.05
y1 0.20
t 0.20
Fo D A (at) 781
TH st -00
Symbol Minimum Nominal Maximum Notes
for -0
re co th
HD 4.2
C5
HE 4.2
ZD 1.0
st
e
ZE 1.0
Su stic .co
Mass 0.04 g
HD
n 8 5
u
HE
1 4
d
W
s L m.c
ZD
W1
A1 A c WA
e
W2
t
td n
b x M
Table 8-10 SOP-8 package dimensions in millimeters
A 1.73
Fo D A (at) 781
TH st -00
Symbol Minimum Nominal Maximum Notes
for -0
re co th
e 1.27
x 0.25
C5
t 0.10
st
HD 4.89 5.15
e
HE 3.90
6
ZD 0.69
Su stic .co
c 0.15 0.20 0.25 Palladium plated
W1 1.06
7
WA 0° 8°
n
u
W2 0.406 0.60 0.889
Mass 0.08 g
d
s L m.c
td n
.
Fo D A (at) 781
TH st -00
for -0
re co th
C5
st
e
6
Su stic .co
7
n
u d
s L m.c
td n
.
Fo D A (at) 781
TH st -00
Document Revision History
for -0
re co th
C5
st
e
6
Su stic .co
This table describes the changes to iPod Authentication Coprocessor 2.0B Specification.
Date Notes
Updated Table 5-1 (page 27) and Table 5-2 (page 28) to conform to current
n
u
IDPS and authentication processes (see iPod Accessory Protocol Interface
Specification, Release R36, Chapter 5 and Appendix B).
Added documentation for the SOP-8 package and WTR (wide temperature
range) configurations of the CP.
Provided values for maximum SPI transaction delay times (Table 7-1).
47
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.
R E V I S I O N H I S T O R Y
Document Revision History
Fo D A (at) 781
TH st -00
Date Notes
for -0
re co th
Widened storage temperature range (Table 8-1).
st
e
6
Su stic .co
7
n
u d
s L m.c
td n
.
48
2009-07-27 | © 2009 Apple Inc. All Rights Reserved.