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

📄 system.txt

📁 MP3_PLAYER.rar
💻 TXT
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 938] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\system.o --depend=.\Obj\system.d --device=DARMSTM --apcs=interwork -O3 -I.\Code\FATSystem\INC -I.\Code\Library\INC -I.\Code\SDCard\INC -I.\Code\Speaker\INC -I.\Code\System\INC -I.\Code\USBMassStorage\INC -I.\Code\User\INC -I.\Code\VS1003\INC -ID:\Keil\ARM\INC\ST\STM32F10x --omf_browse=.\Obj\system.crf Code\System\SRC\system.c]
                          THUMB

                          AREA ||i.SendChar||, CODE, READONLY, ALIGN=2

                  SendChar PROC
000000  b510              PUSH     {r4,lr}
000002  4604              MOV      r4,r0
000004  b2c1              UXTB     r1,r0
000006  4805              LDR      r0,|L1.28|
000008  f7fffffe          BL       USART_SendData
00000c  4804              LDR      r0,|L1.32|
00000e  bf00              NOP      
                  |L1.16|
000010  f8b01800          LDRH     r1,[r0,#0x800]
000014  0609              LSLS     r1,r1,#24
000016  d5fb              BPL      |L1.16|
000018  4620              MOV      r0,r4
00001a  bd10              POP      {r4,pc}
                          ENDP

                  |L1.28|
00001c  40013800          DCD      0x40013800
                  |L1.32|
000020  40013000          DCD      0x40013000

                          AREA ||i._ttywrch||, CODE, READONLY, ALIGN=1

                  _ttywrch PROC
;;;10     int  SendChar (int ch);         
;;;11     void _ttywrch (int ch) { SendChar(ch); }
000000  f7ffbffe          B.W      SendChar
;;;12     void _sys_exit (int return_code) { for (;;); }
                          ENDP


                          AREA ||i._sys_exit||, CODE, READONLY, ALIGN=1

                  _sys_exit PROC
;;;11     void _ttywrch (int ch) { SendChar(ch); }
;;;12     void _sys_exit (int return_code) { for (;;); }
000000  e7fe              B        _sys_exit
;;;13     int fputc (int ch, FILE *f) { return (SendChar(ch)); }
                          ENDP


                          AREA ||i.fputc||, CODE, READONLY, ALIGN=1

                  fputc PROC
;;;12     void _sys_exit (int return_code) { for (;;); }
;;;13     int fputc (int ch, FILE *f) { return (SendChar(ch)); }
000000  f7ffbffe          B.W      SendChar
;;;14     int ferror (FILE *f) {
                          ENDP


                          AREA ||i.ferror||, CODE, READONLY, ALIGN=1

                  ferror PROC
;;;15       /* Your implementation of ferror */
;;;16       return EOF;
000000  f04f30ff          MOV      r0,#0xffffffff
;;;17     } 
000004  4770              BX       lr
;;;18     
                          ENDP


                          AREA ||i.SetupClock||, CODE, READONLY, ALIGN=2

                  SetupClock PROC
;;;26     void SetupClock(void)
;;;27     {
000000  b570              PUSH     {r4-r6,lr}
;;;28     
;;;29       ErrorStatus HSEStartUpStatus;
;;;30       /* RCC system reset(for debug purpose) */
;;;31       RCC_DeInit();
000002  f7fffffe          BL       RCC_DeInit
;;;32     
;;;33       /* Enable HSE */
;;;34       RCC_HSEConfig(RCC_HSE_ON);
000006  f44f3580          MOV      r5,#0x10000
00000a  4628              MOV      r0,r5
00000c  f7fffffe          BL       RCC_HSEConfig
;;;35     
;;;36       /* Wait till HSE is ready */
;;;37       HSEStartUpStatus = RCC_WaitForHSEStartUp();
000010  f7fffffe          BL       RCC_WaitForHSEStartUp
;;;38     
;;;39       if(HSEStartUpStatus == SUCCESS)
000014  2801              CMP      r0,#1
000016  d121              BNE      |L6.92|
;;;40       {
;;;41         /* HCLK = SYSCLK */
;;;42         RCC_HCLKConfig(RCC_SYSCLK_Div1); 
000018  2000              MOVS     r0,#0
00001a  f7fffffe          BL       RCC_HCLKConfig
;;;43       
;;;44         /* PCLK2 = HCLK/2 */
;;;45         RCC_PCLK2Config(RCC_HCLK_Div2); 
00001e  11ac              ASRS     r4,r5,#6
000020  4620              MOV      r0,r4
000022  f7fffffe          BL       RCC_PCLK2Config
;;;46     
;;;47         /* PCLK1 = HCLK/2 */
;;;48         RCC_PCLK1Config(RCC_HCLK_Div2);
000026  4620              MOV      r0,r4
000028  f7fffffe          BL       RCC_PCLK1Config
;;;49     
;;;50     	/* Flash 2 wait state */
;;;51         FLASH_SetLatency(FLASH_Latency_2);
00002c  2002              MOVS     r0,#2
00002e  f7fffffe          BL       FLASH_SetLatency
;;;52      
;;;53        /* PLLCLK = 8MHz * 9 = 72 MHz */
;;;54         RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);
000032  f44f11e0          MOV      r1,#0x1c0000
000036  4628              MOV      r0,r5
000038  f7fffffe          BL       RCC_PLLConfig
;;;55     
;;;56         /* Enable PLL */ 
;;;57         RCC_PLLCmd(ENABLE);
00003c  2001              MOVS     r0,#1
00003e  f7fffffe          BL       RCC_PLLCmd
                  |L6.66|
;;;58     
;;;59         /* Wait till PLL is ready */
;;;60         while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);
000042  2039              MOVS     r0,#0x39
000044  f7fffffe          BL       RCC_GetFlagStatus
000048  2800              CMP      r0,#0
00004a  d0fa              BEQ      |L6.66|
;;;61     
;;;62         /* Select PLL as system clock source */
;;;63         RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
00004c  2002              MOVS     r0,#2
00004e  f7fffffe          BL       RCC_SYSCLKConfig
;;;64     
;;;65         /* Wait till PLL is used as system clock source */
;;;66         while(RCC_GetSYSCLKSource() != 0x08);
000052  bf00              NOP      
                  |L6.84|
000054  f7fffffe          BL       RCC_GetSYSCLKSource
000058  2808              CMP      r0,#8
00005a  d1fb              BNE      |L6.84|
                  |L6.92|
;;;67         
;;;68       }
;;;69     
;;;70       /* Enable peripheral clocks --------------------------------------------------*/
;;;71       /* GPIOA, GPIOB and SPI1 clock enable */
;;;72       RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOE |
00005c  2101              MOVS     r1,#1
00005e  f245005c          MOV      r0,#0x505c
000062  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;73                              RCC_APB2Periph_USART1 |RCC_APB2Periph_SPI1, ENABLE);
;;;74       
;;;75       /* SysTick event each 1 ms with input clock equal to 9MHz (HCLK/8)         */
;;;76       SysTick_SetReload(9000);
000066  f2423028          MOV      r0,#0x2328
00006a  f7fffffe          BL       SysTick_SetReload
;;;77     
;;;78       SysTick_ITConfig(ENABLE);             /* Enable SysTick interrupt           */
00006e  e8bd4070          POP      {r4-r6,lr}
000072  2001              MOVS     r0,#1
000074  f7ffbffe          B.W      SysTick_ITConfig
;;;79     }
;;;80     
                          ENDP


                          AREA ||i.SetupUART1||, CODE, READONLY, ALIGN=2

                  SetupUART1 PROC
