亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲成va人在线观看| 国产欧美一区二区精品性| 一区二区在线看| 99国产精品久| 综合在线观看色| 91激情五月电影| 亚洲1区2区3区视频| 在线不卡欧美精品一区二区三区| 亚洲高清免费视频| 日韩一区二区三区电影在线观看| 狠狠色狠狠色合久久伊人| 国产日产欧产精品推荐色| 国产98色在线|日韩| 亚洲欧美另类在线| 欧美一区二区三区在线观看| 国产一区二区三区精品视频| 国产精品久久久久久亚洲伦| 欧美三电影在线| 久久国内精品自在自线400部| 久久九九久久九九| 色香蕉成人二区免费| 蜜桃在线一区二区三区| 国产女人aaa级久久久级| 在线视频观看一区| 久久er精品视频| 日韩理论片网站| 日韩欧美国产一区二区三区| 国产不卡视频在线观看| 亚洲电影一区二区| 精品国产制服丝袜高跟| av色综合久久天堂av综合| 水蜜桃久久夜色精品一区的特点 | 久久精品免费观看| 国产精品久久久久久久久免费丝袜 | av色综合久久天堂av综合| 亚洲午夜电影网| 国产亚洲一区二区三区四区| 91麻豆福利精品推荐| 美女脱光内衣内裤视频久久网站| 国产欧美一区二区在线| 欧美理论在线播放| 岛国一区二区在线观看| 天天亚洲美女在线视频| 中文字幕日韩av资源站| 久久中文字幕电影| 欧美日韩视频在线观看一区二区三区| 国产在线视频一区二区| 婷婷丁香久久五月婷婷| 亚洲国产精品激情在线观看| 91精品国产色综合久久不卡电影 | 一本大道久久a久久精品综合| 激情久久五月天| 亚洲国产色一区| 国产精品国产a| 国产婷婷色一区二区三区| 日韩小视频在线观看专区| 欧美性猛交xxxxxxxx| av动漫一区二区| 国产成人av一区二区| 激情欧美一区二区三区在线观看| 亚洲成人三级小说| 亚洲图片欧美视频| 亚洲人成影院在线观看| 国产精品家庭影院| 国产欧美日韩在线| 国产日韩欧美一区二区三区乱码| 欧美岛国在线观看| 欧美一区二区网站| 欧美精品亚洲二区| 欧美精品自拍偷拍动漫精品| 色一情一乱一乱一91av| 色系网站成人免费| 91久久线看在观草草青青| 国产成人av一区二区三区在线| 国内不卡的二区三区中文字幕| 蜜臀va亚洲va欧美va天堂 | 精品一区二区成人精品| 日韩av电影免费观看高清完整版在线观看| 亚洲综合丝袜美腿| 亚洲精品ww久久久久久p站| 国产精品二区一区二区aⅴ污介绍| 久久久一区二区三区捆绑**| 欧美精品一区二区三区视频| 日韩三级电影网址| 精品国产免费一区二区三区香蕉| 日韩一级视频免费观看在线| 91精品国产入口| 日韩一区二区三区四区| 久久亚洲精品小早川怜子| 日韩精品一区二区三区蜜臀| 91精品国产综合久久小美女| 欧美一级免费大片| 日韩精品一区二区三区swag| 久久色在线观看| 中文字幕不卡在线观看| 亚洲免费大片在线观看| 亚洲妇女屁股眼交7| 理论电影国产精品| 亚洲第一电影网| 日韩电影免费一区| 天使萌一区二区三区免费观看| 日av在线不卡| 成人网在线播放| 日韩精品电影在线观看| 日韩中文字幕1| 久久精品国产免费看久久精品| 成人黄色软件下载| 精品影视av免费| 日韩电影在线免费观看| 99久久精品久久久久久清纯| 91首页免费视频| 88在线观看91蜜桃国自产| 精品日产卡一卡二卡麻豆| 中文无字幕一区二区三区| 亚洲免费大片在线观看| 欧美一区二区日韩| 亚洲精品水蜜桃| 粉嫩aⅴ一区二区三区四区| 欧美日韩一区久久| 在线播放日韩导航| 欧美日韩一区久久| 91精品黄色片免费大全| 国产亚洲1区2区3区| 一区二区三区在线观看欧美| 看片的网站亚洲| 日韩限制级电影在线观看| 午夜欧美电影在线观看| 在线观看一区二区视频| 亚洲欧美一区二区三区久本道91| 久久狠狠亚洲综合| 欧美激情资源网| 91免费观看视频在线| 夜夜操天天操亚洲| 欧美日韩一级大片网址| 久久草av在线| 亚洲精选免费视频| 91福利国产精品| 天堂一区二区在线| 精品国产91洋老外米糕| 久久精品国产在热久久| 日韩午夜激情视频| 国产精品99久久久久久似苏梦涵 | 极品美女销魂一区二区三区| 国产女人aaa级久久久级| 91香蕉视频mp4| 同产精品九九九| 国产精品白丝在线| 欧美艳星brazzers| 亚洲.国产.中文慕字在线| 日韩精品在线看片z| 一本大道久久a久久综合| 日本欧美肥老太交大片| 欧美tickling网站挠脚心| 中文字幕第一区第二区| 91国偷自产一区二区开放时间| 美女视频免费一区| 久久精品夜夜夜夜久久| 成人av先锋影音| 一区二区欧美在线观看| 成人欧美一区二区三区视频网页| 久久精品欧美日韩精品| 日韩免费性生活视频播放| 92国产精品观看| 91免费看`日韩一区二区| 91色九色蝌蚪| 成人av在线播放网站| 国产精品一区二区你懂的| 舔着乳尖日韩一区| 久久老女人爱爱| 久久久精品人体av艺术| 精品日韩在线观看| 日韩欧美一区二区在线视频| 久久精品一二三| 久久日韩粉嫩一区二区三区 | 一本大道久久a久久综合婷婷| 狠狠色丁香久久婷婷综合_中| 午夜成人免费电影| 亚洲大片精品永久免费| 亚洲图片欧美综合| 欧美aaaaa成人免费观看视频| 久久丁香综合五月国产三级网站| 美国一区二区三区在线播放| 视频一区欧美日韩| 成人免费看的视频| 色婷婷av一区二区三区软件| 欧美日韩高清一区二区三区| 91社区在线播放| 日韩欧美中文字幕公布| 国产精品女同一区二区三区| 亚洲成av人片观看| 一区二区三区国产精华| 老司机一区二区| 欧美午夜精品久久久久久超碰| 欧美美女黄视频| 色域天天综合网| 亚洲国产经典视频| 午夜视频在线观看一区二区三区| 成人网男人的天堂| 欧美日韩免费观看一区三区| 中文一区二区在线观看|