AN2398 Freescale Semiconductor / Motorola, AN2398 Datasheet - Page 7

no-image

AN2398

Manufacturer Part Number
AN2398
Description
In-Circuit Programming of FLASH Memory via the Universal Serial Bus for the MC68HC908JB8
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MOTOROLA
In-Circuit Programming of FLASH Memory via the USB for the MC68HC908JB8
Program Row
Erase Block
Verify Row
Get Result
Command
After the user code is programmed, the high byte of the pseudo reset vector is
in the valid range (between $DC and $F7) and the ICP_FLAG word is
programmed with the checksum (checksum cannot be $0000). After an unplug
and replug, the ICP code jumps to the user code for normal operation.
There are two ways for the JB8 to re-enter ICP mode:
The user code may include a specific command to program the ICP_FLAG.
Once the ICP_FLAG is programmed with zero, the JB8 enters ICP mode when
the device is re-plugged.
The ICP code supports limited USB standard requests as listed below:
It has defined some vendor-specific requests as below:
The above vendor-specific requests provide the necessary commands to
erase, program, and verify the user FLASH area.
One byte result will be returned duration the Get_Status command. The result
indicates whether the last commands of Program_Row, Erase_Block or
Verify_Row is successful.
Freescale Semiconductor, Inc.
For More Information On This Product,
Program the ICP_FLAG word to $0000; or
Pull PTA0 pin to logic 0.
Get Descriptor
Get Status
Set Address
Set Configuration
Clear Feature
Success if result is $01
Failure if result is $04
BmRequest
Type
$C0
$40
$40
$40
Go to: www.freescale.com
Table 3. Vendor-Specific Requests
bRequest
$81
$82
$87
$8F
Address
Address
Address
Address
wValue
Start
Start
Start
Start
Address
Address
Address
Address
wIndex
End
End
End
End
wLength
Length
Length
USING THE ICP CODE
Data
Data
$00
$01
AN2398/D
Result
Data
Data
$00
$00
7

Related parts for AN2398