...the world's most energy friendly microcontrollers
2014-01-23 - an0820_Rev1.00
10
www.silabs.com
3 EFM32 USB CCID Implementation
The USB CCID (Circuit Card Interface Device) smart card reader in the attached software example,
implements a T=0 interface device only (byte-level transmission protocol, as defined in ISO/IEC 7816-3).
This means that the higher level details of the communication with the smart card (authentication, file
access etc.) is handled by the USB Host, which usually is a PC. Most of the protocol negotiation is also
handled by the host. The EFM32's job is to act as a USB - smart card bridge, transferring data packets
between the two and only handle T=0 protocol error conditions. For a complete implementation, other
error conditions such as electrical faults should also be detected and responded to accordingly, usually
by disconnecting the card immediately.
Figure 3.1 (p. 10) gives an overview of what is covered by the USB CCID standard (see Reference
1 (p. 20) ). It only covers the interface and protocol handling the transmission of APDU-packets
between the card reader and the USB host. The EFM32 implementation also includes the T=0 interface
protocol for communication with the smart card itself. From here on the EFM32 card reader is referred
to as the CCID.
Figure 3.1. Smart Card USB CCID Device Class Standard
USB CCID
Device Class
St andard
EFM32 Sm art Card
Reader
3.1 USB CCID Standard
The CCID Standard (Reference 1 (p. 20) ) covers the USB communication including USB pipes used,
message formats, as well as all error conditions needed for conveying APDUs between the application
running on the USB host and the CCID. The format of the messages, message sizes and error-conditions
change according to the protocol used to communicate between the CCID and the smart card. This
makes it possible for the CCID to implement a high degree of automatism in the interaction with the
smart card. For instance, for T=1, which is block oriented, larger blocks of data can be transferred in
each USB packet to increase speed.
The CCID uses one Bulk-OUT Endpoint, one Bulk-In Endpoint and also one optional Interrupt Endpoint
to communicate with the host. Each message sent between Host and CCID contains a header which has
Summary of Contents for EFM32
Page 27: ......