beautypg.com

Protocol, Device firmware upgrade introduction, Dfu specific requests – Rainbow Electronics AT89C5132 User Manual

Page 10: Dfu descriptors set, Dfu device descriptor

background image

10

AT89C5132

4256A–USB–06/03

Protocol

Device Firmware Upgrade
Introduction

Device Firmware Upgrade is the mechanism for accomplishing the task of upgrading the
device firmware. Any class of USB device can exploit this capability by supporting the
requirements specified in this document.

Because it is impractical for a device to concurrently perform both DFU operations and
its normal run-time activities, those normal activities must cease for the duration of the
DFU operations. Doing so means that the device must change its operating mode; i.e., a
printer is not a printer while it is undergoing a firmware upgrade; it is a PROM program-
mer. However, a device that supports DFU is not capable of changing its mode of
operation on its own. External (human or host operating system) intervention is
required.

DFU Specific Requests

In addition of the USB standard requests, 7 DFU class-specific requests are employed
to accomplish the upgrade operations, see the following table.

DFU Descriptors set

The device exports the DFU descriptor set, which contains:

A DFU device descriptor

A single configuration descriptor

A single interface descriptor (including descriptors for alternate settings, if present)

A single functional descriptor

DFU Device Descriptor

This descriptor is only present in the DFU mode descriptor set. The DFU class code is
reported in the bDeviceClass field of this descriptor.

Table 5. USB Parameters

Table 4. DFU Class-specific Requests

bmRequestType

bRequest

wValue

wIndex

wLength

Data

0010 0001b

DFU_DETACH (0)

wTimeout

Interface (4)

Zero

none

0010 0001b

DFU_DNLOAD (1)

wBlock

Interface (4)

Length

Firmware

1010 0001b

DFU_UPLOAD (2)

wBlock

Interface (4)

Length

Firmware

1010 0001b

DFU_GETSTATUS (3)

Zero

Interface (4)

6

Status

0010 0001b

DFU_CLRSTATUS (4)

Zero

Interface (4)

Zero

none

1010 0001b

DFU_GETSTATE (5)

Zero

Interface (4)

1

State

0010 0001b

DFU_ABORT (6)

Zero

Interface (4)

Zero

none

Parameter

ATMEL – AT89C5132 bootloader

Vendor ID

0x03EB

Product ID

0x2FFF

Release Number

0x0000