;;;88     void SetupUART1 (void)  
;;;89     {
000000  b530              PUSH     {r4,r5,lr}
000002  b089              SUB      sp,sp,#0x24
;;;90       GPIO_InitTypeDef  GPIO_InitStructure;
;;;91       USART_InitTypeDef USART_InitStructure;
;;;92       USART_ClockInitTypeDef  USART_ClockInitStructure;
;;;93       /* Enable GPIOA clock                                                       */
;;;94       RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
000004  2101              MOVS     r1,#1
000006  2004              MOVS     r0,#4
000008  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;95     
;;;96       /* Configure USART1 Rx (PA10) as input floating                             */
;;;97       GPIO_InitStructure.GPIO_Pin   = GPIO_Pin_10;
00000c  f44f6080          MOV      r0,#0x400
000010  f8ad0020          STRH     r0,[sp,#0x20]
;;;98       GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_IN_FLOATING;
000014  2004              MOVS     r0,#4
;;;99       GPIO_Init(GPIOA, &GPIO_InitStructure);
000016  4c1d              LDR      r4,|L7.140|
000018  f88d0023          STRB     r0,[sp,#0x23]         ;98
00001c  a908              ADD      r1,sp,#0x20
00001e  4620              MOV      r0,r4
000020  f7fffffe          BL       GPIO_Init
;;;100    
;;;101      /* Configure USART1 Tx (PA9) as alternate function push-pull                */
;;;102      GPIO_InitStructure.GPIO_Pin   = GPIO_Pin_9;
000024  1565              ASRS     r5,r4,#21
000026  f8ad5020          STRH     r5,[sp,#0x20]
;;;103      GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
00002a  2003              MOVS     r0,#3
00002c  f88d0022          STRB     r0,[sp,#0x22]
;;;104      GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_AF_PP;
000030  2018              MOVS     r0,#0x18
000032  f88d0023          STRB     r0,[sp,#0x23]
;;;105      GPIO_Init(GPIOA, &GPIO_InitStructure);
000036  a908              ADD      r1,sp,#0x20
000038  4620              MOV      r0,r4
00003a  f7fffffe          BL       GPIO_Init
;;;106    
;;;107      /* USART1 configured as follow:
;;;108            - BaudRate = 115200 baud  
;;;109            - Word Length = 8 Bits
;;;110            - One Stop Bit
;;;111            - No parity
;;;112            - Hardware flow control disabled (RTS and CTS signals)
;;;113            - Receive and transmit enabled
;;;114            - USART Clock disabled
;;;115            - USART CPOL: Clock is active low
;;;116            - USART CPHA: Data is captured on the middle 
;;;117            - USART LastBit: The clock pulse of the last data bit is not output to 
;;;118                             the SCLK pin
;;;119      */
;;;120      
;;;121    USART_ClockInitStructure.USART_Clock = USART_Clock_Disable;
00003e  2400              MOVS     r4,#0
;;;122    USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low;
;;;123    USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge;
000040  f8ad5004          STRH     r5,[sp,#4]
;;;124    USART_ClockInitStructure.USART_LastBit = USART_LastBit_Disable;
;;;125    /* Configure the USART1 synchronous paramters */
;;;126    USART_ClockInit(USART1, &USART_ClockInitStructure);
000044  4d12              LDR      r5,|L7.144|
000046  f8ad4000          STRH     r4,[sp,#0]            ;121
00004a  f8ad4002          STRH     r4,[sp,#2]            ;122
00004e  f8ad4006          STRH     r4,[sp,#6]            ;124
000052  4669              MOV      r1,sp
000054  4628              MOV      r0,r5
000056  f7fffffe          BL       USART_ClockInit
;;;127    
;;;128    USART_InitStructure.USART_BaudRate = 115200;
00005a  f44f30e1          MOV      r0,#0x1c200
;;;129    USART_InitStructure.USART_WordLength = USART_WordLength_8b;
00005e  9002              STR      r0,[sp,#8]
;;;130    USART_InitStructure.USART_StopBits = USART_StopBits_1;
;;;131    USART_InitStructure.USART_Parity = USART_Parity_No ;
000060  f8ad4010          STRH     r4,[sp,#0x10]
;;;132    USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
;;;133    
;;;134    
;;;135    USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
000064  200c              MOVS     r0,#0xc
000066  f8ad400c          STRH     r4,[sp,#0xc]          ;129
00006a  f8ad0012          STRH     r0,[sp,#0x12]
00006e  f8ad400e          STRH     r4,[sp,#0xe]          ;130
000072  f8ad4014          STRH     r4,[sp,#0x14]         ;132
;;;136    /* Configure USART1 basic and asynchronous paramters */
;;;137    USART_Init(USART1, &USART_InitStructure);
000076  a902              ADD      r1,sp,#8
000078  4628              MOV      r0,r5
00007a  f7fffffe          BL       USART_Init
;;;138    
;;;139      USART_Cmd(USART1, ENABLE);           /* Enable USART1                      */
00007e  2101              MOVS     r1,#1
000080  4628              MOV      r0,r5
000082  f7fffffe          BL       USART_Cmd
;;;140    }
000086  b009              ADD      sp,sp,#0x24
000088  bd30              POP      {r4,r5,pc}
;;;141    
                          ENDP

00008a  0000              DCW      0x0000
                  |L7.140|
00008c  40010800          DCD      0x40010800
                  |L7.144|
000090  40013800          DCD      0x40013800

                          AREA ||.data||, DATA, ALIGN=0

                  Clock1s
000000  00                DCB      0x00

                          AREA |area_number.9|, DATA, ALIGN=1

                          EXPORTAS |area_number.9|, ||.data||
                  GPIO_InitStructure
000000  00000000          DCDU     0x00000000

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  USART_InitStructure
                          %        24

⌨️ 快捷键说明

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