⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ecp_i2c_hw.lst

📁 TI EVMDM355 开发板的测试程序,包括BOOT,DDR2,NAND,SD,UART,GPIO等芯片外设的测试驱动.
💻 LST
📖 第 1 页 / 共 5 页
字号:
  R15 = 0 on good cmd
    466    000364 0124                           jeq     WriteCmdValid       ;
  Cmd is okay
    467    000366 A13C                           jmp     I2CWriteProcessed   ;
  Offset is bad, abort
    468    000368 C045....     WriteCmdValid     mov.b   R5,ECPCommand
    469    00036C 0555                           add     R5,R5               ;
                                                             Multiply the cmd
                                                             by 2   
    470    00036E 0055                           add     R5,PC               ;
                                                             and jump to cmd
                                                             routine
    471    000370 053C                           jmp     WriteCMD0x00
    472    000372 053C                           jmp     WriteCMD0x01
    473    000374 0D3C                           jmp     WriteCMD0x02
    474    000376 0F3C                           jmp     WriteCMD0x03
    475    000378 133C                           jmp     WriteCMD0x04
    476    00037A 1B3C                           jmp     WriteCMD0x05
    477    00037C              
    478    00037C              
    479    00037C              ; Offset 0x00 - ECP Command Register
    480    00037C              WriteCMD0x00                                    
                                     ; NULL command
    481    00037C 963C                           jmp     I2CWriteProcessed     
       ; We are done
    482    00037E                                
    483    00037E              WriteCMD0x01                                    
                                     ; COLD REBOOT
    484    00037E B012....                       call    #PowerDownEVM         
       ; Turn EVM off
    485    000382 B012....                       call    #SWDelay500ms
    486    000386 B012....                       call    #SWDelay500ms
    487    00038A 3040....                       mov     #RESET,PC             
                                                                      ; Jump to
                                                                 reset vector  
                                                                   
    488    00038E 8D3C                           jmp     I2CWriteProcessed     
       ; We are done
    489    000390                                
    490    000390              WriteCMD0x02                                    
                                     ; WARM RESET
    491    000390 B012....                       call    #DSPSoftReset         
       ; Reset DSP
    492    000394 8A3C                           jmp     I2CWriteProcessed     
       ; We are done
    493    000396                                
    494    000396              WriteCMD0x03                                    
                                     ; WARM RESET INIT
    495    000396 31400004                       mov.w   #0x0400,SP            
       ; Init stackpointer
    496    00039A 3040....                       mov     #WARMENTRY,PC         
                                                                          ;
                                                                     Jump to
                                                                     warm
                                                                     reset
    497    00039E 853C                           jmp     I2CWriteProcessed     
       ; We are done
    498    0003A0                                
    499    0003A0              WriteCMD0x04                                    
                                     ; POWER OFF
    500    0003A0              
    501    0003A0 B012....                       call    #PowerDownEVM         
       ; Shut down power supplies
    502    0003A4 55422000     WaitButton        mov.b   &P1IN,R5              
                                                                     ; Read the
                                                                RS switch
    503    0003A8 55F3                           and.b   #0x01,R5              
             
    504    0003AA FC23                           jnz     WaitButton            
       ; Button not pushed
    505    0003AC 3040....                       mov     #RESET,PC             
                                                                      ; Jump to
                                                                 reset
                                                                 vector
    506    0003B0 7C3C                           jmp     I2CWriteProcessed     
       ; We are done
    507    0003B2                                
    508    0003B2              WriteCMD0x05                                    
                                     ; Reinitialize IR Remote
    509    0003B2 B012....                       call    #InitIR
    510    0003B6 793C                           jmp     I2CWriteProcessed
    511    0003B8              
    512    0003B8              
    513    0003B8              ; Offset 0x01 - ECP Status Register
    514    0003B8              ; Writing zeros to these bits clears them. 
                                Writing one has no effect
    515    0003B8              ; This register is not actually mapped to a
                                port.
    516    0003B8 35E3         WriteOffset0x01   inv     R5                    
       ; Invert the user write
    517    0003BA C0C5....                       bic.b   R5,ECPStatus          
                                                                  ; Clear the
                                                             desired bits
    518    0003BE 753C                           jmp     I2CWriteProcessed     
       ; We are done
    519    0003C0              ; Offset 0x02 - Reset Output Register
    520    0003C0 4645         WriteOffset0x02   mov.b   R5,R6                 
                                                                  ; Copy User
                                                             Write
    521    0003C2 76F08000                       and.b   #AIC33_RSTz,R6        
       ; Mask Port 2 resets
    522    0003C6 57422800                       mov.b   &P2IN, R7             
                                                                      ; Read
                                                                 port
                                                                 2
    523    0003CA 77C08000                       bic.b   #AIC33_RSTz,R7        
       ; Clear the current state
    524    0003CE 47D6                           bis.b   R6,R7                 
                                                                  ; Set the new
                                                             state
    525    0003D0 C2472900                       mov.b   R7,&P2OUT             
                                                                  ; Write it
                                                             out
    526    0003D4 4645                           mov.b   R5,R6                 
                                                                  ; Copy User
                                                             Write
    527    0003D6 76F04500                       and.b   #DC5_RSTz+TV_RSTz+CPLD
 _RSTz, R6 ; Mask Port 3 resets
    528    0003DA 57421800                       mov.b   &P3IN,R7              
                                                                     ; Read
                                                                port 3
    529    0003DE 77C04500                       bic.b   #DC5_RSTz+TV_RSTz+CPLD
 _RSTz, R7 ; Clear old state
    530    0003E2 47D6                           bis.b   R6,R7                 
                                                                  ; Set new
                                                             state
    531    0003E4 C2471900                       mov.b   R7,&P3OUT             
                                                                  ; Write it
                                                             out
    532    0003E8 4645                           mov.b   R5,R6                 
                                                                  ; Copy User
                                                             Write
    533    0003EA 4611                           rra.b   R6                    
       ; 3 right shifts
    534    0003EC 4611                           rra.b   R6
    535    0003EE 4611                           rra.b   R6
    536    0003F0 76F01000                       and.b   #NOR_FLASH_RSTz,R6    
       ; Mask out NOR_FLASH_RST
    537    0003F4 4511                           rra.b   R5                    
       ; 2 right shifts
    538    0003F6 4511                           rra.b   R5
    539    0003F8 75F02000                       and.b   #IMAGER_RSTz,R5       
       ; Mask out IMAGER_RST
    540    0003FC 57421800                       mov.b   &P3IN,R7              
                                                                     ; Read
                                                                port 3
    541    000400 77C00A00                       bic.b   #BIT3+BIT1,R7         
       ; Clear bits
    542    000404 47D5                           bis.b   R5,R7                 
                                                                  ; Set new
                                                             bits
    543    000406 47D6                           bis.b   R6,R7
    544    000408 C2471900                       mov.b   R7,&P3OUT             
                                                                  ; Write out
                                                             bits
    545    00040C 4E3C                           jmp     I2CWriteProcessed     
       ; We are done
    546    00040E              ; Offset 0x03 - LED Register
    547    00040E C2451D00     WriteOffset0x03   mov.b   R5, &P4OUT            
                                                                   ; Write out
                                                              to port
    548    000412 4B3C                           jmp     I2CWriteProcessed     
       ; We are done
    549    000414              ; Offset 0x04 - Input Switch Register #1
                                
    550    000414 75F04000     WriteOffset0x04   and.b   #CPLD_OPT,R5          
       ; Mask read only bits
    551    000418 57423000                       mov.b   &P5IN,R7              
                                                                     ; Get port
                                                                state
    552    00041C 77C04000                       bic.b   #CPLD_OPT,R7          
       ; Clear state
    553    000420 47D5                           bis.b   R5,R7                 
                                                                  ; Set new
                                                             state
    554    000422 C2473100                       mov.b   R7,&P5OUT             
                                                                  ; Write it
                                                             out
    555    000426 413C                           jmp     I2CWriteProcessed     
       ; We are done
    556    000428              ; Offset 0x05 - Input Switch Register #2 - All
                                readonly, do nothing
    557    000428 403C         WriteOffset0x05   jmp     I2CWriteProcessed
    558    00042A              ; Offset 0x06 - SD/MMC Status Register - All
                                readonly, do nothing
    559    00042A 3F3C         WriteOffset0x06   jmp     I2CWriteProcessed
    560    00042C              ; Offset 0x07 - Firmware Revision Register - All
                                readonly, do nothing
    561    00042C 3E3C         WriteOffset0x07   jmp     I2CWriteProcessed
    562    00042E              ; Offset 0x08 - Video Input Mux Control
    563    00042E 75F08000     WriteOffset0x08   and.b   #MUX_IMAG_5146z,R5    
       ; Mask other bits
    564    000432 57421800                       mov.b   &P3IN,R7              
                                                                     ; Get
                                                                current port
                                                                state
    565    000436 77C08000                       bic.b   #MUX_IMAG_5146z,R7    
       ; Clear current state
    566    00043A 47D5                           bis.b   R5,R7                 
                                                                  ; Set new
                                                             state
    567    00043C C2471900                       mov.b   R7,&P3OUT             
                                                                  ; Write it
                                                             out
    568    000440 343C                           jmp     I2CWriteProcessed     
       ; We are done
    569    00

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -