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

📄 uart.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..\Release\uart.o --depend=..\Release\uart.d --device=DARMSTM --apcs=interwork -O3 -I..\code\header -I..\code\library\inc -I..\..\include -I..\..\..\..\library\inc -I..\..\..\..\..\FWLib\library\inc -I..\code\FAT16 -I..\code\driver -ID:\Keil\ARM\INC\ST\STM32F10x -DVECT_TAB_FLASH --omf_browse=..\Release\uart.crf ..\code\driver\uart.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
;;;5      extern int  SendChar (int ch);         
;;;6      void _ttywrch (int ch) { SendChar(ch); }
000000  f7ffbffe          B.W      SendChar
;;;7      void _sys_exit (int return_code) { for (;;); }
                          ENDP


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

                  _sys_exit PROC
;;;6      void _ttywrch (int ch) { SendChar(ch); }
;;;7      void _sys_exit (int return_code) { for (;;); }
000000  e7fe              B        _sys_exit
;;;8      
                          ENDP


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

                  fputc PROC
;;;8      
;;;9      int fputc (int ch, FILE *f) { return (SendChar(ch)); }
000000  f7ffbffe          B.W      SendChar
;;;10     int ferror (FILE *f) {
                          ENDP


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

                  ferror PROC
;;;11       /* Your implementation of ferror */
;;;12       return EOF;
000000  f04f30ff          MOV      r0,#0xffffffff
;;;13     } 
000004  4770              BX       lr
;;;14     
                          ENDP


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

                  SetupUART1 PROC
;;;24     *******************************************************************************/
;;;25     void SetupUART1 (void)  {
000000  b530              PUSH     {r4,r5,lr}
000002  b089              SUB      sp,sp,#0x24
;;;26     
;;;27       GPIO_InitTypeDef  GPIO_InitStructure;
;;;28       USART_InitTypeDef USART_InitStructure;
;;;29       USART_ClockInitTypeDef  USART_ClockInitStructure;
;;;30       /* Enable GPIOA clock                                                       */
;;;31       RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
000004  2101              MOVS     r1,#1
000006  2004              MOVS     r0,#4
000008  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;32     
;;;33       /* Configure USART1 Rx (PA10) as input floating                             */
;;;34       GPIO_InitStructure.GPIO_Pin   = GPIO_Pin_10;
00000c  f44f6080          MOV      r0,#0x400
000010  f8ad0020          STRH     r0,[sp,#0x20]
;;;35       GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_IN_FLOATING;
000014  2004              MOVS     r0,#4
;;;36       GPIO_Init(GPIOA, &GPIO_InitStructure);
000016  4c1d              LDR      r4,|L6.140|
000018  f88d0023          STRB     r0,[sp,#0x23]         ;35
00001c  a908              ADD      r1,sp,#0x20
00001e  4620              MOV      r0,r4
000020  f7fffffe          BL       GPIO_Init
;;;37     
;;;38       /* Configure USART1 Tx (PA9) as alternate function push-pull                */
;;;39       GPIO_InitStructure.GPIO_Pin   = GPIO_Pin_9;
000024  1565              ASRS     r5,r4,#21
000026  f8ad5020          STRH     r5,[sp,#0x20]
;;;40       GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
00002a  2003              MOVS     r0,#3
00002c  f88d0022          STRB     r0,[sp,#0x22]
;;;41       GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_AF_PP;
000030  2018              MOVS     r0,#0x18
000032  f88d0023          STRB     r0,[sp,#0x23]
;;;42       GPIO_Init(GPIOA, &GPIO_InitStructure);
000036  a908              ADD      r1,sp,#0x20
000038  4620              MOV      r0,r4
00003a  f7fffffe          BL       GPIO_Init
;;;43     
;;;44       /* USART1 configured as follow:
;;;45             - BaudRate = 115200 baud  
;;;46             - Word Length = 8 Bits
;;;47             - One Stop Bit
;;;48             - No parity
;;;49             - Hardware flow control disabled (RTS and CTS signals)
;;;50             - Receive and transmit enabled
;;;51             - USART Clock disabled
;;;52             - USART CPOL: Clock is active low
;;;53             - USART CPHA: Data is captured on the middle 
;;;54             - USART LastBit: The clock pulse of the last data bit is not output to 
;;;55                              the SCLK pin
;;;56       */
;;;57       
;;;58     
;;;59     USART_ClockInitStructure.USART_Clock = USART_Clock_Disable;
00003e  2400              MOVS     r4,#0
;;;60     USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low;
;;;61     USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge;
000040  f8ad5004          STRH     r5,[sp,#4]
;;;62     USART_ClockInitStructure.USART_LastBit = USART_LastBit_Disable;
;;;63     /* Configure the USART1 synchronous paramters */
;;;64     USART_ClockInit(USART1, &USART_ClockInitStructure);
000044  4d12              LDR      r5,|L6.144|
000046  f8ad4000          STRH     r4,[sp,#0]            ;59
00004a  f8ad4002          STRH     r4,[sp,#2]            ;60
00004e  f8ad4006          STRH     r4,[sp,#6]            ;62
000052  4669              MOV      r1,sp
000054  4628              MOV      r0,r5
000056  f7fffffe          BL       USART_ClockInit
;;;65     
;;;66     USART_InitStructure.USART_BaudRate = 115200;
00005a  f44f30e1          MOV      r0,#0x1c200
;;;67     USART_InitStructure.USART_WordLength = USART_WordLength_8b;
00005e  9002              STR      r0,[sp,#8]
;;;68     USART_InitStructure.USART_StopBits = USART_StopBits_1;
;;;69     USART_InitStructure.USART_Parity = USART_Parity_No ;
000060  f8ad4010          STRH     r4,[sp,#0x10]
;;;70     USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
;;;71     
;;;72     
;;;73     USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
000064  200c              MOVS     r0,#0xc
000066  f8ad400c          STRH     r4,[sp,#0xc]          ;67
00006a  f8ad0012          STRH     r0,[sp,#0x12]
00006e  f8ad400e          STRH     r4,[sp,#0xe]          ;68
000072  f8ad4014          STRH     r4,[sp,#0x14]         ;70
;;;74     /* Configure USART1 basic and asynchronous paramters */
;;;75     USART_Init(USART1, &USART_InitStructure);
000076  a902              ADD      r1,sp,#8
000078  4628              MOV      r0,r5
00007a  f7fffffe          BL       USART_Init
;;;76     
;;;77       USART_Cmd(USART1, ENABLE); 
00007e  2101              MOVS     r1,#1
000080  4628              MOV      r0,r5
000082  f7fffffe          BL       USART_Cmd
;;;78                  /* Enable USART1                      */
;;;79        }
000086  b009              ADD      sp,sp,#0x24
000088  bd30              POP      {r4,r5,pc}
;;;80     
                          ENDP

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

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

                  Clock1s
000000  00                DCB      0x00

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

                          EXPORTAS |area_number.8|, ||.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 + -