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

📄 bbu_help.s

📁 关于PXA310的最小系统的程序,初级学习阶段会有所帮助,汇编语言编写的
💻 S
📖 第 1 页 / 共 5 页
字号:
;*******************************************************************************
;
;     COPYRIGHT (C) 2006-2007 Marvell International Ltd. All Rights Reserved.
;
;   The information in this file is furnished for informational use only,
;   is subject to change without notice, and should not be construed as
;   a commitment by Marvell. Marvell assumes no responsibility or liability
;   for any errors or inaccuracies that may appear in this software or any
;   documenation that may be provided in association with this software.
;
;*******************************************************************************
;
;                                  bbu_help.s
;
;       BBU subroutine for providing more detailed help on BBU commands
;
;
        GLOBAL  BBU_HELP

        EXTERN  BBU_putstr      ; Write text strings

        AREA  |text|,CODE,READONLY
;
;*******************************************************************************
;
;       ************
;       *          * 
;       * BBU_HELP *    Provide detailed help on BBU commands
;       *          *
;       ************
;
;       PARAMETERS
;
;       INPUT
;
;         r0 = Command number to provide additional help on 
;
BBU_HELP        FUNCTION
        stmfd   sp!,    {r1-r2, lr}     ; Save r0-r2, and link register on the stack
        mov     r2,     r0              ; Copy command number to r2
        ldr     r0,     =BBU_HELP_NOHELP; Load pointer to default message
;
;       ***** HELP *****
;
        cmp     r2,     #1              ; Help for HELP command?
        bne     %F20                    ; Nope
        ldr     r0,     =BBU_HELP_HELP  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_HELP   DCB     0xA,0xD
                DCB     " HELP",0xD,0xA,0xA
                DCB     "  General BBU information:",0xD,0xA,0xA
                DCB     "    Decimal or hex arguments may be entered for all values.",0xD,0xA
                DCB     "    Hex numbers must have a '0X' prefix.",0xD,0xA
                DCB     "    Decimal numbers have no prefix.",0xD,0xA,0xA
                DCB     "  Command Syntax:",0xD,0xA,0xA
                DCB     "    COMMAND arg1,arg2,arg3,arg4,...arg8",0xD,0xA,0xA
                DCB     "    Optional arguments are indicated by square brackets [opt_arg].",0xD,0xA,0xA  
                DCB     "    Each command can have up to 8 parameters that may be seperated by a comma",0xD,0xA
                DCB     "    or a space. Arguments may be decimal numbers, hex numbers, or switches",0xD,0xA
                DCB     "    (options). Switches are a forward slash followed by a single letter",0xD,0xA
                DCB     "    (such as /T) and may have a numeric value associated with it if it followed",0xD,0xA
                DCB     "    by an equal sign (such as /T=350).",0xD,0xA,0xA
                DCB     "    Type <command_name> /H for more help on specific commands.",0xD,0xA,0xA
                DCB     "  Keypad commands are enabled by pressing the OK button ten times in succession.",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** PEEK *****
;
20      cmp     r2,     #2              ; Help for PEEK command?
        bne     %F30                    ; Nope
        ldr     r0,     =BBU_HELP_PEEK  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_PEEK   DCB     0xA,0xD
                DCB     " PEEK - Examine the data at the specified address.",0xD,0xA,0xA
                DCB     " PEEK [/x=]address[/L]",0xD,0xA,0xA
                DCB     "  Where x may be used to specify a PEEK at a byte or word address.",0xD,0xA
                DCB     "  /B=address specifies a byte (8-bits) of data to be read.",0xD,0xA
                DCB     "  /W=address specifies a word (16-bits) of data to be read.",0xD,0xA
                DCB     "  An address with no switch defaults to 32-bits of data to be read.",0xD,0xA,0xA
                DCB     "  address = The address to be examined.",0xD,0xA,0xA
                DCB     "  /L - this optional switch will cause the code to loop on reading this",0xD,0xA
                DCB     "       address until the user presses any key on the terminal emulator.",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** POKE *****
