beautypg.com

Attaching the dfu class device, Transfer phase – flash programming, Dfu download request – Maxim Integrated 73S1217F Device Firmware Upgrade Host Driver/Application User Manual

Page 7: Dfu get status request

background image

UG_12xxF_029

73S1215, 73S1217F DFU Host Driver/Application Development User’s Guide

Rev. 1.00

7

2.2.2 Attaching the DFU Class Device

Upon receiving escape command or dfu_detach, firmware boots up in DFU mode. This time USB-DFU
driver (TSCDFU.sys) will be loaded by operating system (if driver is already installed, otherwise a new
hardware found wizard will pop up by Windows). See the 73S1215F, 73S1217F Windows XP 32 USB
CCID and DFU Drivers Installation Guide
on how to install drivers. USB-DFU driver (TSCDFU.sys) will
enumerate the firmware for DFU class.

2.3 Transfer Phase – Flash Programming

During the transfer, the Boot Loader will process a tight loop to collect DFU_DNLOAD packets from the
host. Upon receiving the first valid Intel Hex record

2.3.1 DFU Download Request

, the entire Application Code section of Flash will be

erased. Note: the firmware will need about 2.3 seconds to erase the whole 58K of Flash. It is
recommended that the host/driver allow the firmware ample time to complete this task after the first Intel
record. Thereafter, from the second record on, each record is written as soon as it is received.

After each downloaded block, the host solicits the device status with the DFU_GETSTATUS request. In
order to speed up the firmware programming process, the Boot Loader Code will accept DFU_DNLOAD
packets in sequential order without the need to get (and report to) a DFU_GETSTATUS request in
between DFU_DNLOAD packets. When the last record of the file (record type = 0x01 indicating an End
of File record) is received by the firmware, it will wait for a DFU_DNLOAD packet of zero length before it
transitions to the Manifestation Phase.

IOCTL : #define

IOCTL_DFUTSC_DFU_DNLOAD

SCARD_CTL_CODE(2101)

IN

: input (request) buffer length

IN

: input (request) buffer

OUT : not required
RETURN: NTSTATUS
Supported driver :

tscdfu.sys

Driver tscdfu.sys exposes this IOCTL_DFUTSC_DFU_DNLOAD to transfer (new) firmware file (Intel
record/hex format only) to the device. The Intel hex record has to be parsed by the host application.
Host appication should send each record in the “input buffer” with the “input buffer length”. Once the
driver/tscdfu.sys receives this IOCTL with data, it will transfer the data to the device. Upon completion, the
driver returns NTSTATUS to the host application.

2.3.2 DFU Get Status Request

IOCTL :

IOCTL_DFUTSC_DFU_GETSTATUS

SCARD_CTL_CODE(2103)

IN

: input (request) buffer length (size 6)

IN

: input (request) buffer (of 6 bytes)

OUT : output(response) buffer length
OUT : output(response) buffer
RETURN: NTSTATUS
Supported driver :

tscdfu.sys


Driver tscdfu.sys exposes this IOCTL_DFUTSC_DFU_GETSTATUS to facilitate synchronization with the
device. The driver tscdfu.sys expects 6 bytes of input/output buffer. The firmware responds with status
data in 6-byte buffer. The driver fills the information returned by the firmware in the output buffer and
sends it back to the host application. Refer to Section 6.1.2 of the USB Device Class Specification For
Device Firmware Upgrade
, Revision 1.1 (DFU Class Specification) for interpretation of the 6-byte status
returned by firmware/driver to the host application.

This manual is related to the following products: