
707
•
Sample 32-byte programming program
The wait time set values (number of loops) are for the case where f = 28.7 MHz. For other
frequencies, the set value is given by the following expression:
Wait time (µs)
×
f (MHz) ÷ 4
Registers Used
R4 (input):
Program data storage address
R5 (input):
Programming destination address
R7 (output):
OK (normal) or NG (error)
R0-3, 8-13:
Work registers
FLMCR1 .EQU H’80
FLMCR2 .EQU H’81
OK .EQU H’0
NG .EQU H’1
Wait10u .EQU 72
Wait50u .EQU 359
Wait4u .EQU 29
Wait2u .EQU 14
Wait200u .EQU 1435
WDT_TCSR .EQU H’FFFF8610
WDT_573u .EQU H’A579
SWESET .EQU B’01000000
PSU1SET .EQU B’00010000
P1SET .EQU B’00000001
P1CLEAR .EQU B’11111110
PSU1CLEAR .EQU B’11101111
PVSET .EQU B’00000100
PVCLEAR .EQU B’11111011
SWECLEAR .EQU B’10111111
MAXVerify .EQU 1000
;
FlashProgram .EQU $
MOV #H’01,R2
;
R2 work register (1)
MOV.L #PdataBuff,R0
;
Save program data to work area
MOV R4,R12
MOV #8,R13
COPY_LOOP .EQU $
Summary of Contents for SH7041 Series
Page 2: ......
Page 6: ......
Page 38: ...xvi ...
Page 44: ...6 ...
Page 46: ...8 ...
Page 48: ...10 ...
Page 82: ...44 ...
Page 114: ...76 ...
Page 118: ...80 ...
Page 124: ...86 ...
Page 170: ...132 ...
Page 250: ...212 ...
Page 492: ...454 ...
Page 506: ...468 ...
Page 604: ...566 ...
Page 684: ...646 ...
Page 706: ...668 ...
Page 778: ...740 ...
Page 780: ...742 ...
Page 818: ...780 ...
Page 850: ...812 ...
Page 923: ...SH7040 SH7041 SH7042 SH7043 SH7044 SH7045 Group Hardware Manual REJ09B0044 0600O ...