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

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

                          REQUIRE _printf_percent
                          REQUIRE _printf_x
                          REQUIRE _printf_longlong_hex
                  CRC_CalculateArrays_Function PROC
;;;27     
;;;28     void CRC_CalculateArrays_Function(void)
000000  b51f              PUSH     {r0-r4,lr}
;;;29     {
;;;30       uint32_t tmpNum = 0;
000002  2400              MOVS     r4,#0
;;;31       uint32_t CRC_Result;
;;;32       CRC_InitTypeDef CRC_InitStruct;
;;;33     
;;;34       RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
000004  2101              MOVS     r1,#1
000006  2002              MOVS     r0,#2
000008  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;35     
;;;36       CRC_InitStruct.DefaultPolynomialUse = DEFAULT_Polynomial_Disable;
00000c  2501              MOVS     r5,#1
00000e  4668              MOV      r0,sp
000010  8005              STRH     r5,[r0,#0]
;;;37       CRC_InitStruct.GeneratingPolynomial = 0x07;
000012  2007              MOVS     r0,#7
;;;38       CRC_InitStruct.DefaultInitValueUse = DEFAULT_InitValue_Disable;
000014  9001              STR      r0,[sp,#4]
000016  4668              MOV      r0,sp
000018  8045              STRH     r5,[r0,#2]
;;;39       CRC_InitStruct.InitValue = 0x000000FF;
00001a  20ff              MOVS     r0,#0xff
;;;40       CRC_InitStruct.CRCSize = CRC_POLYSIZE_8B;
00001c  9002              STR      r0,[sp,#8]
00001e  2080              MOVS     r0,#0x80
;;;41     
;;;42       CRC_Init(&CRC_InitStruct);
000020  9003              STR      r0,[sp,#0xc]
000022  4668              MOV      r0,sp
000024  f7fffffe          BL       CRC_Init
;;;43     	
;;;44     	
;;;45         //法一
;;;46         CRC_ResetDR();//将CRCDR寄存器复位为全1
000028  f7fffffe          BL       CRC_ResetDR
;;;47         for(tmpNum = 0; tmpNum < 10; tmpNum++)
;;;48         {
;;;49         CRC_CalcCRC8bits(U8_TestArray[tmpNum]);//被校验数据依次写入CRCDR寄存器进行校验
00002c  4e1d              LDR      r6,|L1.164|
                  |L1.46|
00002e  5d30              LDRB     r0,[r6,r4]
000030  f7fffffe          BL       CRC_CalcCRC8bits
000034  1c64              ADDS     r4,r4,#1
000036  2c0a              CMP      r4,#0xa               ;47
000038  d3f9              BCC      |L1.46|
;;;50         }
;;;51         CRC_Result = CRC_GetCRC();//获取校验值
00003a  f7fffffe          BL       CRC_GetCRC
00003e  4601              MOV      r1,r0
;;;52     
;;;53     /*//法二
;;;54     	CRC_Result = CRC_Calculate(CRC_InputData_Format_BYTES,(uint32_t *)U8_TestArray,10);
;;;55     */
;;;56     	
;;;57     /*//法三
;;;58       CRC_Result = CRC_Calculate(CRC_InputData_Format_BYTES,(uint32_t *)U8_TestArray,5);//先校验数组前5个数据
;;;59     	CRC_Result = CRC_Accumulate(CRC_InputData_Format_BYTES,(uint32_t *)(U8_TestArray+5),5);//再接着校验数组后5个数据
;;;60     */
;;;61         printf(" \r\n8bit CRC value is 0x%x \r\n", CRC_Result); //当前8位数组正确校验值为0x89
000040  a019              ADR      r0,|L1.168|
000042  f7fffffe          BL       __2printf
;;;62     
;;;63         /* 16bitCRC校验初始化 */
;;;64         CRC_InitStruct.DefaultPolynomialUse = DEFAULT_Polynomial_Disable;//不使用默认多项式（默认多项式为0x04C11DB7）
000046  4669              MOV      r1,sp
000048  800d              STRH     r5,[r1,#0]
;;;65         CRC_InitStruct.GeneratingPolynomial = 0x8005; //自定义多项式
00004a  481f              LDR      r0,|L1.200|
;;;66         CRC_InitStruct.DefaultInitValueUse = DEFAULT_InitValue_Disable;//不使用默认初始值（默认初始值为0xFFFFFFFF）
00004c  9001              STR      r0,[sp,#4]
00004e  804d              STRH     r5,[r1,#2]
;;;67         CRC_InitStruct.InitValue = 0x0000FFFF; //自定义初始值
000050  481e              LDR      r0,|L1.204|
;;;68         CRC_InitStruct.CRCSize = CRC_POLYSIZE_16B; //多项式为16位
000052  9002              STR      r0,[sp,#8]
000054  2040              MOVS     r0,#0x40
;;;69         CRC_Init(&CRC_InitStruct);
000056  9003              STR      r0,[sp,#0xc]
000058  4668              MOV      r0,sp
00005a  f7fffffe          BL       CRC_Init
;;;70     
;;;71     /*//法一
;;;72       CRC_ResetDR();//将CRCDR寄存器复位为全1
;;;73       for(tmpNum = 0; tmpNum < 10; tmpNum++)
;;;74       {
;;;75         CRC_CalcCRC16bits(U16_TestArray[tmpNum]);//被校验数据依次写入CRCDR寄存器进行校验
;;;76       }
;;;77       CRC_Result = CRC_GetCRC();//获取校验值
;;;78     */
;;;79         //法二
;;;80         CRC_Result = CRC_Calculate(CRC_InputData_Format_HALFWORDS,(uint32_t *)U16_TestArray,10);
00005e  4911              LDR      r1,|L1.164|
000060  220a              MOVS     r2,#0xa
000062  310a              ADDS     r1,r1,#0xa
000064  2002              MOVS     r0,#2
000066  f7fffffe          BL       CRC_Calculate
00006a  4601              MOV      r1,r0
;;;81     
;;;82     /*//法三
;;;83       CRC_Result = CRC_Calculate(CRC_InputData_Format_HALFWORDS,(uint32_t *)U16_TestArray,5);//先校验数组前5个数据
;;;84     	CRC_Result = CRC_Accumulate(CRC_InputData_Format_HALFWORDS,(uint32_t *)(U16_TestArray+5),5);//再接着校验数组后5个数据
;;;85     */	
;;;86         printf(" \r\n16bit CRC value is 0x%x \r\n", CRC_Result); //当前16位数组正确校验值为0x90BC
00006c  a018              ADR      r0,|L1.208|
00006e  f7fffffe          BL       __2printf
;;;87     
;;;88         /* 32bitCRC校验初始化 */
;;;89         CRC_InitStruct.DefaultPolynomialUse = DEFAULT_Polynomial_Enable;//使用默认多项式（默认多项式为0x04C11DB7）
000072  2000              MOVS     r0,#0
000074  4669              MOV      r1,sp
000076  8008              STRH     r0,[r1,#0]
;;;90         CRC_InitStruct.DefaultInitValueUse = DEFAULT_InitValue_Enable;//使用默认初始值（默认初始值为0xFFFFFFFF）
000078  8048              STRH     r0,[r1,#2]
;;;91         CRC_InitStruct.CRCSize = CRC_POLYSIZE_32B; //多项式为32位
;;;92         CRC_Init(&CRC_InitStruct);
00007a  9003              STR      r0,[sp,#0xc]
00007c  4668              MOV      r0,sp
00007e  f7fffffe          BL       CRC_Init
;;;93     
;;;94     /*//法一
;;;95       CRC_ResetDR();//将CRCDR寄存器复位为全1
;;;96       for(tmpNum = 0; tmpNum < 10; tmpNum++)
;;;97       {
;;;98         CRC_CalcCRC(U32_TestArray[tmpNum]);//被校验数据依次写入CRCDR寄存器进行校验
;;;99       }
;;;100      CRC_Result = CRC_GetCRC();//获取校验值
;;;101    */
;;;102    
;;;103    /*//法二
;;;104      CRC_Result = CRC_Calculate(CRC_InputData_Format_WORDS,U32_TestArray,10);
;;;105    */
;;;106        //法三
;;;107        CRC_Result = CRC_Calculate(CRC_InputData_Format_WORDS,U32_TestArray,5);//先校验数组前5个数据
000082  4908              LDR      r1,|L1.164|
000084  2205              MOVS     r2,#5
000086  3120              ADDS     r1,r1,#0x20
000088  2003              MOVS     r0,#3
00008a  f7fffffe          BL       CRC_Calculate
;;;108        CRC_Result = CRC_Accumulate(CRC_InputData_Format_WORDS,U32_TestArray+5,5);//再接着校验数组后5个数据
00008e  4905              LDR      r1,|L1.164|
000090  2205              MOVS     r2,#5
000092  3134              ADDS     r1,r1,#0x34
000094  2003              MOVS     r0,#3
000096  f7fffffe          BL       CRC_Accumulate
00009a  4601              MOV      r1,r0
;;;109    
;;;110        printf(" \r\n32bit CRC value is 0x%x \r\n", CRC_Result); //当前32位数组正确校验值为0x460051A4
00009c  a014              ADR      r0,|L1.240|
00009e  f7fffffe          BL       __2printf
                  |L1.162|
;;;111    	
;;;112    	while(1);
0000a2  e7fe              B        |L1.162|
;;;113    }
;;;114    
                          ENDP

                  |L1.164|
                          DCD      ||.data||
                  |L1.168|
0000a8  200d0a38          DCB      " \r\n8bit CRC value is 0x%x \r\n",0
0000ac  62697420
0000b0  43524320
0000b4  76616c75
0000b8  65206973
0000bc  20307825
0000c0  78200d0a
0000c4  00      
0000c5  00                DCB      0
0000c6  00                DCB      0
0000c7  00                DCB      0
                  |L1.200|
                          DCD      0x00008005
                  |L1.204|
                          DCD      0x0000ffff
                  |L1.208|
0000d0  200d0a31          DCB      " \r\n16bit CRC value is 0x%x \r\n",0
0000d4  36626974
0000d8  20435243
0000dc  2076616c
0000e0  75652069
0000e4  73203078
0000e8  2578200d
0000ec  0a00    
0000ee  00                DCB      0
0000ef  00                DCB      0
                  |L1.240|
0000f0  200d0a33          DCB      " \r\n32bit CRC value is 0x%x \r\n",0
0000f4  32626974
0000f8  20435243
0000fc  2076616c
000100  75652069
000104  73203078
000108  2578200d
00010c  0a00    
00010e  00                DCB      0
00010f  00                DCB      0

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

                  U8_TestArray
000000  01020304          DCB      0x01,0x02,0x03,0x04
000004  05060708          DCB      0x05,0x06,0x07,0x08
000008  090a              DCB      0x09,0x0a
                  U16_TestArray
00000a  0001              DCW      0x0001
00000c  00020003          DCW      0x0002,0x0003
000010  00040005          DCW      0x0004,0x0005
000014  00060007          DCW      0x0006,0x0007
000018  00080009          DCW      0x0008,0x0009
00001c  000a              DCW      0x000a
00001e  0000              DCB      0x00,0x00
                  U32_TestArray
                          DCD      0x00000001
                          DCD      0x00000002
                          DCD      0x00000003
                          DCD      0x00000004
                          DCD      0x00000005
                          DCD      0x00000006
                          DCD      0x00000007
                          DCD      0x00000008
                          DCD      0x00000009
                          DCD      0x0000000a

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
