AN2398 Freescale Semiconductor / Motorola, AN2398 Datasheet - Page 23

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
;* ====================
;* It's an IN token
;* ====================
;
;* -------------------------------------------------------------------------
;* ====================
;* Nothing happened
;* ====================
;
TEST_NULL:
;
;* --------------------------------------------------------------------- *
;* RST_USB_IF - initialize USB module
;* --------------------------------------------------------------------- *
;
RST_USB_SIE:
;
ifeq
endif
;
;* ----------------------------------------------------------------------
;
;======================================================================
; Program + Verify
;
;
;
;
;
;
;
;
;
;======================================================================
PROG_CODE
;
*=========================================================
*
*=========================================================
;
;
MOTOROLA
Input: Flash address = START_ADD (2 bytes), END_ADD (2 bytes)
Data Buffer address
Usage:
Output: Acc = #ACK_SIGNAL (ok)
jsr
bra
USE_USB_IPULLUP
mov
mov
clr
mov
clr
clr
mov
Variables for Flash Program routines
Acc = #NOACK_SIGNAL (fail)
In-Circuit Programming of FLASH Memory via the USB for the MC68HC908JB8
TX_INT
MAIN_LOOP_ICP
#%00000100,UCR3
#$80,UADDR
UIR0
#%00010000,UCR0
UCR1
UCR2
#%10111111,UIR2
rts
ldhx
sthx
ldhx
jsr
= $004C - $008B (max 64 bytes)
END_ADD
V_LAddr
START_ADD
MONITOR_PROGRAM
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
; loop while timer not overflow
; enable internal D- pullup
; restore default addr($00), enable USB
; enable EP0 rx
; clear int. flags
; A
; Program FLASH in monitor code
*
APPENDIX: Code Listing
AN2398/D
23

Related parts for AN2398