亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pgm_alg.asm

?? ti dsp lf2407的flash接口程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;--------------------------------------------------------------------------------------------------
; Filename         : PGM_ALG.ASM	  
; Last Modified    : 23 Jan 2002.
; Version          : 1.3
; Originator       : Texas Instruments, DSP Digital Control Systems Group.
;--------------------------------------------------------------------------------------------------
; Description:
;
; This file contains the implementation of the core clear algorithm for 
; progamming user data into the LF240x Flash.
;--------------------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------
; Revision History
; 
; Ver 1.0 (25 May 2001)
; 
;           Comments: Derived from previous source code. Several modifications in place for 
;                     enhanced embeddability.
; Ver 1.1 (10 Aug 2001)
;           Comments: Added code to save/restore the hardware stack. This excludes the possibility
;                     of hardware stack overflow.
;
; Ver 1.2 (16 Oct 2001)
;           Comments: No changes to this file. Changed version number only.
; Ver 1.3 (23 Jan 2002)
;           Comments: 
;                   * Fixed a bug in this file:
;                     Near line 295 (now near line 315) a line of code had a direct address coded
;                     in for data space #0064h. This line is not in keeping with re-locatable 
;                     variables, and the functionality of this line was replaced with relocatable
;                     code when deriving v1.0.
;                     This line of code would corrupt the contents of memory location #0064h.
;                     Hence this line of code was removed.
;                     This line used to read as follows:
;;;;                  BLDD flashAlgoVars.DATA_PTR,#0064h ;Get the next data value to be programmed.
;                      
;                   * This program algorithm will work for DEV_TYPE LF2407 and LF2401A, see 
;                       ..\include\VAR.H on how to choose and set DEV_TYPE.
;
;                   * Modified the macros ACCESS_REGS and ACCESS_ARRAY to not use a hard coded data
;                     mem address. This is to bring these macros in line with the rest of the algo
;                     which uses allocated addresses. These macros still use a hard coded address
;                     for the i/o space address 0xff0f (0ff0fh) since that is a special address,
;                     which will always address the i/o latch which controls the flash memory
;                     mode.
;--------------------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------

;--------------------------------------------------------------------------------------------------
;
;--------------------------------------------------------------------------------------------------
; Symbols exported from this file
;--------------------------------------------------------------------------------------------------
        .globl  PROGRAM_FLASH

;--------------------------------------------------------------------------------------------------
; Import register definitions and symbol declarations.
;--------------------------------------------------------------------------------------------------
        .include ..\include\var.h

        .include ..\include\rundefs.h
;--------------------------------------------------------------------------------------------------
; Program sections generated by this file:
; All code in this algorithm implementation is assembled into the named section 'ALG_Text". 
; Any relocation sensitive code is placed in the named section 'PSPL_text'.
;--------------------------------------------------------------------------------------------------
            .sect     "PGM_text"

;--------------------------------------------------------------------------------------------------
; Define macros to set the Flash Mode.
; ACCESS_REGS gives access to the Flash Registers in the Pgm Mem Space and ACCESS_ARRAY  gives 
; access to the Flash ARRAY in Pgm Mem Space.
;
;--------------------------------------------------------------------------------------------------
ACCESS_REGS        .macro    
                OUT    flashAlgoVars.PAD,0ff0fh        
                .endm

ACCESS_ARRAY    .macro    
                IN     flashAlgoVars.PAD,0ff0fh
                .endm

;--------------------------------------------------------------------------------------------------
; Define Short DELAY loop macro. 
;  This will be used to generate a short delay upto 256 cycles.
;--------------------------------------------------------------------------------------------------
SDELAY          .macro  COUNT
                RPT     COUNT
                NOP
                .endm
;--------------------------------------------------------------------------------------------------



;--------------------------------------------------------------------------------------------------
; PROGRAM_FLASH:
;--------------------------------------------------------------------------------------------------
; This function is the implementation of the clear algorithm for the pre-erase preconditioning of 
; the flash array. This function is desginated as a LEVEL_1 subroutine.
;--------------------------------------------------------------------------------------------------
PROGRAM_FLASH:                          ; Call label for assembly-language client applications.
_programFlash:                          ; Call label for C-language client applications.
        .label  ProgramAlgoStartMain
        LDP     #flashAlgoVars.ADDR

