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

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

?? clr_alg.asm

?? TMS320C2000Flash操作
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;--------------------------------------------------------------------------------------------------
; Filename         : CLR_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 algorithm for clearing the LF240x Flash. This
; algorithm is generic to any sector, and performs the pre-erase conditioning for the flash module
; on these parts.
;--------------------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------
; 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: 
;                   * Added support for the LF2401A. See the file ..\include\var.h on how to 
;                     set one of the available configurations.
;                   * 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.
;--------------------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------

             .def  CLEAR_FLASH
            
;--------------------------------------------------------------------------------------------------
; Symbols imported by this file
;--------------------------------------------------------------------------------------------------
            .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 'CSPL_text'.
;--------------------------------------------------------------------------------------------------
            .sect     "CLR_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
;--------------------------------------------------------------------------------------------------
; CLEAR_FLASH:
;
; This function is the user level interface to the  implementation of the clear algorithm for 
; pre-erase conditioning of the TMS320LF2407 flash array.
; This function is desginated as a LEVEL_1 subroutine.
;--------------------------------------------------------------------------------------------------
CLEAR_FLASH:                                    ;Call label for asm client applications.
_clearFlash:                                    ;Call label for C client applications.
    
        .label  ClearAlgoStartMain

        LDP     #flashAlgoVars.ADDR             ;Set the DP to the flash algo vars.

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.


SECTOR_0:
        LACC    flashAlgoVars.SECTOR_CMD        ;Get the sector processing command.

;--------------------------------------------------------------------------------------------------
        .if(DEV_TYPE = LF2407)
                                                ;Since the LF2401A has four sectors,
                                                ;allow only four bits.
        AND     #000Fh                          ;Mask out unwanted bits.

        .elseif (DEV_TYPE = LF2401A)

                                                ;Since the LF2401A has only two sectors,
                                                ;allow only two bits.
        AND     #0003h                          ;Mask out unwanted bits.
                                                
        .endif
;--------------------------------------------------------------------------------------------------
        BCND    NO_SECTORS,EQ                   ;If no sectors are set, then goto
                                                ;error reporting routine.
;--------------------------------------------------------------------------------------------------
        SFR                                     ;Get Bit 0.
        SACL    flashAlgoVars.SECTOR_CMD        ;Store the rest of the command back.
;--------------------------------------------------------------------------------------------------
        BCND    SECTOR_1,NC                     ;If bit 0 is set, clear sector 0.
;--------------------------------------------------------------------------------------------------
        .if(DEV_TYPE = LF2407)

    ; Set up the limits for Sector 0 of LF2407 and call the core clear routine.

        SPLK    #0000h,flashAlgoVars.FL_SECST   ;Set up first addr of sector 0.
        SPLK    #0FFFh,flashAlgoVars.FL_SECEND  ;Set up last  addr of sector 0.
        SPLK    #0001h,flashAlgoVars.SECTOR_KEY ;Pass the sector enable key.
        CALL    CLEAR_SECTOR                    ;Call clear_sector to clear sector 0.

        .elseif (DEV_TYPE = LF2401A)

    ; Set up the limits for Sector 0 of LF2401A and call the core clear routine.

        SPLK    #0000h,flashAlgoVars.FL_SECST   ;Set up first addr of sector 0.
        SPLK    #0FFFh,flashAlgoVars.FL_SECEND  ;Set up last  addr of sector 0.
        SPLK    #0001h,flashAlgoVars.SECTOR_KEY ;Pass the sector enable key.
        CALL    CLEAR_SECTOR                    ;Call clear_sector to clear sector 0.

        .endif


;--------------------------------------------------------------------------------------------------
SECTOR_1:
        LACC    flashAlgoVars.SECTOR_CMD        ;Get the sector processing command.
        SFR                                     ;Mask out unwanted bits.
        SACL    flashAlgoVars.SECTOR_CMD        ;Store the rest of the command back.
        BCND    SECTOR_2,NC                     ;If bit 1 is set, clear sector 1.

        .if(DEV_TYPE = LF2407)

    ; Set up the limits for Sector 1 of LF2407 and call the core clear routine.

        SPLK    #1000h,flashAlgoVars.FL_SECST   ;Set up first addr of sector 1.
        SPLK    #3FFFh,flashAlgoVars.FL_SECEND  ;Set up last  addr of sector 1.
        SPLK    #0002h,flashAlgoVars.SECTOR_KEY ;Pass the sector enable key.
        CALL    CLEAR_SECTOR                    ;Call clear_sector to clear
                                                ; Sector 1 if requested

        .elseif(DEV_TYPE = LF2401A)

    ; Set up the limits for Sector 1 of LF2401A and call the core clear routine.

        SPLK    #1000h,flashAlgoVars.FL_SECST   ;Set up first addr of sector 1.
        SPLK    #1FFFh,flashAlgoVars.FL_SECEND  ;Set up last  addr of sector 1.
        SPLK    #0002h,flashAlgoVars.SECTOR_KEY ;Pass the sector enable key.
        CALL    CLEAR_SECTOR                    ;Call clear_sector to clear
                                                ; Sector 1 if requested
        .endif

;--------------------------------------------------------------------------------------------------


SECTOR_2:
        .if(DEV_TYPE = LF2407)

        ; For the LF2407, check if sector 2 is to be cleared. If it is to be
        ; cleared then call the core clear routine with the correct limits.
        
        LACC    flashAlgoVars.SECTOR_CMD        ;Get the sector processing command.
        SFR                                     ;Mask out unwanted bits.
        SACL    flashAlgoVars.SECTOR_CMD        ;Store the rest of the command back.
        BCND    SECTOR_3,NC                     ;If bit 2 is set, clear sector 2.

        SPLK    #4000h,flashAlgoVars.FL_SECST   ;Set up first address of sector 2.
        SPLK    #6FFFh,flashAlgoVars.FL_SECEND  ;Set up last address of sector 2.
        SPLK    #0004h,flashAlgoVars.SECTOR_KEY ;Pass the sector enable key.
        CALL    CLEAR_SECTOR                    ;Call clear_sector to clear sector 2.


        ; For the LF2407, check if sector 3 is to be cleared. If it is to be
        ; cleared then call the core clear routine with the correct limits.

SECTOR_3:
        LACC    flashAlgoVars.SECTOR_CMD        ;Get the sector processing command.
        SFR                                     ;Mask out unwanted bits.
        SACL    flashAlgoVars.SECTOR_CMD        ;Store the rest of the command back.
        BCND    SECTORS_DONE,NC                 ;If bit 3 is set, clear sector 3.

        SPLK    #7000h,flashAlgoVars.FL_SECST   ;Set up first address of sector 3.
        SPLK    #7FFFh,flashAlgoVars.FL_SECEND  ;Set up last address of sector 3.
        SPLK    #0008h,flashAlgoVars.SECTOR_KEY ;Pass the sector enable key.
        CALL    CLEAR_SECTOR                    ;Call clear_sector to clear sector 3.

        .endif

SECTORS_DONE:
        SPLK    #0,flashAlgoVars.ALGO_STATUS    ;No errors encountered.
        B       STACK_RESTORE

NO_SECTORS:
        SPLK    #10,flashAlgoVars.ALGO_STATUS   ;No sectors specified for clear.
        B       STACK_RESTORE


ERROR1: 
;--------------------------------------------------------------------------------------------------
;   IMPORTANT NOTE:
;
;   This code is executed in LEVEL_3, during a call to CLR_LOOP (which is a LEVEL_3 routine).
;   This routine is returning control to the LEVEL_0 (Caller's level). So it is performing the
;   function of a LEVEL_1 routine.
;   So, It is EXTREMELY important that this routine adjust the stack depth by the proper amount.
;   This routine must therefore remove two (2) words from the stack.
;--------------------------------------------------------------------------------------------------
        POPD    flashAlgoVars.PAD               ;Adjust stack depth 1.
        POPD    flashAlgoVars.PAD               ;Adjust stack depth 2.

        SPLK    #1,flashAlgoVars.ALGO_STATUS    ;Error encountered in CLEAR.
        B       STACK_RESTORE

;--------------------------------------------------------------------------------------------------
; Restore the hardware stack and exit to caller.
;--------------------------------------------------------------------------------------------------
STACK_RESTORE:
        LAR     AR2,#flashAlgoVars.STACK7       ;Point AR2 to the last of the stored stack contents
        MAR     *,AR2                           ;Make AR2 the current AR
        
        RPT     #7                              ;Restore ALL stack locations.
        PSHD    *-
        MAR     *,AR1                           ;Make AR1 the current AR
        RET                                     ;Return to caller


;--------------------------------------------------------------------------------------------------
; CLEAR_SECTOR:
;
; 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_2 subroutine.
;--------------------------------------------------------------------------------------------------
CLEAR_SECTOR:
;--------------------------------------------------------------------------------------------------
; 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_KEY,flashAlgoVars.PAD
        TBLW    flashAlgoVars.PAD    

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷久久综合九色综合绿巨人| 国产999精品久久| 激情综合色播激情啊| 色婷婷久久久亚洲一区二区三区 | av不卡在线播放| 欧美日韩国产美女| 国产精品乱码人人做人人爱| 免费看黄色91| 欧美午夜免费电影| 中文字幕一区二区三区四区不卡| 日本不卡一区二区| 91国模大尺度私拍在线视频| 国产精品私人影院| 国产很黄免费观看久久| 欧美成人乱码一区二区三区| 亚洲福利视频三区| 91精品福利在线| 亚洲欧美另类小说| 99久久国产综合精品麻豆| 国产欧美日韩精品一区| 久久成人精品无人区| 欧美一区二区三区在线| 婷婷六月综合亚洲| 欧美一区二区在线不卡| 亚洲小少妇裸体bbw| 欧美亚洲高清一区| 亚洲自拍偷拍网站| 欧美午夜在线一二页| 一区二区三区精品视频在线| 色婷婷国产精品久久包臀| 成人免费一区二区三区视频| 成人黄色片在线观看| 国产精品久久久久aaaa樱花| 99在线视频精品| 综合久久久久久| 色国产精品一区在线观看| 亚洲综合另类小说| 欧美少妇bbb| 奇米在线7777在线精品| 日韩一区二区在线观看视频| 理论片日本一区| 久久综合九色综合欧美就去吻| 精品亚洲porn| 国产精品三级电影| 91免费国产在线| 亚洲国产综合在线| 日韩欧美一区二区视频| 国产乱码字幕精品高清av| 日本一区二区三区高清不卡| 国产99久久精品| 亚洲精品乱码久久久久久| 欧美调教femdomvk| 国产一区二区三区四区五区美女| 国产日韩欧美麻豆| 日本二三区不卡| 美国一区二区三区在线播放| 国产亚洲一区二区三区四区| 99视频国产精品| 日本欧美韩国一区三区| 久久久久久久久久久久电影| 91在线高清观看| 日本va欧美va欧美va精品| 国产色产综合产在线视频| 日本乱码高清不卡字幕| 日产欧产美韩系列久久99| 国产欧美精品一区二区色综合| 成人av资源站| 日韩激情av在线| 亚洲国产成人午夜在线一区| 欧美日韩午夜精品| 国产精品一区二区你懂的| 一区二区在线观看免费| 精品国产乱码久久久久久1区2区| 91日韩在线专区| 精品在线视频一区| 一二三四社区欧美黄| 国产日韩视频一区二区三区| 欧美日韩国产123区| 国产xxx精品视频大全| 五月综合激情日本mⅴ| 中文无字幕一区二区三区| 91精品国产综合久久福利| 91蜜桃网址入口| 国产精品自在在线| 日本中文一区二区三区| 亚洲免费色视频| 国产精品国产a级| 久久人人爽人人爽| 91精品在线免费| 欧洲一区二区三区免费视频| 成人一级片在线观看| 极品少妇xxxx精品少妇偷拍 | 另类小说综合欧美亚洲| 一区二区三区国产精品| 中文字幕中文在线不卡住| 日韩免费一区二区三区在线播放| 在线观看免费一区| 99综合电影在线视频| 成人免费看视频| 国产一区二区久久| 国产主播一区二区三区| 日本va欧美va瓶| 男女激情视频一区| 日韩精品电影在线| 日韩极品在线观看| 亚洲第一福利一区| 亚洲一区二三区| 一区二区三区四区在线| 亚洲色图.com| 亚洲免费在线观看| 一区二区三区在线视频免费| 亚洲天堂2014| 一区二区视频在线看| 亚洲柠檬福利资源导航| 亚洲乱码国产乱码精品精的特点 | 天堂资源在线中文精品| 亚洲与欧洲av电影| 亚洲国产你懂的| 性久久久久久久久久久久| 亚洲成人精品一区二区| 亚洲国产成人91porn| 日本免费新一区视频| 日韩成人伦理电影在线观看| 六月丁香婷婷久久| 国产精品1区二区.| heyzo一本久久综合| proumb性欧美在线观看| 在线免费视频一区二区| 6080日韩午夜伦伦午夜伦| 91精品国产综合久久精品性色| 91精品黄色片免费大全| 久久久久久夜精品精品免费| 国产欧美日韩一区二区三区在线观看| 国产精品全国免费观看高清| 亚洲视频狠狠干| 午夜精品久久久久久不卡8050| 免费国产亚洲视频| 国产精品亚洲第一| 91亚洲国产成人精品一区二区三| 欧洲精品中文字幕| 欧美不卡一区二区三区| 中文字幕不卡在线播放| 亚洲一区二区三区美女| 极品美女销魂一区二区三区| 成人综合在线观看| 欧美日韩国产另类一区| 久久久蜜臀国产一区二区| 亚洲精品成人在线| 精品在线免费观看| 色婷婷综合五月| 精品少妇一区二区三区在线视频| 国产精品久久久久久久裸模| 亚洲一区二区视频在线| 国产精品亚洲综合一区在线观看| 一本大道久久a久久综合| 精品剧情v国产在线观看在线| 国产精品国产a| 蜜桃视频一区二区| 91麻豆国产精品久久| 欧美va在线播放| 亚洲免费在线视频| 国产成人精品亚洲日本在线桃色| 欧美色图激情小说| 中文字幕欧美三区| 精品一区二区三区视频在线观看| 91视频91自| 国产午夜三级一区二区三| 午夜电影一区二区| 99精品一区二区三区| 精品久久久久久综合日本欧美| 亚洲一区二区三区视频在线播放 | 激情综合亚洲精品| 在线不卡a资源高清| 亚洲免费看黄网站| www.成人网.com| 国产亚洲精品久| 狠狠色丁香久久婷婷综合丁香| 欧美午夜精品久久久久久超碰 | 亚洲精品一区二区三区福利| 亚洲国产另类精品专区| 99国产欧美另类久久久精品| 久久久亚洲高清| 国产资源在线一区| 精品国产乱码91久久久久久网站| 石原莉奈在线亚洲三区| 欧美日韩一区二区三区高清| 尤物视频一区二区| 一本色道**综合亚洲精品蜜桃冫| 国产精品人妖ts系列视频| 精品一区免费av| 精品免费视频.| 国产在线不卡视频| 精品国产一区二区三区忘忧草 | 日韩免费视频一区| 奇米色一区二区| 欧美精品一区二区三区久久久 | 午夜精品久久一牛影视| 欧美日韩国产一级二级| 亚洲国产一区二区在线播放| 在线观看av不卡|