參數(shù)資料
型號(hào): AN2635
廠商: 飛思卡爾半導(dǎo)體(中國(guó))有限公司
英文描述: On-Chip FLASH Programming Routines
中文描述: 片上閃存編程例程
文件頁數(shù): 32/36頁
文件大?。?/td> 150K
代理商: AN2635
On-Chip FLASH Programming Routines, Rev. 4
32
Freescale Semiconductor
On-Chip Routines Source Code
;*********************************************************************
;* Step 7 and Step 8 are repeated until a value in location LADDR+1
;* reaches to zero.
;*********************************************************************
PRGstep7: pshx ;[2] temp flash pointer (lo) [F]
pshh ;[2] temp flash pointer (hi) [G]
;* Current stack frame
;* SP+1 [G] flash pointer (hi) temp store so H:X available
;* SP+2 [F] flash pointer (lo) temp store so H:X available
;* SP+3 [E] PCH (return addr hi)
;* SP+4 [D] PCL (return addr lo)
;* SP+5 [C] bytes remaining to prog..not counting this block
;* SP+6 [B] LADDR+1
;* SP+7 [A] LADDR
clrh ;[1] clear upper half of H:X
ldx RamPntrLo ;[3] get DATA array pointer (lo)
lda DATA,x ;[3] read data from a DATA array
pulh ;[2] restore flash pointer (hi) [G]
pulx ;[2] restore flash pointer (lo) [F]
sta ,x ;[.w] write data to Flash addr
; (Prog Algo Step 7)
;*********************************************************************
;* Compute Tprog based on bus speed
;* For slowest bus speeds (CPUSPD=4), Tprog = 38 bus cycles. For
;* other speeds, Tprog = 8 * CPUSPD + 5 bus cycles.
PRGstep8: ;delay for Tprog (Prog Algo Step 8)
lda CPUSPD ;[3]
cmp #4 ;[2] if CPUSPD=4 (bus = 1MHz),
beq PRGstep9 ;[3] Tprog=38 cycles
asla ;[1] for other cases
sub #9 ;[2] A = 2 x CPUSPD - 9
DelayPRG: nop ;[1] 1~ delay
dbnza DelayPRG ;[3] Tprog = 8 * CPUSPD + 5 cycles
PRGstep9: ; (Prog Algo Step 9)
aix #1 ;[2] point to next FLASH address
inc RamPntrLo ;[4] increment DATA array pointer
dec ByteCntr ;[4] decrement byte counter
bne PRGstep7 ;[3] loop until byte counter is = 0
rol 1,sp ;[5] ROL/ROR/SEI makes 12~ delay
ror 1,sp ;[5] to match delay to PRGstep10
sei ;[2]
PRGstep10: lda #mHVEN ;[2] clear PGM, leave HVEN=1
sta
FLCR
;[..w.]
(Prog Algo Step 10)
PRGstep11: lda CPUSPD ;[3] delay for time Tnvh
dbnza * ;[3*CPUSPD] (Prog Algo Step 11)
PRGstep12: clra ;[1] pattern to clear HVEN
sta FLCR ;[..w.] clear HVEN bit in FLCR
相關(guān)PDF資料
PDF描述
AN4009 ALARM IC SAMPLE APPLICATIONS
ARP2805D/SF 1-OUTPUT 150 W DC-DC REG PWR SUPPLY MODULE
AS1977-T nPower Single Comp. Open-Drain; Package Type: SOT23-5
AS1976-T nPower,Single Comp. Push-Pull; Package Type: SOT23-5
AT45D161 16-megabit 5-volt Only Serial DataFlash(16M位 5V串行數(shù)據(jù)閃速存儲(chǔ)器)
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN264 制造商:Panasonic Industrial Company 功能描述:IC
AN-264 制造商:AD 制造商全稱:Analog Devices 功能描述:DYNAMIC CHARACTERISTICS OF TRACKING CONVERTERS BY MARK THOMAS
AN2640K 制造商:未知廠家 制造商全稱:未知廠家 功能描述:VHD VIDEO DISC PLAYER CHROMA AND LUMINANCE PROCESSING CIRCUIT
AN2641 制造商:Distributed By MCM 功能描述:USB FILE TRANSFER CABLEPC / MAC 制造商:MCM 功能描述:USB FILE TRANSFER CABLE PC / MAC
AN265 制造商:SILABS 制造商全稱:SILABS 功能描述:2ND-GENERATION PROSLIC㈢ GUI USER’S GUIDE