;
30      cmp     r2,     #3              ; Help for POKE command?
        bne     %F40                    ; Nope
        ldr     r0,     =BBU_HELP_POKE  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_POKE   DCB     0xA,0xD
                DCB     " POKE - Deposits byte, word, or doubleword data into the specified address.",0xD,0xA,0xA
                DCB     " POKE [/x=]address,[/y=]data",0xD,0xA,0xA
                DCB     "  Where x may be used to specify a POKE at a byte or word address.",0xD,0xA
                DCB     "  /B=address specifies a byte (8-bits) of data is to be deposited.",0xD,0xA
                DCB     "  /W=address specifies a word (16-bits) of data is to be deposited.",0xD,0xA
                DCB     "  An address with no switch defaults to 32-bits of data to be deposited.",0xD,0xA,0xA
                DCB     "  address = The address where the data is to be deposited",0xD,0xA,0xA
                DCB     "  Optional y parameter may specify one of two looping options as follows:",0xD,0xA,0xA
                DCB     "  /L= option will cause the code to loop on the write until <esc> is pressed.",0xD,0xA
                DCB     "  /I= option will cause the data to increment on every write.",0xD,0xA,0xA
                DCB     "  data = The data to be deposited at the specified address.",0xD,0xA,0xA,0xA,0
        ALIGN   4
;
;       ***** DUMP *****
;
40      cmp     r2,     #4              ; Help for DUMP command?
        bne     %F50                    ; Nope
        ldr     r0,     =BBU_HELP_DUMP  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_DUMP   DCB     0xA,0xD
                DCB     " DUMP - Dump the contents of multiple memory or register locations.",0xD,0xA,0xA
                DCB     " DUMP [/B=]address,dword_count",0xD,0xA,0xA
                DCB     "  /B=address will force the output to be in byte format.",0xD,0xA,0xA
                DCB     "  address     = The starting address of the dump",0xD,0xA
                DCB     "  dword_count = The number of 32-bit words to be dumped.",0xD,0xA,0xA
                DCB     "  NOTE: ASCII data is also displayed on each output line.",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** GPIO ***** CONFIGURE SELCTED GPIO LINE / LEVEL
;
50      cmp     r2,     #5              ; Help for SGPD command?
        bne     %F70                    ; Nope
        ldr     r0,     =BBU_HELP_GPIO  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_GPIO   DCB     0xA,0xD
                DCB     " GPIO - Set/Clear GPIO direction bit, set output bit level, or toggle the",0xD,0xA
                DCB     "        selected GPIO output.",0xD,0xA,0xA
                DCB     " GPIO /x=gpio",0xD,0xA,0xA
                DCB     "   where x is one of the following options:",0xD,0xA,0xA
                DCB     "  /C= to Clear the selected GPIO bit",0xD,0xA
                DCB     "  /I= to set GPIO direction to Input",0xD,0xA
                DCB     "  /O= to set GPIO direction to Output",0xD,0xA
                DCB     "  /S= to Set the selected GPIO bit",0xD,0xA
                DCB     "  /T= to Toggle GPIO bit high/low until stopped by user.",0xD,0xA
                DCB     "  gpio = GPIO number to alter the state of.",0xD,0xA,0xA
                DCB     "  NOTE: This line must be set as a GPIO for this command to work. In MOST",0xD,0xA
                DCB     "        cases this means the alternate function must be set to zero first.",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** GPIO_A ***** SET GPIO ALTERNATE FUNCTION
;
70      cmp     r2,     #7              ; Help for SGPA command?
        bne     %F110                   ; Nope
        ldr     r0,     =BBU_HELP_GPIA  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_GPIA   DCB     0xA,0xD
                DCB     " GPIO_A - Set GPIO Alternate function.",0xD,0xA,0xA
                DCB     " GPIO_A gpio,alt_func",0xD,0xA,0xA
                DCB     "  gpio     = GPIO number to update the alternate fuction value on.",0xD,0xA
                DCB     "  alt_func = Alternate function value (0-7).",0xD,0xA,0xA,0
        ALIGN   4
