Dfu – phases of operation, Enumeration phase, Detaching the ccid class device – Maxim Integrated 73S1217F Device Firmware Upgrade Host Driver/Application User Manual
Page 6: Escape command, Dfu detach request, 2 dfu – phases of operation

73S1215, 73S1217F DFU Host Driver/Application Development User’s Guide
UG_12xxF_029
6
Rev. 1.00
2 DFU – Phases of Operation
The USB Device Firmware Upgrade Specification Revision 1.1 identified four distinctive phases of
operation:
1. Enumeration Phase
2. Reconfiguration Phase
3. Transfer Phase
4. Manifestation Phase
This user guide describes the IOCTLs as supported by Teridian’s CCID-DFU driver and DFU driver.
2.1 Enumeration Phase
The specific driver being installed is dependent on the Firmware’s Device Class type provided as part of
the enumeration. If the firmware’s DFU Boot Loader code is running, the DFU driver will be installed. If
the firmware’s CCID code is running, the CCID driver will be installed. Refer to the 73S1215F, 73S1217F
Boot Loader – DFU Class Firmware Application Note for details of this phase of operation. No DFU’s
IOCTL are exposed by the CCID driver during this phase.
2.2 Reconfiguration Phase – Detach CCID Class/Attach DFU Class
There are two distinctive steps to transition and complete a successful reconfiguration phase: Detaching
the CCID Class Device and Attaching the DFU Class Device. Section 2.2.1 describes the methods of
detaching the CCID Class Device. Review the 73S1215F, 73S1217F Boot Loader – DFU Class Firmware
Application Note for firmware’s behavior when these commands are processed.
2.2.1 Detaching the CCID Class Device
Once the USB-CCID driver (ccidDFUtsc.sys) is loaded successfully, at anytime the host may start
detaching the USB-CCID driver by one of two ways: USB-CCID’s Escape Command or DFU_Detach
Request. After successful execution of either of these two commands, the CCID driver will be detached
and loading of the DFU driver will begin.
2.2.1.1 Escape Command
IOCTL : #define
IOCTL_DFU_ESCAPE SCARD_CTL_CODE(3500)
Supported driver :
ccidDFUtsc.sys, tscdfu.sys
IN
: input (request) buffer length (size 5)
IN
: input (request) buffer ({0x41,0x00,0x00,0x00,0x00})
RETURN: NTSTATUS
Supported driver :
ccidDFUtsc.sys
When the driver receives this IOCTL it will send an Escape command to the device. Review Section
5.2.4 of the 73S1215F, 73S1217 CCID Application Note for more details of this function.
2.2.1.2 DFU Detach Request
IOCTL : #define
IOCTL_DFUTSC_DFU_DETACH
SCARD_CTL_CODE(2100)
IN
: not required
OUT : not required
RETURN: NTSTATUS
Supported driver :
ccidDFUtsc.sys, tscdfu.sys
When the driver receives this IOCTL, it sends a DFU_DETACH Class Specific Request to the device.
Review the 73S1215F, 73S1217F Boot Loader – DFU Class Firmware Application Note for firmware’s
behavior when, and after, this command is executed.