; 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_scattergather.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\dma_scattergather.d --cpu=Cortex-M0+ --apcs=interwork -O0 --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 -DSC32f15xx --omf_browse=..\output\dma_scattergather.crf ..\Apps\DMA_ScatterGather.c]
                          THUMB

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

                          REQUIRE _printf_percent
                          REQUIRE _printf_widthprec
                          REQUIRE _printf_s
                          REQUIRE _printf_str
                  DMA_ScatterGather_Function PROC
;;;15     
;;;16     void DMA_ScatterGather_Function(void)
000000  b090              SUB      sp,sp,#0x40
;;;17     {
;;;18       DMA_InitTypeDef DMA_InitStruct; //DMAʼṹ
;;;19       TIM_TimeBaseInitTypeDef TIM_TimeBaseInitStruct;
;;;20     
;;;21       const uint8_t* DMA_ScatterGather_ScatterSrc[] =
000002  4a51              LDR      r2,|L1.328|
000004  ca07              LDM      r2,{r0-r2}
000006  ab03              ADD      r3,sp,#0xc
000008  c307              STM      r3!,{r0-r2}
;;;22       {
;;;23         DMA_ScatterGather_Data1, DMA_ScatterGather_Data2,
;;;24         DMA_ScatterGather_Data3
;;;25       };
;;;26       uint8_t DMA_ScatterGather_GatherDst[12] = {0};
00000a  2000              MOVS     r0,#0
00000c  9000              STR      r0,[sp,#0]
00000e  9001              STR      r0,[sp,#4]
000010  9002              STR      r0,[sp,#8]
;;;27     
;;;28       /* ʹTIM1ʱ */
;;;29       RCC_APB0Cmd(ENABLE);
000012  2001              MOVS     r0,#1
000014  f7fffffe          BL       RCC_APB0Cmd
;;;30       RCC_APB0PeriphClockCmd(RCC_APB0Periph_TIM1, ENABLE);
000018  2101              MOVS     r1,#1
00001a  2002              MOVS     r0,#2
00001c  f7fffffe          BL       RCC_APB0PeriphClockCmd
;;;31       /* ʹDMAʱ */
;;;32       RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA, ENABLE);
000020  2101              MOVS     r1,#1
000022  4608              MOV      r0,r1
000024  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;33     
;;;34       /* TIMýṹʼ */
;;;35       TIM_TimeBaseStructInit(&TIM_TimeBaseInitStruct);
000028  a806              ADD      r0,sp,#0x18
00002a  f7fffffe          BL       TIM_TimeBaseStructInit
;;;36       /* TIMýṹ */
;;;37       TIM_TimeBaseInitStruct.TIM_CounterMode = TIM_CounterMode_Up;	//TIMϼģʽ
00002e  2100              MOVS     r1,#0
000030  4668              MOV      r0,sp
000032  8381              STRH     r1,[r0,#0x1c]
;;;38       TIM_TimeBaseInitStruct.TIM_EXENX = TIM_EXENX_Disable;	//ⲿؼعܽʧ
000034  83c1              STRH     r1,[r0,#0x1e]
;;;39     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;40       TIM_TimeBaseInitStruct.TIM_Preload = 65535-(32000000 / 1000);	//TIMĶʱƵΪ1000Hz@APB0Clock=32M
;;;41     #elif defined(SC32f15xx)
;;;42       TIM_TimeBaseInitStruct.TIM_Preload = 65536-(36000000/1000);	//TIMĶʱƵΪ1000Hz@TIMʱƵ=36M                                                                     //TIMϼʱֵ=65536-(TIMʱƵ/1000000*TIMʱƵ)
000036  4945              LDR      r1,|L1.332|
000038  8401              STRH     r1,[r0,#0x20]
;;;43     #endif	
;;;44       TIM_TimeBaseInitStruct.TIM_Prescaler = TIM_PRESCALER_2;	//TIMƵΪ2Ƶ
00003a  21ff              MOVS     r1,#0xff
00003c  3101              ADDS     r1,#1
00003e  8301              STRH     r1,[r0,#0x18]
;;;45       TIM_TimeBaseInitStruct.TIM_WorkMode = TIM_WorkMode_Timer;	//TIMڶʱģʽʱԴΪAPB0ʱ
000040  2100              MOVS     r1,#0
000042  8341              STRH     r1,[r0,#0x1a]
;;;46       /* TIMʱ */
;;;47       TIM_TIMBaseInit(TIM1, &TIM_TimeBaseInitStruct);
000044  a906              ADD      r1,sp,#0x18
000046  4842              LDR      r0,|L1.336|
000048  f7fffffe          BL       TIM_TIMBaseInit
;;;48       TIM_DMACmd(TIM1, TIM_DMAReq_TI, ENABLE);
00004c  2201              MOVS     r2,#1
00004e  2110              MOVS     r1,#0x10
000050  483f              LDR      r0,|L1.336|
000052  f7fffffe          BL       TIM_DMACmd
;;;49       TIM_Cmd(TIM1, ENABLE);
000056  2101              MOVS     r1,#1
000058  483d              LDR      r0,|L1.336|
00005a  f7fffffe          BL       TIM_Cmd
;;;50     
;;;51       /* DMA */
;;;52       DMA_StructInit(&DMA_InitStruct);
00005e  a809              ADD      r0,sp,#0x24
000060  f7fffffe          BL       DMA_StructInit
;;;53       DMA_InitStruct.DMA_BufferSize = 4;	//DMAΪ4
000064  2004              MOVS     r0,#4
000066  900c              STR      r0,[sp,#0x30]
;;;54       DMA_InitStruct.DMA_Burst = DMA_Burst_Disable;	//Brustģʽر
000068  2100              MOVS     r1,#0
00006a  4668              MOV      r0,sp
00006c  85c1              STRH     r1,[r0,#0x2e]
;;;55       DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Enable;	//ѭģʽ
00006e  2110              MOVS     r1,#0x10
000070  84c1              STRH     r1,[r0,#0x26]
;;;56       DMA_InitStruct.DMA_DataSize = DMA_DataSize_Byte;	//Ϊֽ
000072  2100              MOVS     r1,#0
000074  8501              STRH     r1,[r0,#0x28]
;;;57       DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_INC_CIRC;	//Դַѭ
000076  2103              MOVS     r1,#3
000078  0289              LSLS     r1,r1,#10
00007a  8581              STRH     r1,[r0,#0x2c]
;;;58       DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_INC;	//Ŀַ
00007c  21ff              MOVS     r1,#0xff
00007e  3101              ADDS     r1,#1
000080  8541              STRH     r1,[r0,#0x2a]
;;;59       DMA_InitStruct.DMA_SrcAddress = (uint32_t)0x00;	//ҪãͨDMA1Զ
000082  2000              MOVS     r0,#0
000084  900e              STR      r0,[sp,#0x38]
;;;60       DMA_InitStruct.DMA_DstAddress = (uint32_t)DMA_ScatterGather_GatherDst;	//Ŀַ
000086  4668              MOV      r0,sp
000088  900f              STR      r0,[sp,#0x3c]
;;;61       DMA_InitStruct.DMA_Request = DMA_Request_TIM1_TI;	//TIM1DMA0
00008a  2021              MOVS     r0,#0x21
00008c  0600              LSLS     r0,r0,#24
00008e  900d              STR      r0,[sp,#0x34]
;;;62       DMA_InitStruct.DMA_Priority = DMA_Priority_HIGH;	//ȼΪ
000090  2102              MOVS     r1,#2
000092  4668              MOV      r0,sp
000094  8481              STRH     r1,[r0,#0x24]
;;;63       DMA_Init(DMA0, &DMA_InitStruct);
000096  a909              ADD      r1,sp,#0x24
000098  482e              LDR      r0,|L1.340|
00009a  f7fffffe          BL       DMA_Init
;;;64       DMA_DMACmd(DMA0, DMA_DMAReq_CHRQ, ENABLE);
00009e  2201              MOVS     r2,#1
0000a0  05d1              LSLS     r1,r2,#23
0000a2  482c              LDR      r0,|L1.340|
0000a4  f7fffffe          BL       DMA_DMACmd
;;;65     
;;;66     
;;;67       DMA_InitStruct.DMA_BufferSize = 3; 
0000a8  2003              MOVS     r0,#3
0000aa  900c              STR      r0,[sp,#0x30]
;;;68       DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Disable;	//رѭģʽ
0000ac  2100              MOVS     r1,#0
0000ae  4668              MOV      r0,sp
0000b0  84c1              STRH     r1,[r0,#0x26]
;;;69       DMA_InitStruct.DMA_Burst = DMA_Burst_Disable;	//Brustģʽر
0000b2  85c1              STRH     r1,[r0,#0x2e]
;;;70       DMA_InitStruct.DMA_DataSize = DMA_DataSize_Word;	//Ϊ
0000b4  2108              MOVS     r1,#8
0000b6  8501              STRH     r1,[r0,#0x28]
;;;71       DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_FIXED;	//ԭַѭ
0000b8  2100              MOVS     r1,#0
0000ba  8541              STRH     r1,[r0,#0x2a]
;;;72       DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_INC_CIRC;	//Ŀַ޸
0000bc  2103              MOVS     r1,#3
0000be  0289              LSLS     r1,r1,#10
0000c0  8581              STRH     r1,[r0,#0x2c]
;;;73       DMA_InitStruct.DMA_SrcAddress = (uint32_t)&DMA_ScatterGather_ScatterSrc[0];	//úַ
0000c2  a803              ADD      r0,sp,#0xc
0000c4  900e              STR      r0,[sp,#0x38]
;;;74       DMA_InitStruct.DMA_DstAddress = (uint32_t)&DMA0->DMA_SADR;
0000c6  4823              LDR      r0,|L1.340|
0000c8  900f              STR      r0,[sp,#0x3c]
;;;75       DMA_InitStruct.DMA_Request = DMA_Request_DMA0;	//TIM1TIM0
0000ca  200f              MOVS     r0,#0xf
0000cc  0680              LSLS     r0,r0,#26
0000ce  900d              STR      r0,[sp,#0x34]
;;;76       DMA_InitStruct.DMA_Priority = DMA_Priority_HIGH;	//ȼ
0000d0  2102              MOVS     r1,#2
0000d2  4668              MOV      r0,sp
0000d4  8481              STRH     r1,[r0,#0x24]
;;;77     
;;;78       DMA_Init(DMA1, &DMA_InitStruct);
0000d6  a909              ADD      r1,sp,#0x24
0000d8  481e              LDR      r0,|L1.340|
0000da  3040              ADDS     r0,r0,#0x40
0000dc  f7fffffe          BL       DMA_Init
;;;79     
;;;80       DMA_Cmd(DMA1, ENABLE);
0000e0  2101              MOVS     r1,#1
0000e2  481c              LDR      r0,|L1.340|
0000e4  3040              ADDS     r0,r0,#0x40
0000e6  f7fffffe          BL       DMA_Cmd
;;;81       DMA_SoftwareTrigger(DMA1);	//DMA0ʹǰͨDMA1дData1ĵַ
0000ea  481a              LDR      r0,|L1.340|
0000ec  3040              ADDS     r0,r0,#0x40
0000ee  f7fffffe          BL       DMA_SoftwareTrigger
;;;82     	
;;;83       DMA_Cmd(DMA0, ENABLE);
0000f2  2101              MOVS     r1,#1
0000f4  4817              LDR      r0,|L1.340|
0000f6  f7fffffe          BL       DMA_Cmd
;;;84     
;;;85       while(1)
0000fa  e023              B        |L1.324|
                  |L1.252|
;;;86       {
;;;87         if(DMA_GetFlagStatus(DMA1, DMA_FLAG_TCIF) == SET)
0000fc  2102              MOVS     r1,#2
0000fe  4815              LDR      r0,|L1.340|
000100  3040              ADDS     r0,r0,#0x40
000102  f7fffffe          BL       DMA_GetFlagStatus
000106  2801              CMP      r0,#1
000108  d11c              BNE      |L1.324|
;;;88         {
;;;89           DMA_DMACmd(DMA0, DMA_DMAReq_CHRQ, DISABLE);	//ʱҪرDMA0CHRQ־λ
00010a  2200              MOVS     r2,#0
00010c  05c1              LSLS     r1,r0,#23
00010e  4811              LDR      r0,|L1.340|
000110  f7fffffe          BL       DMA_DMACmd
;;;90           while(DMA_GetFlagStatus(DMA0, DMA_FLAG_TCIF) == RESET);
000114  bf00              NOP      
                  |L1.278|
000116  2102              MOVS     r1,#2
000118  480e              LDR      r0,|L1.340|
00011a  f7fffffe          BL       DMA_GetFlagStatus
00011e  2800              CMP      r0,#0
000120  d0f9              BEQ      |L1.278|
;;;91           DMA_Cmd(DMA0,DISABLE);        //DMA0ʧ
000122  2100              MOVS     r1,#0
000124  480b              LDR      r0,|L1.340|
000126  f7fffffe          BL       DMA_Cmd
;;;92           DMA_Cmd(DMA1,DISABLE);        //DMA1ʧ
00012a  2100              MOVS     r1,#0
00012c  4809              LDR      r0,|L1.340|
00012e  3040              ADDS     r0,r0,#0x40
000130  f7fffffe          BL       DMA_Cmd
;;;93           DMA_ClearFlag(DMA0, DMA_FLAG_TCIF);
000134  2102              MOVS     r1,#2
000136  4807              LDR      r0,|L1.340|
000138  f7fffffe          BL       DMA_ClearFlag
;;;94           printf("ScatterGatherģʽ°ݣ%.12s\r\n", DMA_ScatterGather_GatherDst);
00013c  4669              MOV      r1,sp
00013e  a006              ADR      r0,|L1.344|
000140  f7fffffe          BL       __2printf
                  |L1.324|
000144  e7da              B        |L1.252|
;;;95         }
;;;96       }
;;;97     }
                          ENDP

000146  0000              DCW      0x0000
                  |L1.328|
                          DCD      ||.constdata||
                  |L1.332|
                          DCD      0x00007360
                  |L1.336|
                          DCD      0x40020140
                  |L1.340|
                          DCD      0x40010800
                  |L1.344|
000158  53636174          DCB      "ScatterGather",196,163,202,189,207,194,176,225,212,203,205
00015c  74657247
000160  61746865
000164  72c4a3ca
000168  bdcfc2b0
00016c  e1d4cbcd
000170  eab3c9ca          DCB      234,179,201,202,253,190,221,163,186,"%.12s",161,163,"\r\n"
000174  fdbedda3
000178  ba252e31
00017c  3273a1a3
000180  0d0a    
000182  00                DCB      0
000183  00                DCB      0

                          AREA ||.constdata||, DATA, READONLY, ALIGN=2

                          DCD      DMA_ScatterGather_Data1
                          DCD      DMA_ScatterGather_Data2
                          DCD      DMA_ScatterGather_Data3

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

                  DMA_ScatterGather_Data1
000000  41424344          DCB      0x41,0x42,0x43,0x44
000004  4546              DCB      0x45,0x46
                  DMA_ScatterGather_Data2
000006  6162              DCB      0x61,0x62
000008  63646566          DCB      0x63,0x64,0x65,0x66
                  DMA_ScatterGather_Data3
00000c  31323334          DCB      0x31,0x32,0x33,0x34
000010  3536              DCB      0x35,0x36

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
