; 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\dma_pause.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\dma_pause.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\dma_pause.crf ..\Apps\DMA_Pause.c]
                          THUMB

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

                          REQUIRE _printf_percent
                          REQUIRE _printf_d
                          REQUIRE _printf_int_dec
                  DMA_Pause_Function PROC
;;;11     
;;;12     void DMA_Pause_Function(void)
000000  b0ec              SUB      sp,sp,#0x1b0
;;;13     {
;;;14       DMA_InitTypeDef DMA_InitStruct; //定义DMA初始化结构体变量
;;;15       uint8_t DMA_Pause_Src[200], DMA_Pause_Dst[200];
;;;16       uint8_t DMA_Pause_Num = 0;
;;;17       uint8_t i;
;;;18       for(i = 0; i < 200; i++)
000002  2000              MOVS     r0,#0
000004  ac07              ADD      r4,sp,#0x1c           ;15
                  |L1.6|
;;;19       {
;;;20         DMA_Pause_Src[i] = i;//被搬运数组写入数据
000006  5420              STRB     r0,[r4,r0]
000008  1c40              ADDS     r0,r0,#1
00000a  b2c0              UXTB     r0,r0                 ;18
00000c  28c8              CMP      r0,#0xc8              ;18
00000e  d3fa              BCC      |L1.6|
;;;21       }
;;;22     
;;;23       /* 使能DMA的时钟 */
;;;24       RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA, ENABLE);
000010  2101              MOVS     r1,#1
000012  4608              MOV      r0,r1
000014  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;25     
;;;26       /* DMA外设配置 */
;;;27       DMA_StructInit(&DMA_InitStruct);
000018  4668              MOV      r0,sp
00001a  f7fffffe          BL       DMA_StructInit
;;;28       DMA_InitStruct.DMA_BufferSize = 200;	//DMA搬运数量为200个
00001e  20c8              MOVS     r0,#0xc8
;;;29       DMA_InitStruct.DMA_Burst = DMA_Burst_Disable;	//Brust模式关闭
000020  9003              STR      r0,[sp,#0xc]
000022  2000              MOVS     r0,#0
000024  466a              MOV      r2,sp
000026  8150              STRH     r0,[r2,#0xa]
;;;30       DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Enable;	//开启循环模式
000028  2110              MOVS     r1,#0x10
00002a  8051              STRH     r1,[r2,#2]
;;;31       DMA_InitStruct.DMA_DataSize = DMA_DataSize_Byte;	//传输宽度为Byte
;;;32       DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_INC_CIRC;	//源地址循环递增
00002c  2103              MOVS     r1,#3
00002e  8090              STRH     r0,[r2,#4]            ;31
000030  0289              LSLS     r1,r1,#10
000032  8111              STRH     r1,[r2,#8]
;;;33       DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_INC_CIRC;	//目标地址循环递增
000034  1089              ASRS     r1,r1,#2
000036  80d1              STRH     r1,[r2,#6]
;;;34       DMA_InitStruct.DMA_SrcAddress = (uint32_t)&DMA_Pause_Src;	//设置源地址首地址
;;;35       DMA_InitStruct.DMA_DstAddress = (uint32_t)&DMA_Pause_Dst;	//设置目标地址首地址
000038  ad39              ADD      r5,sp,#0xe4
00003a  a904              ADD      r1,sp,#0x10
00003c  c131              STM      r1!,{r0,r4,r5}
;;;36       DMA_InitStruct.DMA_Request = DMA_Request_Null;	//无触发源
;;;37       DMA_InitStruct.DMA_Priority = DMA_Priority_HIGH;	//设置优先级为高
00003e  2002              MOVS     r0,#2
;;;38       DMA_Init(DMA0, &DMA_InitStruct);
000040  4e2f              LDR      r6,|L1.256|
000042  8010              STRH     r0,[r2,#0]            ;37
000044  4669              MOV      r1,sp
000046  4630              MOV      r0,r6
000048  f7fffffe          BL       DMA_Init
;;;39     
;;;40       DMA_Cmd(DMA0, ENABLE);//使能DMA0
00004c  2101              MOVS     r1,#1
00004e  4630              MOV      r0,r6
000050  f7fffffe          BL       DMA_Cmd
;;;41     
;;;42       /* 先搬运一半 */
;;;43       for(DMA_Pause_Num = 0; DMA_Pause_Num < 100; DMA_Pause_Num++)
000054  2400              MOVS     r4,#0
                  |L1.86|
;;;44       {
;;;45         DMA_SoftwareTrigger(DMA0);	//软件触发DMA
000056  4630              MOV      r0,r6
000058  f7fffffe          BL       DMA_SoftwareTrigger
00005c  1c64              ADDS     r4,r4,#1
00005e  b2e4              UXTB     r4,r4                 ;43
000060  2c64              CMP      r4,#0x64              ;43
000062  d3f8              BCC      |L1.86|
;;;46       }
;;;47     
;;;48       /* 开启DMA暂停*/
;;;49       DMA_PauseCmd(DMA0, ENABLE);//通道暂停后，DMA失能，内部寄存器的值处于保持状态
000064  2101              MOVS     r1,#1
000066  4630              MOV      r0,r6
000068  f7fffffe          BL       DMA_PauseCmd
;;;50     
;;;51       /* 搬运后一半 */
;;;52       for(DMA_Pause_Num = 0; DMA_Pause_Num < 100; DMA_Pause_Num++)
00006c  2400              MOVS     r4,#0
                  |L1.110|
;;;53       {
;;;54         DMA_SoftwareTrigger(DMA0);	//软件触发DMA
00006e  4630              MOV      r0,r6
000070  f7fffffe          BL       DMA_SoftwareTrigger
000074  1c64              ADDS     r4,r4,#1
000076  b2e4              UXTB     r4,r4                 ;52
000078  2c64              CMP      r4,#0x64              ;52
00007a  d3f8              BCC      |L1.110|
;;;55       }
;;;56     
;;;57       if(DMA_GetFlagStatus(DMA0, DMA_FLAG_TCIF) == SET)//若此刻DMA搬运完成标志置起，则说明通道暂停失败
00007c  2102              MOVS     r1,#2
00007e  4630              MOV      r0,r6
000080  f7fffffe          BL       DMA_GetFlagStatus
000084  2801              CMP      r0,#1
000086  d012              BEQ      |L1.174|
;;;58       {
;;;59         DMA_ClearFlag(DMA0, DMA_FLAG_TCIF);
;;;60     
;;;61         printf("搬运完成后的数组为: \r\n");
;;;62         for(i = 0; i < 200; i++)
;;;63         {
;;;64           printf("%d、", DMA_Pause_Dst[i]);
;;;65         }
;;;66         printf("\r\n");
;;;67         printf("DMA暂停失败\r\n");
;;;68       }
;;;69       else
;;;70       {
;;;71         /* 关闭DMA暂停*/
;;;72         DMA_PauseCmd(DMA0, DISABLE);//关闭通道暂停，DMA使能
000088  2100              MOVS     r1,#0
00008a  4630              MOV      r0,r6
00008c  f7fffffe          BL       DMA_PauseCmd
;;;73     
;;;74         /* 搬运后一半 */
;;;75         for(DMA_Pause_Num = 0; DMA_Pause_Num < 100; DMA_Pause_Num++)
000090  2400              MOVS     r4,#0
                  |L1.146|
;;;76         {
;;;77           DMA_SoftwareTrigger(DMA0);	//软件触发DMA
000092  4630              MOV      r0,r6
000094  f7fffffe          BL       DMA_SoftwareTrigger
000098  1c64              ADDS     r4,r4,#1
00009a  b2e4              UXTB     r4,r4                 ;75
00009c  2c64              CMP      r4,#0x64              ;75
00009e  d3f8              BCC      |L1.146|
;;;78         }
;;;79     
;;;80         if(DMA_GetFlagStatus(DMA0, DMA_FLAG_TCIF) == SET)//DMA搬运完成
0000a0  2102              MOVS     r1,#2
0000a2  4630              MOV      r0,r6
0000a4  f7fffffe          BL       DMA_GetFlagStatus
0000a8  2801              CMP      r0,#1
0000aa  d015              BEQ      |L1.216|
0000ac  e027              B        |L1.254|
                  |L1.174|
0000ae  2102              MOVS     r1,#2                 ;59
0000b0  4630              MOV      r0,r6                 ;59
0000b2  f7fffffe          BL       DMA_ClearFlag
0000b6  a013              ADR      r0,|L1.260|
0000b8  f7fffffe          BL       __2printf
0000bc  2400              MOVS     r4,#0                 ;62
                  |L1.190|
0000be  5d29              LDRB     r1,[r5,r4]            ;64
0000c0  a016              ADR      r0,|L1.284|
0000c2  f7fffffe          BL       __2printf
0000c6  1c64              ADDS     r4,r4,#1              ;64
0000c8  b2e4              UXTB     r4,r4                 ;62
0000ca  2cc8              CMP      r4,#0xc8              ;62
0000cc  d3f7              BCC      |L1.190|
0000ce  a012              ADR      r0,|L1.280|
0000d0  f7fffffe          BL       __2printf
0000d4  a013              ADR      r0,|L1.292|
0000d6  e010              B        |L1.250|
                  |L1.216|
;;;81         {
;;;82           DMA_ClearFlag(DMA0, DMA_FLAG_TCIF);//清标志
0000d8  2102              MOVS     r1,#2
0000da  4630              MOV      r0,r6
0000dc  f7fffffe          BL       DMA_ClearFlag
;;;83     
;;;84           printf("搬运完成后的数组为: \r\n");
0000e0  a008              ADR      r0,|L1.260|
0000e2  f7fffffe          BL       __2printf
;;;85           for(i = 0; i < 200; i++)
0000e6  2400              MOVS     r4,#0
                  |L1.232|
;;;86           {
;;;87             printf("%d、", DMA_Pause_Dst[i]);
0000e8  5d29              LDRB     r1,[r5,r4]
0000ea  a00c              ADR      r0,|L1.284|
0000ec  f7fffffe          BL       __2printf
0000f0  1c64              ADDS     r4,r4,#1
0000f2  b2e4              UXTB     r4,r4                 ;85
0000f4  2cc8              CMP      r4,#0xc8              ;85
0000f6  d3f7              BCC      |L1.232|
;;;88           }
;;;89           printf("\r\n");
0000f8  a007              ADR      r0,|L1.280|
                  |L1.250|
0000fa  f7fffffe          BL       __2printf
                  |L1.254|
;;;90         }
;;;91       }
;;;92     
;;;93       while(1);
0000fe  e7fe              B        |L1.254|
;;;94     }
;;;95     
                          ENDP

                  |L1.256|
                          DCD      0x40010800
                  |L1.260|
000104  b0e1d4cb          DCB      176,225,212,203,205,234,179,201,186,243,181,196,202,253,215
000108  cdeab3c9
00010c  baf3b5c4
000110  cafdd7  
000113  e9ceaa3a          DCB      233,206,170,": "
000117  20      
                  |L1.280|
000118  0d0a00            DCB      "\r\n",0
00011b  00                DCB      0
                  |L1.284|
00011c  2564a1a2          DCB      "%d",161,162,0
000120  00      
000121  00                DCB      0
000122  00                DCB      0
000123  00                DCB      0
                  |L1.292|
000124  444d41d4          DCB      "DMA",212,221,205,163,202,167,176,220,"\r\n",0
000128  ddcda3ca
00012c  a7b0dc0d
000130  0a00    
000132  00                DCB      0
000133  00                DCB      0

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
