; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\output\uart_communication_dma.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\uart_communication_dma.d --cpu=Cortex-M0+ --apcs=interwork --diag_suppress=9931 -I..\FWLib\SC32F1XXX_Lib\inc -I..\User\HeadFiles -I..\User -I..\Drivers -I..\Apps -I..\CMSIS -IF:\Users\SOC\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\Device\ARM\ARMCM0plus\Include -D__UVISION_VERSION=536 -DARMCM0P -DSC32f10xx --omf_browse=..\output\uart_communication_dma.crf ..\Apps\UART_Communication_DMA.c]
                          THUMB

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

                  UART_Communication_DMA_DAM0Handler PROC
;;;94     //DMA0中断
;;;95     void UART_Communication_DMA_DAM0Handler(void)
000000  b510              PUSH     {r4,lr}
;;;96     {
;;;97       if(DMA_GetFlagStatus(DMA0, DMA_FLAG_TCIF))
000002  4c07              LDR      r4,|L1.32|
000004  2102              MOVS     r1,#2
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       DMA_GetFlagStatus
00000c  2800              CMP      r0,#0
00000e  d006              BEQ      |L1.30|
;;;98       {
;;;99         DMA_ClearFlag(DMA0, DMA_FLAG_TCIF);
000010  2102              MOVS     r1,#2
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       DMA_ClearFlag
;;;100        UART_TxFlag = SET;
000018  4902              LDR      r1,|L1.36|
00001a  2001              MOVS     r0,#1
00001c  7048              STRB     r0,[r1,#1]
                  |L1.30|
;;;101      }
;;;102    }
00001e  bd10              POP      {r4,pc}
;;;103    //DMA1中断
                          ENDP

                  |L1.32|
                          DCD      0x40010800
                  |L1.36|
                          DCD      ||.data||

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

                  UART_Communication_DMA_DAM1Handler PROC
;;;103    //DMA1中断
;;;104    void UART_Communication_DMA_DAM1Handler(void)
000000  b510              PUSH     {r4,lr}
;;;105    {
;;;106      if(DMA_GetFlagStatus(DMA1, DMA_FLAG_TCIF))
000002  4c07              LDR      r4,|L2.32|
000004  2102              MOVS     r1,#2
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       DMA_GetFlagStatus
00000c  2800              CMP      r0,#0
00000e  d006              BEQ      |L2.30|
;;;107      {
;;;108        DMA_ClearFlag(DMA1, DMA_FLAG_TCIF);
000010  2102              MOVS     r1,#2
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       DMA_ClearFlag
;;;109        UART_RxFlag = SET;
000018  4902              LDR      r1,|L2.36|
00001a  2001              MOVS     r0,#1
00001c  7008              STRB     r0,[r1,#0]
                  |L2.30|
;;;110      }
;;;111    }
00001e  bd10              POP      {r4,pc}
                          ENDP

                  |L2.32|
                          DCD      0x40010840
                  |L2.36|
                          DCD      ||.data||

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

                  UART_Communication_DMA_Function PROC
;;;13     
;;;14     void UART_Communication_DMA_Function(void)
000000  2101              MOVS     r1,#1
;;;15     {
000002  b0bc              SUB      sp,sp,#0xf0
;;;16         volatile uint16_t UART_RxData;
;;;17         UART_InitTypeDef UART_InitStruct; //定义UART初始化结构体变量
;;;18         DMA_InitTypeDef DMA_InitStruct; //定义DMA初始化结构体变量
;;;19         uint8_t UART_Communication_DMA_Data[200];//发送200个8位自定义数据（若要修改数据个数需修改相应数组大小和DMA搬运个数）
;;;20     
;;;21         /* 使能DMA时钟 */
;;;22         RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA, ENABLE);
000004  4608              MOV      r0,r1
000006  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;23     
;;;24         /* UART时钟使能 */
;;;25         /* UART0/1挂载在APB0时钟上 */
;;;26         RCC_APB0Cmd(ENABLE);//开启APB0时钟
00000a  2001              MOVS     r0,#1
00000c  f7fffffe          BL       RCC_APB0Cmd
;;;27         RCC_APB0PeriphClockCmd(RCC_APB0Periph_UART1,ENABLE);//开启UART1时钟
000010  2101              MOVS     r1,#1
000012  2080              MOVS     r0,#0x80
000014  f7fffffe          BL       RCC_APB0PeriphClockCmd
;;;28     
;;;29         DMA_StructInit(&DMA_InitStruct);
000018  4668              MOV      r0,sp
00001a  f7fffffe          BL       DMA_StructInit
;;;30     
;;;31         DMA_InitStruct.DMA_BufferSize = 200;	//DMA搬运数量为200个
00001e  25c8              MOVS     r5,#0xc8
;;;32         DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Disable;	//关闭循环模式
000020  2400              MOVS     r4,#0
000022  4668              MOV      r0,sp
000024  9503              STR      r5,[sp,#0xc]
000026  8044              STRH     r4,[r0,#2]
;;;33         DMA_InitStruct.DMA_DataSize = DMA_DataSize_Byte;	//传输宽度为字节
;;;34         DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_INC_CIRC;	//源地址循环递增
000028  2103              MOVS     r1,#3
00002a  8084              STRH     r4,[r0,#4]            ;33
00002c  0289              LSLS     r1,r1,#10
00002e  8101              STRH     r1,[r0,#8]
;;;35         DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_FIXED;	//目标地址固定
000030  80c4              STRH     r4,[r0,#6]
;;;36         DMA_InitStruct.DMA_SrcAddress = (uint32_t)UART_Communication_DMA_Data;
;;;37         DMA_InitStruct.DMA_DstAddress = (uint32_t)&UART1->UART_DATA;
000032  483b              LDR      r0,|L3.288|
;;;38         DMA_InitStruct.DMA_Request = DMA_Request_UART1_TX;	//UART1发送触发DMA0
000034  9006              STR      r0,[sp,#0x18]
000036  2001              MOVS     r0,#1
000038  0680              LSLS     r0,r0,#26
00003a  af0a              ADD      r7,sp,#0x28           ;36
;;;39         DMA_InitStruct.DMA_Priority = DMA_Priority_HIGH;	//设置优先级为高
00003c  9004              STR      r0,[sp,#0x10]
00003e  9705              STR      r7,[sp,#0x14]         ;38
000040  2102              MOVS     r1,#2
000042  4668              MOV      r0,sp
000044  8001              STRH     r1,[r0,#0]
;;;40         DMA_Init(DMA0, &DMA_InitStruct);
000046  4e37              LDR      r6,|L3.292|
000048  4669              MOV      r1,sp
00004a  4630              MOV      r0,r6
00004c  f7fffffe          BL       DMA_Init
;;;41         DMA_ITConfig(DMA0, DMA_IT_INTEN | DMA_IT_TCIE, ENABLE);
000050  2103              MOVS     r1,#3
000052  2201              MOVS     r2,#1
000054  0409              LSLS     r1,r1,#16
000056  4630              MOV      r0,r6
000058  f7fffffe          BL       DMA_ITConfig
;;;42         NVIC_EnableIRQ(DMA0_IRQn);
00005c  200b              MOVS     r0,#0xb
00005e  f7fffffe          BL       __NVIC_EnableIRQ
;;;43     
;;;44         DMA_Cmd(DMA0, ENABLE);	//使能DMA0
000062  2101              MOVS     r1,#1
000064  4630              MOV      r0,r6
000066  f7fffffe          BL       DMA_Cmd
;;;45     
;;;46         DMA_InitStruct.DMA_BufferSize = 200;	//DMA搬运数量为200个
;;;47         DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Enable;	//关闭循环模式
00006a  9503              STR      r5,[sp,#0xc]
00006c  2110              MOVS     r1,#0x10
00006e  4668              MOV      r0,sp
000070  8041              STRH     r1,[r0,#2]
;;;48         DMA_InitStruct.DMA_DataSize = DMA_DataSize_Byte;	//传输宽度为字节
000072  8084              STRH     r4,[r0,#4]
;;;49         DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_FIXED;	//源地址循环递增
;;;50         DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_INC_CIRC;	//目标地址固定
000074  2103              MOVS     r1,#3
000076  8104              STRH     r4,[r0,#8]            ;49
000078  0209              LSLS     r1,r1,#8
00007a  80c1              STRH     r1,[r0,#6]
;;;51         DMA_InitStruct.DMA_SrcAddress = (uint32_t)&UART1->UART_DATA;
00007c  4828              LDR      r0,|L3.288|
;;;52         DMA_InitStruct.DMA_DstAddress = (uint32_t)UART_Communication_DMA_Data;
;;;53         DMA_InitStruct.DMA_Request = DMA_Request_UART1_RX;	//UART1接受触发DMA1
00007e  9005              STR      r0,[sp,#0x14]
000080  2005              MOVS     r0,#5
000082  0600              LSLS     r0,r0,#24
;;;54         DMA_InitStruct.DMA_Priority = DMA_Priority_VERY_HIGH;	//设置优先级为高
000084  9004              STR      r0,[sp,#0x10]
000086  9706              STR      r7,[sp,#0x18]         ;53
000088  2103              MOVS     r1,#3
00008a  4668              MOV      r0,sp
;;;55         DMA_Init(DMA1, &DMA_InitStruct);
00008c  4d25              LDR      r5,|L3.292|
00008e  8001              STRH     r1,[r0,#0]            ;54
000090  3540              ADDS     r5,r5,#0x40
000092  4669              MOV      r1,sp
000094  4628              MOV      r0,r5
000096  f7fffffe          BL       DMA_Init
;;;56         DMA_ITConfig(DMA1, DMA_IT_INTEN | DMA_IT_TCIE, ENABLE);
00009a  2103              MOVS     r1,#3
00009c  2201              MOVS     r2,#1
00009e  0409              LSLS     r1,r1,#16
0000a0  4628              MOV      r0,r5
0000a2  f7fffffe          BL       DMA_ITConfig
;;;57         NVIC_EnableIRQ(DMA1_IRQn);
0000a6  200c              MOVS     r0,#0xc
0000a8  f7fffffe          BL       __NVIC_EnableIRQ
;;;58     
;;;59         DMA_Cmd(DMA1, ENABLE);	//使能DMA1
0000ac  2101              MOVS     r1,#1
0000ae  4628              MOV      r0,r5
0000b0  f7fffffe          BL       DMA_Cmd
;;;60     
;;;61         UART_InitStruct.UART_BaudRate = 115200;	//串口波特率为115200
0000b4  20e1              MOVS     r0,#0xe1
0000b6  0240              LSLS     r0,r0,#9
;;;62     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;63         UART_InitStruct.UART_ClockFrequency = 32000000;	//APB时钟频率配置为32MHz
0000b8  9008              STR      r0,[sp,#0x20]
0000ba  481b              LDR      r0,|L3.296|
;;;64     #endif
;;;65         UART_InitStruct.UART_Mode = UART_Mode_10B;	//工作在模式1
0000bc  9007              STR      r0,[sp,#0x1c]
;;;66         /*  根据结构体配置初始化串口 */
;;;67         UART_Init(UART1, &UART_InitStruct);
0000be  4f18              LDR      r7,|L3.288|
0000c0  2001              MOVS     r0,#1                 ;65
0000c2  3f0c              SUBS     r7,r7,#0xc
0000c4  9009              STR      r0,[sp,#0x24]
0000c6  a907              ADD      r1,sp,#0x1c
0000c8  4638              MOV      r0,r7
0000ca  f7fffffe          BL       UART_Init
;;;68     
;;;69         UART_DMACmd(UART1, UART_DMAReq_TX | UART_DMAReq_RX, ENABLE);
0000ce  2201              MOVS     r2,#1
0000d0  21c0              MOVS     r1,#0xc0
0000d2  4638              MOV      r0,r7
0000d4  f7fffffe          BL       UART_DMACmd
;;;70     
;;;71         /* 使能接收发送口 */
;;;72         UART_TXCmd(UART1, ENABLE);
0000d8  2101              MOVS     r1,#1
0000da  4638              MOV      r0,r7
0000dc  f7fffffe          BL       UART_TXCmd
;;;73         UART_RXCmd(UART1, ENABLE);
0000e0  2101              MOVS     r1,#1
0000e2  4638              MOV      r0,r7
0000e4  f7fffffe          BL       UART_RXCmd
;;;74     
;;;75       while(1)
;;;76       {
;;;77         if(UART_RxFlag == SET)//DMA1搬运完成
0000e8  4d10              LDR      r5,|L3.300|
                  |L3.234|
0000ea  7828              LDRB     r0,[r5,#0]  ; UART_RxFlag
0000ec  2801              CMP      r0,#1
0000ee  d1fc              BNE      |L3.234|
;;;78         {
;;;79           UART_RxFlag = RESET;//清标志
0000f0  702c              STRB     r4,[r5,#0]
;;;80     			
;;;81           /* DMA1重新使能 */
;;;82           DMA_SetCurrDataCounter(DMA0,200);//重新写入搬运个数
0000f2  21c8              MOVS     r1,#0xc8
0000f4  4630              MOV      r0,r6
0000f6  f7fffffe          BL       DMA_SetCurrDataCounter
;;;83           UART_DMACmd(UART1, UART_DMAReq_TX, DISABLE);//重新使能UART1 TX触发DMA1
0000fa  2200              MOVS     r2,#0
0000fc  2180              MOVS     r1,#0x80
0000fe  4638              MOV      r0,r7
000100  f7fffffe          BL       UART_DMACmd
;;;84           UART_DMACmd(UART1, UART_DMAReq_TX, ENABLE);
000104  2201              MOVS     r2,#1
000106  2180              MOVS     r1,#0x80
000108  4638              MOV      r0,r7
00010a  f7fffffe          BL       UART_DMACmd
;;;85     			
;;;86     	  /* 软件使能DMA0搬运 */
;;;87           DMA_SoftwareTrigger(DMA0);
00010e  4630              MOV      r0,r6
000110  f7fffffe          BL       DMA_SoftwareTrigger
                  |L3.276|
;;;88           while(UART_TxFlag == RESET);//等待DMA0搬运完成
000114  7868              LDRB     r0,[r5,#1]  ; UART_TxFlag
000116  2800              CMP      r0,#0
000118  d0fc              BEQ      |L3.276|
;;;89     	  UART_TxFlag = RESET; //清标志
00011a  706c              STRB     r4,[r5,#1]
00011c  e7e5              B        |L3.234|
;;;90         }
;;;91       }
;;;92     }
;;;93     
                          ENDP

00011e  0000              DCW      0x0000
                  |L3.288|
                          DCD      0x4002008c
                  |L3.292|
                          DCD      0x40010800
                  |L3.296|
                          DCD      0x01e84800
                  |L3.300|
                          DCD      ||.data||

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

                  __NVIC_EnableIRQ PROC
;;;740     */
;;;741    __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
000000  2800              CMP      r0,#0
;;;742    {
000002  db05              BLT      |L4.16|
;;;743      if ((int32_t)(IRQn) >= 0)
;;;744      {
;;;745        NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
000004  06c1              LSLS     r1,r0,#27
000006  0ec9              LSRS     r1,r1,#27
000008  2001              MOVS     r0,#1
00000a  4088              LSLS     r0,r0,r1
00000c  4901              LDR      r1,|L4.20|
00000e  6008              STR      r0,[r1,#0]
                  |L4.16|
;;;746      }
;;;747    }
000010  4770              BX       lr
;;;748    
                          ENDP

000012  0000              DCW      0x0000
                  |L4.20|
                          DCD      0xe000e100

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

                  UART_RxFlag
000000  00                DCB      0x00
                  UART_TxFlag
000001  00                DCB      0x00

;*** Start embedded assembler ***

#line 1 "..\\Apps\\UART_Communication_DMA.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___24_UART_Communication_DMA_c_bd11085e____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___24_UART_Communication_DMA_c_bd11085e____REV16| PROC
#line 464

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___24_UART_Communication_DMA_c_bd11085e____REVSH|
#line 478
|__asm___24_UART_Communication_DMA_c_bd11085e____REVSH| PROC
#line 479

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