;
;       ******************
;       **              **
;       ** LITERAL POOL **     LOCAL DATA STORAGE
;       **              **
;       ******************
;
        LTORG
;
;       ***** GPIO_S ***** GPIO SSTATUS
;
110     cmp     r2,     #11             ; Help for GPIO_S command?
        bne     %F130                   ; Nope
        ldr     r0,     =BBU_HELP_GPST  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_GPST   DCB     0xA,0xD
                DCB     " GPIO_S - GPIO Status report.",0xD,0xA,0xA
                DCB     "  Displays information about the selected GPIO group in table format",0xD,0xA
                DCB     "  including direction, alternate function, drive strengh, pull reistors",0xD,0xA
                DCB     "  and sleep information.",0xD,0xA,0xA
                DCB     " GPIO_S gpio_grp",0xD,0xA,0xA
                DCB     "  gpio_grp = GPIO group to obtain status on as follows:",0xD,0xA,0xA
                DCB     "  0 = GPIOs   0-15",0xD,0xA
                DCB     "  1 = GPIOs  16-31",0xD,0xA
                DCB     "  2 = GPIOs  32-47",0xD,0xA
                DCB     "  3 = GPIOs  47-63",0xD,0xA
                DCB     "  4 = GPIOs  64-79",0xD,0xA
                DCB     "  5 = GPIOs  80-95",0xD,0xA
                DCB     "  6 = GPIOs  96-111",0xD,0xA
                DCB     "  7 = GPIOs 112-127",0xD,0xA
                DCB     "  8 = GPIOs 128-134 (GPIOs 0_2 to 6_2)",0xD,0xA
                DCB     "  9 = GPIOs   0-134 - List all GPIOs",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** ACCR ***** READ/WRITE ACCR REGISTER
;
130     cmp     r2,     #13             ; Help for ACCR command?
        bne     %F140                   ; Nope
        ldr     r0,     =BBU_HELP_ACCR  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_ACCR   DCB     0xA,0xD
                DCB     " ACCR - Read/Write the Application Clock Control Register.",0xD,0xA,0xA
                DCB     " ACCR [value]",0xD,0xA,0xA
                DCB     "  value = Optional value to be loaded into the ACCR register.",0xD,0xA,0xA
                DCB     " NOTE: If the command is entered without a value, the contents of the ACCR",0xD,0xA
                DCB     "       and the ACSR registers are displayed. Note that the core frequency",0xD,0xA
                DCB     "       will not be updated unless the IFCS command is entered.",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** IFCS ***** INITIATE FREQUENCY CHANGE SEQUENCE
;
140     cmp     r2,     #14             ; Help for IFCS command?
        bne     %F170                   ; Nope
        ldr     r0,     =BBU_HELP_IFCS  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_IFCS   DCB     0xA,0xD
                DCB     " IFCS - Initiate Frequency Change Sequence.",0xD,0xA,0xA
                DCB     " IFCS",0xD,0xA,0xA
                DCB     "  This command initiates the frequency change sequence for the processor",0xD,0xA
                DCB     "  core frequency based on the settings in the ACCR register.",0xD,0xA,0xA,0
        ALIGN   4
;
;       ***** VTPA ***** VIRTUAL TO PHYSICAL ADDRESS CONVERSION
;
170     cmp     r2,     #17             ; Help for VTPA command?
        bne     %F180                   ; Nope
        ldr     r0,     =BBU_HELP_VTPA  ; Message address
        b       %F9000                  ; Print it
BBU_HELP_VTPA   DCB     0xA,0xD
                DCB     " VTPA - Convert a virtual address to its physical address.",0xD,0xA,0xA
                DCB     "  Converts the user entered virtual address to its physical address and",0xD,0xA
                DCB     "  displays the physical address for the user. The user is informed if there",0xD,0xA

⌨️ 快捷键说明

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