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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? clr_alg.asm

?? ti dsp lf2407的flash接口程序
?? 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                 ;
;--------------------------------------------------------------------------------------------------

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久综合精品| 精油按摩中文字幕久久| 国产精品私人影院| 国产视频不卡一区| 精品国产电影一区二区| 欧美videofree性高清杂交| 日韩女同互慰一区二区| 91麻豆精品国产自产在线观看一区| 91蜜桃网址入口| 色综合激情五月| 欧美午夜精品一区二区蜜桃| 欧美在线制服丝袜| 欧美日韩精品免费| 欧美嫩在线观看| 日韩欧美高清一区| 欧美精品一区二区三| 久久免费电影网| 中文字幕电影一区| 亚洲视频狠狠干| 夜色激情一区二区| 首页国产欧美久久| 麻豆精品视频在线| 国产乱人伦偷精品视频免下载| 国产乱码精品一品二品| 国产91丝袜在线播放九色| 91在线精品一区二区| 欧美性高清videossexo| 91精品国产91久久综合桃花| 日韩女优毛片在线| 国产一区二区三区在线观看免费 | 欧美丰满嫩嫩电影| 日韩一区二区免费在线电影| 精品国产一区二区三区久久影院| 久久精品一级爱片| 亚洲欧美日韩一区| 日韩av中文字幕一区二区三区| 激情国产一区二区| 99国产精品国产精品久久| 欧美日本一道本在线视频| 欧美成人艳星乳罩| 国产精品免费久久久久| 亚洲一区二区三区四区中文字幕| 美洲天堂一区二卡三卡四卡视频| 国产69精品一区二区亚洲孕妇| 色婷婷精品久久二区二区蜜臂av| 欧美一区中文字幕| 国产精品视频免费| 丝袜亚洲另类欧美| 国产大陆亚洲精品国产| 91福利社在线观看| 精品福利一二区| 亚洲男人的天堂在线aⅴ视频| 人人精品人人爱| 成人va在线观看| 91精品国产欧美一区二区成人| 日本一区二区久久| 日韩精品电影一区亚洲| 粉嫩aⅴ一区二区三区四区五区| 欧美四级电影在线观看| 国产午夜三级一区二区三| 亚洲国产另类av| 成人爱爱电影网址| 日韩精品一区二区三区中文精品| 国产精品久久久久影院亚瑟| 免费不卡在线观看| 日本丰满少妇一区二区三区| 久久综合中文字幕| 舔着乳尖日韩一区| 91免费观看视频| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲自拍偷拍欧美| a美女胸又www黄视频久久| 日韩欧美中文字幕公布| 一区二区视频在线| 成人一区二区视频| 精品区一区二区| 舔着乳尖日韩一区| 欧美在线一区二区| 国产精品对白交换视频| 国产大片一区二区| 精品乱人伦小说| 天堂久久久久va久久久久| 在线国产电影不卡| 一区视频在线播放| 国产·精品毛片| 久久久精品一品道一区| 日本不卡视频一二三区| 欧美色国产精品| 亚洲综合色网站| 色婷婷狠狠综合| 亚洲欧美日韩国产另类专区| 成人国产精品免费网站| 久久久综合网站| 日韩欧美一二三四区| 日韩精品亚洲专区| 欧美男人的天堂一二区| 亚洲国产精品久久不卡毛片| 色婷婷香蕉在线一区二区| 亚洲欧美另类在线| 97se亚洲国产综合自在线不卡| 国产欧美一区二区精品性色 | 成人免费视频网站在线观看| 欧美大片在线观看| 开心九九激情九九欧美日韩精美视频电影| 欧美私人免费视频| 亚洲一二三四久久| 欧美日韩一区在线| 婷婷久久综合九色综合绿巨人 | 欧美一区二区三区视频免费播放| 性欧美大战久久久久久久久| 欧美色倩网站大全免费| 婷婷六月综合亚洲| 日韩一区二区在线看片| 麻豆91免费看| 久久久精品国产免费观看同学| 国产精品一区二区久久不卡| 久久综合色鬼综合色| 国产成人免费视频网站高清观看视频 | 国产成人综合在线播放| 中文字幕av免费专区久久| 不卡欧美aaaaa| 亚洲一区二区在线视频| 欧美精选一区二区| 精品一区二区三区视频在线观看 | 国产亚洲综合在线| 99re8在线精品视频免费播放| 亚洲视频一区二区在线| 欧美精品在线一区二区三区| 日韩电影在线免费| 国产亚洲欧洲997久久综合| 99久久免费视频.com| 樱桃国产成人精品视频| 欧美高清视频一二三区| 狠狠色丁香久久婷婷综合_中| 国产女人aaa级久久久级| 色美美综合视频| 日韩精品色哟哟| 久久女同互慰一区二区三区| 91丨九色丨尤物| 男女性色大片免费观看一区二区 | 亚洲精品美国一| 91精品黄色片免费大全| 成人天堂资源www在线| 亚洲综合激情另类小说区| 91精品国产91久久综合桃花| 国产精品自拍三区| 亚洲资源在线观看| 久久嫩草精品久久久久| 在线视频国内自拍亚洲视频| 男人的天堂久久精品| 国产精品久久久久9999吃药| 欧美丰满嫩嫩电影| 不卡一卡二卡三乱码免费网站| 亚洲成av人片一区二区三区| 国产视频一区二区在线观看| 在线观看国产精品网站| 国产又黄又大久久| 亚洲一线二线三线久久久| 久久久久九九视频| 91久久精品一区二区| 国产精一区二区三区| 亚洲一区二区三区中文字幕在线| 精品国精品自拍自在线| 在线精品视频免费播放| 国产高清精品久久久久| 日韩电影在线免费看| 亚洲男人的天堂网| 国产亚洲精品精华液| 日韩一区二区在线看| 色8久久精品久久久久久蜜| 国产乱码精品一区二区三| 五月婷婷色综合| 亚洲色图欧美偷拍| 久久久精品日韩欧美| 日韩一区二区三区观看| 色94色欧美sute亚洲线路二| 国产一区二区精品久久| 夜夜嗨av一区二区三区网页| 国产精品蜜臀av| 国产日产精品1区| 日韩精品一区国产麻豆| 欧美理论在线播放| 欧美性videosxxxxx| 99国产精品久久久久久久久久久| 精品一区二区三区香蕉蜜桃| 石原莉奈一区二区三区在线观看| 成人免费在线播放视频| 国产无遮挡一区二区三区毛片日本| 欧美日韩激情一区二区| 91蝌蚪porny| 99久久精品一区| va亚洲va日韩不卡在线观看| 国产伦精品一区二区三区免费| 美国av一区二区| 免费成人深夜小野草| 日产国产欧美视频一区精品| 午夜欧美大尺度福利影院在线看 | 国产成a人亚洲精| 久久精品国产99国产| 免费看欧美女人艹b|