STACK_SAVE:
        LAR     AR2,#flashAlgoVars.STACK0       ;Use AR2 to save the hardware stack.
        MAR     *,AR2                           ;Make AR2 the current AR

        RPT     #7                              ;Save all the 8 hardware stack locations
        POPD    *+                              ;into RAM block.
       
;--------------------------------------------------------------------------------------------------
; Enable the flash for programming:
; To accept programming commands the following must happen:
;   1. Place the flash in the register mode.
;   2. Copy the sector key to the SECT register.
;   3. Enable the core by setting Bit 0 of the ENAB Register
;--------------------------------------------------------------------------------------------------
ENABLE: ACCESS_REGS                                              ;Put the flash in register mode.

        LACC    #SECT                                            ;Enable sector.
        BLDD    #flashAlgoVars.SECTOR_CMD,flashAlgoVars.PAD      ;
        TBLW    flashAlgoVars.PAD       

        LACC    #ENAB                                            ;Enable core.
        SPLK    #0001h,flashAlgoVars.PAD                         ;
        TBLW    flashAlgoVars.PAD                                ;

;--------------------------------------------------------------------------------------------------
        SPLK    #0000,flashAlgoVars.FL_CMD                       ;
;--------------------------------------------------------------------------------------------------
;       BLDD    flashAlgoVars.DATA_PTR,#flashAlgoVars.DATA       ;Point to first data 
                                                                 ;to be programmed.
;--------------------------------------------------------------------------------------------------
; PGM:
;--------------------------------------------------------------------------------------------------
; This is the loop at the core of the program algorithm. This performs the following steps to 
; program the flash with the new contents of the flash
;   1.  Reads the flash.
;   2.  Compares the contents read out to those pointed to by the 
;       variable DATA_PTR.
;   3.  If any bits need to be programmed forms a bitmask and calls the PROG
;       routine to apply the program pulse.
;
;--------------------------------------------------------------------------------------------------
PGM:    SPLK    #MX_PCNT,flashAlgoVars.PLS_CNT  ;Initialise the pulse counter.

PGVERON:
        LACC    #WADDR                          ;Load WADDR with the address of 
                                                ;the word to be programmed.
        CALL    SETWADDR                        ;Call the routine to do so.

        LACC    flashAlgoVars.FL_CMD            ;Compose the flash command to read
                                                ;the user space in PROGVER mode.
        XOR     #0004h              
        SACL    flashAlgoVars.PAD    

        LACC    #CTRL                           ;Set up the PROGVER mode.
        TBLW    flashAlgoVars.PAD
        SDELAY  #T_pvsu                         ;Wait for T_pvsu(P)

        LACC    #PMPC                           ;Activate the PROGVER mode.
        SPLK    #0005h,flashAlgoVars.PAD    
        TBLW    flashAlgoVars.PAD
        SDELAY  #T_pva_e                        ;Wait T_pva(E)

        CALL    READWORD                        ;Read the word pointed to by ADDR.
    
PGVEROFF:
        SPLK    #0000h,flashAlgoVars.PAD1       ;Deactivate the PROGVER mode.
        CALL    CLRCMD

        SDELAY  #Tpv_h_P                        ; Wait for Program verify hold time

        SPLK    #0001h,flashAlgoVars.PAD1       ;Clear out PMPC and CTRL
        CALL    CLRCMD                          ;Since PMPC is cleared already, it is unchanged.

        SDELAY  #Tpv_h_C                        ;Hold the normal read mode.

