Download MC68F333 Flash EEPROM Programming Utilities

Transcript
******************************************************************************
* not_progd
- informs user of programming error
* not_blank
- informs user of blank check error
*
user enters escape to stop, any other key to continue programming
* exit
- d0 is $0 and Z flag is set if user wants to continue
*
d0 is non-zero, and Z flag is clear if user wants to abort
*****************************************************************************
not_progd:
bsr
Print
dc.b
'prog: program fail at address $',0
bra
n_b1
not_blank:
n_b1
bsr
dc.b
move.l
bsr
Print
'prog: EEPROM not blank, address $',0
a0,d0
print address
ltoh
bsr
dc.b
bsr
move
bsr
move
andi
cmpi
seq
tst
rts
Print
13,10,'prog: Press <esc> to stop, any other to continue: ',7,0
getchar
d0,-(a7)
save char
crlf
(a7)+,d0
get char
#$ff,d0
#$1b,d0
escape?
d0
make d0 nonzero if so
d0
set SR for subsequent test
******************************************************************************
* not_prog
- informs user of programming error
* Entry
- a0 contains fault address
*****************************************************************************
not_prog:
bsr
Print
dc.b
'prog: program failed before $',0
move.l a0,d0
print address
bsr
ltoh
bsr
crlf
rts
******************************************************************************
* dis_both
- disables both flash EEPROM modules
* exit
- no registers modified
*****************************************************************************
dis_both
move.w
move.w
rts
end
#flashdis,FEEMCR+FER_1
#flashdis,FEEMCR+FER_2
disable module 1 (set STOP)
disable module 2 (set STOP)
******************************************************************************
* Prog msg
- message file for programming driver
*****************************************************************************
prog
prog:
prog:
prog:
prog:
prog:
prog:
prog:
prog:
prog:
prog:
prog:
<filename> [<start>]
program M68F333 flash EEPROM from file
Usage error: prog <filename> [<start address>]
Error opening input file
Error evaluating <start> address parameter
End of file reached before S7/S8/S9 record was read
S9 record read - file closed normally
Checksum error in S-Record input file
Format error in S-Record input file; file is probably not S-Records
Programming error - check Vfpe / EEPROM is blank
Unhandled exception encountered
Programming completed O.K.
AN1255/D
MOTOROLA
23