Motorola M68EZ328ADS user manual Program Enable, Polling, Error, NOW Echo

Models: M68EZ328ADS

1 65
Download 65 pages 48.8 Kb
Page 36
Image 36

Freescale Semiconductor, Inc.

Programming On-board Flash Memory

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

move.l pSOURCE,A0 move.l pTARGET,A1

moveARCHIVED.l pSIZE,D0BY FREESCALE SEMICONDUCTOR, INC. 2005

move.l pFLASH,A5 move.l pFLASH,A6

*******************************************

* BreakPoint Here if program flash in SDS *

*******************************************

add.l #OFFSET1,A5 add.l #OFFSET2,A6

**************************************************

;*****************************************

;Input Parameters:

;a0 - (Long) Source Address

;a1 - (Long) Target Address

;d0 - (Long) Byte Size

;a5 - (long) Flash Starting Address Offset1

;a6 - (long) Flash Starting Address Offset2 ;*****************************************

 

move.l

a0,a2

; a2 as source

 

move.l

a1,a3

; a3 as target

 

clr.l

d1

; clear d1 as counter

 

clr.b

d5

; clear d5 as ECHO counter

PROGRAM

 

 

 

 

ENABLE

 

 

 

move.w

(a2),(a3)

; Copy source to target

 

clr.l

d4

; clear d4 as polling counter

POLLING

 

 

 

 

cmp.l

#TIME,d4

 

 

bgt

ERROR

; if d4>#TIME, bra ERROR

 

add.l

#1,d4

; d4++

 

move.w

(a2),d2

; Compare (a0),(a1)

 

move.w

(a3),d3

 

 

cmp.w

d2,d3

 

 

bne

POLLING

; End of POLLING

 

add.l

#2,a2

 

 

add.l

#2,a3

 

 

add.l

#2,d1

 

 

cmp.b

#0,d5

 

 

bne

NO_W

 

 

ECHO

'W'

 

 

ECHO

0

 

NO_W

add.b

#1,d5

 

C-35M68EZ328ADS v2.0 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Page 36
Image 36
Motorola M68EZ328ADS user manual Program Enable, Polling, Error, NOW Echo