;--------------------------------------------------------------------------------------------------
; Compare:
;--------------------------------------------------------------------------------------------------
; This section of code compares the data read out from the flash with the data
; intended to be programmed in the flash.
;   1.  Get the data read out during the read.
;   2.  Create a bitmask by XOR-ing the data read out during verify with the 
;       intended data pointed to by DATA_PTR.
;   3.  If not equal, builds the mask and calls the PROG routine.
;--------------------------------------------------------------------------------------------------
; Notes on building the mask:
;
; This implementation uses the Bitmask = DATA + !READ_Flash boolean expression for building the
; bitmask. (The + is the boolean operator OR, and ! is inversion.)
; The mask building works as follows:
;
;   1. Read the flash data. 
;   2. Invert this by XOR-ing this with 0xffff.
;   3. OR this with the reference data from the buffer.
;   4. Store the result as the mask into the DATA (subsequently sent to WDATA).
;
;   For example lets say the flash cells contain the 16 bits:  cccc cccc cccc cccc.
;
;   CCCC        cccc cccc cccc cccc  (flash contents)
;   XOR 
;   FFFF        1111 1111 1111 1111  (all ones mask)
;   ----        ---- ---- ---- ----
;   PPPP        pppp pppp pppp pppp  (intermediate result)
;   OR          
;   DDDD        dddd dddd dddd dddd  (reference data from RAM buffer)
;   ----        ---- ---- ---- ----
;   MMMM        mmmm mmmm mmmm mmmm  (mask for writing in WDATA)
;
;   Now the bits m are the result as p = ((C ^ 1) + y). The truth table for this is:
; 
;   d    c   c^1 or !c       m = p = !c + d  Action caused by m     Comments
;--------------------------------------------------------------------------------------------------
;   0    0    1              1               No pulse applied.      Note 1.
;   0    1    0              0               Pulse applied.         Note 2.
;   1    0    1              1               No pulse applied.      Note 3.
;   1    1    0              1               No pulse applied.      Note 4.
;
; 
; Note 1:  This is the case wheen the reference data is a 0 and the flash cell is a 0.
;          Clearly since Cell = Reference data, no pulse is needed, and this is what 
;          happens with WDATA = 1 for this bit.
;
; Note 2:  Case where the reference data is a 0, but the cell is a 1. So a pulse is 
;          applied, to program the cell to a 0.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合欧美一区二区三区| 国产91在线观看| 美女视频一区二区三区| 国产一区二区伦理片| 91极品视觉盛宴| 久久精品人人做人人综合| 亚洲国产美女搞黄色| 粉嫩aⅴ一区二区三区四区五区| 精品国产一区二区三区忘忧草| 色综合色综合色综合色综合色综合 | 韩国女主播一区| 色老汉一区二区三区| 久久久久亚洲蜜桃| 亚洲伊人伊色伊影伊综合网| 精油按摩中文字幕久久| 欧美在线不卡视频| 国产欧美日本一区视频| 久久国产精品99久久人人澡| 欧美三级日韩三级国产三级| 亚洲欧美影音先锋| 国产99精品视频| 精品久久国产老人久久综合| 日韩精品一二三区| 欧美性大战xxxxx久久久| 亚洲欧美在线视频| 暴力调教一区二区三区| 久久精品人人爽人人爽| 精品一区二区免费| 日韩免费观看高清完整版| 午夜精品福利一区二区蜜股av | 欧美色综合网站| 日韩一区欧美一区| 岛国精品一区二区| 国产日韩精品视频一区| 国产一区二区三区视频在线播放| www.色精品| 国产精品福利影院| 成a人片亚洲日本久久| 日本一区二区视频在线| 成人激情动漫在线观看| 中文字幕在线不卡一区| 成人性生交大片免费| 国产精品青草久久| 91在线免费看| 亚洲国产一区视频| 7777精品伊人久久久大香线蕉| 久久久高清一区二区三区| 日本欧美肥老太交大片| 精品乱人伦一区二区三区| 99精品欧美一区二区三区小说| 91久久精品一区二区| 亚洲国产成人porn| 日韩一区二区免费电影| 蜜桃精品在线观看| 亚洲精品在线三区| 成人av在线一区二区三区| 亚洲美女在线一区| 欧美一激情一区二区三区| 狠狠色2019综合网| 日韩码欧中文字| 欧美丰满少妇xxxxx高潮对白| 国产精品久久看| 色婷婷久久综合| 天堂一区二区在线免费观看| 久久九九久精品国产免费直播| 日韩一区精品视频| 国产网红主播福利一区二区| 日本久久电影网| 日本欧美一区二区| 国产精品久久影院| 9191久久久久久久久久久| 国产精品亚洲а∨天堂免在线| 欧美精品九九99久久| 国产一区二区三区免费观看| 亚洲人成精品久久久久| 日韩免费电影一区| 91视频xxxx| 国内精品视频一区二区三区八戒| 日韩亚洲欧美一区| 色哟哟亚洲精品| 韩日av一区二区| 午夜精品123| 精品99一区二区三区| 欧美日韩综合一区| 成人午夜av影视| 免费成人av在线| 亚洲一区二区在线免费看| 国产校园另类小说区| 欧美一区二区免费| 色八戒一区二区三区| 国产二区国产一区在线观看| 五月天网站亚洲| 亚洲精品视频在线观看网站| 久久青草欧美一区二区三区| 日韩一区二区三区在线观看 | 欧美色网站导航| av不卡在线观看| 国产成人免费视频一区| 蜜桃一区二区三区在线| 欧美精品色综合| 不卡大黄网站免费看| 中文字幕乱码一区二区免费| 亚洲精品在线电影| 欧美美女黄视频| 欧美网站一区二区| 91丨porny丨蝌蚪视频| 大桥未久av一区二区三区中文| 久久嫩草精品久久久精品一| 欧美日韩国产一级| 欧美性欧美巨大黑白大战| av在线播放一区二区三区| 成人性视频免费网站| 国产美女精品一区二区三区| 久久国产精品第一页| 日本不卡在线视频| 日本vs亚洲vs韩国一区三区二区| 精品久久久影院| 欧美一级理论片| 欧美精品色一区二区三区| 欧美主播一区二区三区| 欧美日韩一区小说| 欧美日韩黄视频| 欧美精品日日鲁夜夜添| 4438亚洲最大| 精品国产乱码久久| 久久久综合网站| 国产精品久久久久久一区二区三区| 欧美性欧美巨大黑白大战| 欧美另类高清zo欧美| 欧美日韩国产高清一区二区| 在线成人午夜影院| 精品乱人伦小说| 国产精品国产三级国产普通话99 | 久久久久久久久久久黄色| 精品三级在线看| 欧美mv和日韩mv的网站| 国产亚洲欧美日韩俺去了| 国产精品嫩草影院com| 亚洲欧美aⅴ...| 日韩中文字幕不卡| 国产一区在线观看麻豆| aa级大片欧美| 在线不卡一区二区| 精品国产sm最大网站| 中文字幕色av一区二区三区| 亚洲一区二区欧美| 精久久久久久久久久久| 99re成人精品视频| 欧美日韩高清一区| 国产亚洲污的网站| 亚洲国产成人porn| 国产精品自在欧美一区| 色94色欧美sute亚洲线路一ni | 欧美国产激情二区三区| 国产精品动漫网站| 日本不卡中文字幕| 97精品久久久午夜一区二区三区| 国模一区二区三区白浆| 99国产精品久久久| 欧美成人激情免费网| 国产精品热久久久久夜色精品三区| 久久久蜜桃精品| 悠悠色在线精品| 极品美女销魂一区二区三区 | 亚洲高清免费视频| 久久精品国产精品亚洲红杏| 99精品视频一区二区三区| 欧美亚洲国产怡红院影院| 久久奇米777| 亚洲v日本v欧美v久久精品| 国产成人午夜精品5599| 337p亚洲精品色噜噜| 国产精品成人在线观看| 国产一区视频在线看| 67194成人在线观看| 亚洲精品午夜久久久| www.欧美.com| 国产欧美综合在线| 国产在线精品免费av| 91精品啪在线观看国产60岁| 亚洲精品午夜久久久| jizz一区二区| 国产女人aaa级久久久级| 久久国产婷婷国产香蕉| 欧美一区二区三区四区视频| 亚洲国产日韩综合久久精品| 色噜噜久久综合| 亚洲色图.com| 99久久婷婷国产| 国产精品久久久久一区二区三区共 | 欧美日韩精品欧美日韩精品| 国产精品久久久久9999吃药| 国产99久久久国产精品免费看| www.激情成人| 国产精品成人在线观看| 成人性视频免费网站| 中文字幕av一区二区三区免费看 | 亚洲成人第一页| 色综合天天综合狠狠| 国产精品沙发午睡系列990531|