beautypg.com

Starting the application, Request from host, Answer from bootloader – Rainbow Electronics AT89C5132 User Manual

Page 23

background image

23

AT89C5132

4256A–USB–06/03

Starting the Application

The flow described below allows to start the application directly from the bootloader
upon a specific command reception.

Two options are possible:

Start the application with a reset pulse generation (using watchdog).
When the device receives this command the watchdog is enabled and the
bootloader enters a waiting loop until the watchdog resets the device.
Ensure that if an external reset chip is used the reset pulse in output may be wrong
and in this case the reset sequence is not correctly executed.

Start the application without reset
A jump at the address 0000h is used to start the application without reset.

To start the application, the Host sends a DFU_DNLOAD request with the specified
application start type in the data field (3 or 5 bytes).

This request is immediately followed by a second DFU_DNLOAD request with no data
field to start the application with one of the two options.

Request from Host

Answer from Bootloader

No answer is returned by the device.

IN

Jump option (3 or 5 bytes)

SETUP

DFU_UPLOAD

OUT

ZLP

SETUP

DFU_UPLOAD

Command

Identifier

data[0]

data[1]

data[2]

data[3]

data[4]

Description

Id_write_command

04h

03h

00h

Hardware reset

01h

address

LJMP address