ARM GAS  /tmp/cchrlAc9.s 			page 1


   1              		.cpu cortex-m4
   2              		.arch armv7e-m
   3              		.fpu fpv4-sp-d16
   4              		.eabi_attribute 27, 1
   5              		.eabi_attribute 28, 1
   6              		.eabi_attribute 20, 1
   7              		.eabi_attribute 21, 1
   8              		.eabi_attribute 23, 3
   9              		.eabi_attribute 24, 1
  10              		.eabi_attribute 25, 1
  11              		.eabi_attribute 26, 1
  12              		.eabi_attribute 30, 1
  13              		.eabi_attribute 34, 1
  14              		.eabi_attribute 18, 4
  15              		.file	"ADBMS_LL_Driver.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.file 1 "Core/Src/ADBMS_LL_Driver.c"
  20              		.section	.text.updatePEC,"ax",%progbits
  21              		.align	1
  22              		.global	updatePEC
  23              		.syntax unified
  24              		.thumb
  25              		.thumb_func
  27              	updatePEC:
  28              	.LVL0:
  29              	.LFB133:
   1:Core/Src/ADBMS_LL_Driver.c **** /*
   2:Core/Src/ADBMS_LL_Driver.c ****  * ADBMS_LL_Driver.c
   3:Core/Src/ADBMS_LL_Driver.c ****  *
   4:Core/Src/ADBMS_LL_Driver.c ****  *  Created on: 05.06.2022
   5:Core/Src/ADBMS_LL_Driver.c ****  *      Author: max
   6:Core/Src/ADBMS_LL_Driver.c ****  */
   7:Core/Src/ADBMS_LL_Driver.c **** #include "ADBMS_LL_Driver.h"
   8:Core/Src/ADBMS_LL_Driver.c **** 
   9:Core/Src/ADBMS_LL_Driver.c **** 
  10:Core/Src/ADBMS_LL_Driver.c **** #define INITAL_PEC 0x0010
  11:Core/Src/ADBMS_LL_Driver.c **** #define ADBMS_SPI_TIMEOUT 1000 //Timeout in ms
  12:Core/Src/ADBMS_LL_Driver.c **** 
  13:Core/Src/ADBMS_LL_Driver.c **** SPI_HandleTypeDef* adbmsspi;
  14:Core/Src/ADBMS_LL_Driver.c **** 
  15:Core/Src/ADBMS_LL_Driver.c **** uint8 adbmsDriverInit(SPI_HandleTypeDef* hspi)
  16:Core/Src/ADBMS_LL_Driver.c **** {
  17:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSLow();
  18:Core/Src/ADBMS_LL_Driver.c **** 	HAL_Delay(1);
  19:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
  20:Core/Src/ADBMS_LL_Driver.c **** 	adbmsspi = hspi;
  21:Core/Src/ADBMS_LL_Driver.c **** 	return 0;
  22:Core/Src/ADBMS_LL_Driver.c **** }
  23:Core/Src/ADBMS_LL_Driver.c **** 
  24:Core/Src/ADBMS_LL_Driver.c **** uint8 calculatePEC(uint8_t* data, uint8_t datalen)
  25:Core/Src/ADBMS_LL_Driver.c **** {
  26:Core/Src/ADBMS_LL_Driver.c ****     uint16 currentpec = INITAL_PEC;
  27:Core/Src/ADBMS_LL_Driver.c ****     if(datalen >= 3)
  28:Core/Src/ADBMS_LL_Driver.c ****     {
  29:Core/Src/ADBMS_LL_Driver.c ****         for(int i = 0; i < (datalen-2); i++)
ARM GAS  /tmp/cchrlAc9.s 			page 2


  30:Core/Src/ADBMS_LL_Driver.c ****         {
  31:Core/Src/ADBMS_LL_Driver.c ****             for(int n = 0; n < 8;n++)
  32:Core/Src/ADBMS_LL_Driver.c ****             {
  33:Core/Src/ADBMS_LL_Driver.c ****                 uint8 din = data[i] << (n);
  34:Core/Src/ADBMS_LL_Driver.c ****                 currentpec = updatePEC(currentpec, din);
  35:Core/Src/ADBMS_LL_Driver.c ****             }
  36:Core/Src/ADBMS_LL_Driver.c ****         }
  37:Core/Src/ADBMS_LL_Driver.c **** 
  38:Core/Src/ADBMS_LL_Driver.c ****         data[datalen-2] = (currentpec>>7) & 0xFF;
  39:Core/Src/ADBMS_LL_Driver.c ****         data[datalen-1] = (currentpec<<1) & 0xFF;
  40:Core/Src/ADBMS_LL_Driver.c ****         return 0;
  41:Core/Src/ADBMS_LL_Driver.c ****     }
  42:Core/Src/ADBMS_LL_Driver.c **** 
  43:Core/Src/ADBMS_LL_Driver.c ****     else
  44:Core/Src/ADBMS_LL_Driver.c ****     {
  45:Core/Src/ADBMS_LL_Driver.c ****         return 1;
  46:Core/Src/ADBMS_LL_Driver.c ****     }
  47:Core/Src/ADBMS_LL_Driver.c **** }
  48:Core/Src/ADBMS_LL_Driver.c **** 
  49:Core/Src/ADBMS_LL_Driver.c **** uint8 checkPEC(uint8* data, uint8 datalen)
  50:Core/Src/ADBMS_LL_Driver.c **** {
  51:Core/Src/ADBMS_LL_Driver.c **** 	if(datalen <= 3)
  52:Core/Src/ADBMS_LL_Driver.c **** 	{
  53:Core/Src/ADBMS_LL_Driver.c **** 		return 255;
  54:Core/Src/ADBMS_LL_Driver.c **** 	}
  55:Core/Src/ADBMS_LL_Driver.c **** 
  56:Core/Src/ADBMS_LL_Driver.c **** 	uint16 currentpec = INITAL_PEC;
  57:Core/Src/ADBMS_LL_Driver.c **** 
  58:Core/Src/ADBMS_LL_Driver.c **** 	for(int i = 0; i < (datalen-2); i++)
  59:Core/Src/ADBMS_LL_Driver.c **** 	{
  60:Core/Src/ADBMS_LL_Driver.c **** 	    for(int n = 0; n < 8;n++)
  61:Core/Src/ADBMS_LL_Driver.c **** 	    {
  62:Core/Src/ADBMS_LL_Driver.c **** 	        uint8 din = data[i] << (n);
  63:Core/Src/ADBMS_LL_Driver.c **** 	        currentpec = updatePEC(currentpec, din);
  64:Core/Src/ADBMS_LL_Driver.c **** 	    }
  65:Core/Src/ADBMS_LL_Driver.c **** 	}
  66:Core/Src/ADBMS_LL_Driver.c **** 
  67:Core/Src/ADBMS_LL_Driver.c **** 	uint8 pechigh = (currentpec>>7) & 0xFF;
  68:Core/Src/ADBMS_LL_Driver.c **** 	uint8 peclow = (currentpec<<1) & 0xFF;
  69:Core/Src/ADBMS_LL_Driver.c **** 
  70:Core/Src/ADBMS_LL_Driver.c **** 	if((pechigh == data[datalen-2]) && (peclow == data[datalen-1]))
  71:Core/Src/ADBMS_LL_Driver.c **** 	{
  72:Core/Src/ADBMS_LL_Driver.c **** 		return 0;
  73:Core/Src/ADBMS_LL_Driver.c **** 	}
  74:Core/Src/ADBMS_LL_Driver.c **** 
  75:Core/Src/ADBMS_LL_Driver.c **** 	return 1;
  76:Core/Src/ADBMS_LL_Driver.c **** 
  77:Core/Src/ADBMS_LL_Driver.c **** }
  78:Core/Src/ADBMS_LL_Driver.c **** 
  79:Core/Src/ADBMS_LL_Driver.c **** uint16 updatePEC(uint16 currentPEC, uint8 din)
  80:Core/Src/ADBMS_LL_Driver.c **** {
  30              		.loc 1 80 1 view -0
  31              		.cfi_startproc
  32              		@ args = 0, pretend = 0, frame = 0
  33              		@ frame_needed = 0, uses_anonymous_args = 0
  34              		.loc 1 80 1 is_stmt 0 view .LVU1
  35 0000 70B5     		push	{r4, r5, r6, lr}
ARM GAS  /tmp/cchrlAc9.s 			page 3


  36              		.cfi_def_cfa_offset 16
  37              		.cfi_offset 4, -16
  38              		.cfi_offset 5, -12
  39              		.cfi_offset 6, -8
  40              		.cfi_offset 14, -4
  81:Core/Src/ADBMS_LL_Driver.c ****     din = (din>>7) & 0x01;
  41              		.loc 1 81 5 is_stmt 1 view .LVU2
  42              	.LVL1:
  82:Core/Src/ADBMS_LL_Driver.c ****     uint8 in0 = din ^ ((currentPEC >> 14) &0x01);
  43              		.loc 1 82 5 view .LVU3
  44              		.loc 1 82 43 is_stmt 0 view .LVU4
  45 0002 C0F38032 		ubfx	r2, r0, #14, #1
  46              		.loc 1 82 21 view .LVU5
  47 0006 82EAD113 		eor	r3, r2, r1, lsr #7
  48              		.loc 1 82 11 view .LVU6
  49 000a 1946     		mov	r1, r3
  50              	.LVL2:
  83:Core/Src/ADBMS_LL_Driver.c ****     uint8 in3 = in0 ^ ((currentPEC >> 2) &0x01);
  51              		.loc 1 83 5 is_stmt 1 view .LVU7
  52              		.loc 1 83 42 is_stmt 0 view .LVU8
  53 000c C0F38002 		ubfx	r2, r0, #2, #1
  54              		.loc 1 83 11 view .LVU9
  55 0010 5A40     		eors	r2, r2, r3
  56              	.LVL3:
  84:Core/Src/ADBMS_LL_Driver.c ****     uint8 in4 = in0 ^ ((currentPEC >> 3) &0x01);
  57              		.loc 1 84 5 is_stmt 1 view .LVU10
  58              		.loc 1 84 42 is_stmt 0 view .LVU11
  59 0012 C0F3C00C 		ubfx	ip, r0, #3, #1
  60              		.loc 1 84 11 view .LVU12
  61 0016 83EA0C0C 		eor	ip, r3, ip
  62              	.LVL4:
  85:Core/Src/ADBMS_LL_Driver.c ****     uint8 in7 = in0 ^ ((currentPEC >> 6) &0x01);
  63              		.loc 1 85 5 is_stmt 1 view .LVU13
  64              		.loc 1 85 42 is_stmt 0 view .LVU14
  65 001a C0F3801E 		ubfx	lr, r0, #6, #1
  66              		.loc 1 85 11 view .LVU15
  67 001e 83EA0E0E 		eor	lr, r3, lr
  68              	.LVL5:
  86:Core/Src/ADBMS_LL_Driver.c ****     uint8 in8 = in0 ^ ((currentPEC >> 7) &0x01);
  69              		.loc 1 86 5 is_stmt 1 view .LVU16
  70              		.loc 1 86 42 is_stmt 0 view .LVU17
  71 0022 C0F3C014 		ubfx	r4, r0, #7, #1
  72              		.loc 1 86 11 view .LVU18
  73 0026 5C40     		eors	r4, r4, r3
  74              	.LVL6:
  87:Core/Src/ADBMS_LL_Driver.c ****     uint8 in10 = in0 ^ ((currentPEC >> 9) &0x01);
  75              		.loc 1 87 5 is_stmt 1 view .LVU19
  76              		.loc 1 87 43 is_stmt 0 view .LVU20
  77 0028 C0F34025 		ubfx	r5, r0, #9, #1
  78              		.loc 1 87 11 view .LVU21
  79 002c 5D40     		eors	r5, r5, r3
  80              	.LVL7:
  88:Core/Src/ADBMS_LL_Driver.c ****     uint8 in14 = in0 ^ ((currentPEC >> 13) &0x01);
  81              		.loc 1 88 5 is_stmt 1 view .LVU22
  82              		.loc 1 88 44 is_stmt 0 view .LVU23
  83 002e C0F34036 		ubfx	r6, r0, #13, #1
  84              		.loc 1 88 11 view .LVU24
ARM GAS  /tmp/cchrlAc9.s 			page 4


  85 0032 5E40     		eors	r6, r6, r3
  86              	.LVL8:
  89:Core/Src/ADBMS_LL_Driver.c **** 
  90:Core/Src/ADBMS_LL_Driver.c ****     uint16 newPEC = 0;
  87              		.loc 1 90 5 is_stmt 1 view .LVU25
  91:Core/Src/ADBMS_LL_Driver.c **** 
  92:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in14<<14;
  88              		.loc 1 92 5 view .LVU26
  93:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<12))<<1;
  89              		.loc 1 93 5 view .LVU27
  90              		.loc 1 93 40 is_stmt 0 view .LVU28
  91 0034 4000     		lsls	r0, r0, #1
  92              	.LVL9:
  93              		.loc 1 93 40 view .LVU29
  94 0036 00F40053 		and	r3, r0, #8192
  95              	.LVL10:
  96              		.loc 1 93 12 view .LVU30
  97 003a 43EA8633 		orr	r3, r3, r6, lsl #14
  98              	.LVL11:
  94:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<11))<<1;
  99              		.loc 1 94 5 is_stmt 1 view .LVU31
 100              		.loc 1 94 40 is_stmt 0 view .LVU32
 101 003e 00F48056 		and	r6, r0, #4096
 102              	.LVL12:
 103              		.loc 1 94 12 view .LVU33
 104 0042 3343     		orrs	r3, r3, r6
 105              	.LVL13:
 106              		.loc 1 94 12 view .LVU34
 107 0044 1BB2     		sxth	r3, r3
 108              	.LVL14:
  95:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<10))<<1;
 109              		.loc 1 95 5 is_stmt 1 view .LVU35
 110              		.loc 1 95 40 is_stmt 0 view .LVU36
 111 0046 00F40066 		and	r6, r0, #2048
 112              		.loc 1 95 12 view .LVU37
 113 004a 3343     		orrs	r3, r3, r6
 114              	.LVL15:
  96:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in10<<10;
 115              		.loc 1 96 5 is_stmt 1 view .LVU38
 116              		.loc 1 96 12 is_stmt 0 view .LVU39
 117 004c 43EA8523 		orr	r3, r3, r5, lsl #10
 118              	.LVL16:
  97:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<8))<<1;
 119              		.loc 1 97 5 is_stmt 1 view .LVU40
 120              		.loc 1 97 39 is_stmt 0 view .LVU41
 121 0050 00F40075 		and	r5, r0, #512
 122              	.LVL17:
 123              		.loc 1 97 12 view .LVU42
 124 0054 2B43     		orrs	r3, r3, r5
 125              	.LVL18:
 126              		.loc 1 97 12 view .LVU43
 127 0056 1BB2     		sxth	r3, r3
 128              	.LVL19:
  98:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in8<<8;
 129              		.loc 1 98 5 is_stmt 1 view .LVU44
 130              		.loc 1 98 12 is_stmt 0 view .LVU45
 131 0058 43EA0423 		orr	r3, r3, r4, lsl #8
ARM GAS  /tmp/cchrlAc9.s 			page 5


 132              	.LVL20:
  99:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in7<<7;
 133              		.loc 1 99 5 is_stmt 1 view .LVU46
 134              		.loc 1 99 12 is_stmt 0 view .LVU47
 135 005c 43EACE13 		orr	r3, r3, lr, lsl #7
 136              	.LVL21:
 100:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<5))<<1;
 137              		.loc 1 100 5 is_stmt 1 view .LVU48
 138              		.loc 1 100 39 is_stmt 0 view .LVU49
 139 0060 00F04004 		and	r4, r0, #64
 140              	.LVL22:
 141              		.loc 1 100 12 view .LVU50
 142 0064 2343     		orrs	r3, r3, r4
 143              	.LVL23:
 144              		.loc 1 100 12 view .LVU51
 145 0066 1BB2     		sxth	r3, r3
 146              	.LVL24:
 101:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<4))<<1;
 147              		.loc 1 101 5 is_stmt 1 view .LVU52
 148              		.loc 1 101 39 is_stmt 0 view .LVU53
 149 0068 00F02004 		and	r4, r0, #32
 150              		.loc 1 101 12 view .LVU54
 151 006c 2343     		orrs	r3, r3, r4
 152              	.LVL25:
 102:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in4<<4;
 153              		.loc 1 102 5 is_stmt 1 view .LVU55
 154              		.loc 1 102 12 is_stmt 0 view .LVU56
 155 006e 43EA0C13 		orr	r3, r3, ip, lsl #4
 156              	.LVL26:
 103:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in3<<3;
 157              		.loc 1 103 5 is_stmt 1 view .LVU57
 158              		.loc 1 103 12 is_stmt 0 view .LVU58
 159 0072 43EAC203 		orr	r3, r3, r2, lsl #3
 160              	.LVL27:
 104:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01<<1))<<1;
 161              		.loc 1 104 5 is_stmt 1 view .LVU59
 162              		.loc 1 104 39 is_stmt 0 view .LVU60
 163 0076 00F00402 		and	r2, r0, #4
 164              	.LVL28:
 165              		.loc 1 104 12 view .LVU61
 166 007a 1343     		orrs	r3, r3, r2
 167              	.LVL29:
 168              		.loc 1 104 12 view .LVU62
 169 007c 1BB2     		sxth	r3, r3
 170              	.LVL30:
 105:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= (currentPEC & (0x01))<<1;
 171              		.loc 1 105 5 is_stmt 1 view .LVU63
 172              		.loc 1 105 36 is_stmt 0 view .LVU64
 173 007e 00F00200 		and	r0, r0, #2
 174              		.loc 1 105 12 view .LVU65
 175 0082 0343     		orrs	r3, r3, r0
 176              	.LVL31:
 177              		.loc 1 105 12 view .LVU66
 178 0084 9BB2     		uxth	r3, r3
 179              	.LVL32:
 106:Core/Src/ADBMS_LL_Driver.c ****     newPEC |= in0;
 180              		.loc 1 106 5 is_stmt 1 view .LVU67
ARM GAS  /tmp/cchrlAc9.s 			page 6


 107:Core/Src/ADBMS_LL_Driver.c **** 
 108:Core/Src/ADBMS_LL_Driver.c **** 
 109:Core/Src/ADBMS_LL_Driver.c ****     return newPEC;
 181              		.loc 1 109 5 view .LVU68
 110:Core/Src/ADBMS_LL_Driver.c **** }
 182              		.loc 1 110 1 is_stmt 0 view .LVU69
 183 0086 41EA0300 		orr	r0, r1, r3
 184              	.LVL33:
 185              		.loc 1 110 1 view .LVU70
 186 008a 70BD     		pop	{r4, r5, r6, pc}
 187              		.cfi_endproc
 188              	.LFE133:
 190              		.section	.text.calculatePEC,"ax",%progbits
 191              		.align	1
 192              		.global	calculatePEC
 193              		.syntax unified
 194              		.thumb
 195              		.thumb_func
 197              	calculatePEC:
 198              	.LVL34:
 199              	.LFB131:
  25:Core/Src/ADBMS_LL_Driver.c ****     uint16 currentpec = INITAL_PEC;
 200              		.loc 1 25 1 is_stmt 1 view -0
 201              		.cfi_startproc
 202              		@ args = 0, pretend = 0, frame = 0
 203              		@ frame_needed = 0, uses_anonymous_args = 0
  26:Core/Src/ADBMS_LL_Driver.c ****     if(datalen >= 3)
 204              		.loc 1 26 5 view .LVU72
  27:Core/Src/ADBMS_LL_Driver.c ****     {
 205              		.loc 1 27 5 view .LVU73
  27:Core/Src/ADBMS_LL_Driver.c ****     {
 206              		.loc 1 27 7 is_stmt 0 view .LVU74
 207 0000 0229     		cmp	r1, #2
 208 0002 0FD8     		bhi	.L8
  45:Core/Src/ADBMS_LL_Driver.c ****     }
 209              		.loc 1 45 16 view .LVU75
 210 0004 0120     		movs	r0, #1
 211              	.LVL35:
  47:Core/Src/ADBMS_LL_Driver.c **** 
 212              		.loc 1 47 1 view .LVU76
 213 0006 7047     		bx	lr
 214              	.LVL36:
 215              	.L6:
 216              		.cfi_def_cfa_offset 24
 217              		.cfi_offset 3, -24
 218              		.cfi_offset 4, -20
 219              		.cfi_offset 5, -16
 220              		.cfi_offset 6, -12
 221              		.cfi_offset 7, -8
 222              		.cfi_offset 14, -4
 223              	.LBB2:
 224              	.LBB3:
 225              	.LBB4:
  33:Core/Src/ADBMS_LL_Driver.c ****                 currentpec = updatePEC(currentpec, din);
 226              		.loc 1 33 17 is_stmt 1 discriminator 3 view .LVU77
  33:Core/Src/ADBMS_LL_Driver.c ****                 currentpec = updatePEC(currentpec, din);
 227              		.loc 1 33 33 is_stmt 0 discriminator 3 view .LVU78
ARM GAS  /tmp/cchrlAc9.s 			page 7


 228 0008 E95D     		ldrb	r1, [r5, r7]	@ zero_extendqisi2
  33:Core/Src/ADBMS_LL_Driver.c ****                 currentpec = updatePEC(currentpec, din);
 229              		.loc 1 33 37 discriminator 3 view .LVU79
 230 000a A140     		lsls	r1, r1, r4
 231              	.LVL37:
  34:Core/Src/ADBMS_LL_Driver.c ****             }
 232              		.loc 1 34 17 is_stmt 1 discriminator 3 view .LVU80
  34:Core/Src/ADBMS_LL_Driver.c ****             }
 233              		.loc 1 34 30 is_stmt 0 discriminator 3 view .LVU81
 234 000c C9B2     		uxtb	r1, r1
  34:Core/Src/ADBMS_LL_Driver.c ****             }
 235              		.loc 1 34 30 discriminator 3 view .LVU82
 236 000e FFF7FEFF 		bl	updatePEC
 237              	.LVL38:
  34:Core/Src/ADBMS_LL_Driver.c ****             }
 238              		.loc 1 34 30 discriminator 3 view .LVU83
 239              	.LBE4:
  31:Core/Src/ADBMS_LL_Driver.c ****             {
 240              		.loc 1 31 35 is_stmt 1 discriminator 3 view .LVU84
 241 0012 0134     		adds	r4, r4, #1
 242              	.LVL39:
 243              	.L7:
  31:Core/Src/ADBMS_LL_Driver.c ****             {
 244              		.loc 1 31 30 discriminator 1 view .LVU85
 245 0014 072C     		cmp	r4, #7
 246 0016 F7DD     		ble	.L6
  31:Core/Src/ADBMS_LL_Driver.c ****             {
 247              		.loc 1 31 30 is_stmt 0 discriminator 1 view .LVU86
 248              	.LBE3:
  29:Core/Src/ADBMS_LL_Driver.c ****         {
 249              		.loc 1 29 42 is_stmt 1 discriminator 2 view .LVU87
 250 0018 0137     		adds	r7, r7, #1
 251              	.LVL40:
 252              	.L4:
  29:Core/Src/ADBMS_LL_Driver.c ****         {
 253              		.loc 1 29 26 discriminator 1 view .LVU88
  29:Core/Src/ADBMS_LL_Driver.c ****         {
 254              		.loc 1 29 36 is_stmt 0 discriminator 1 view .LVU89
 255 001a B31E     		subs	r3, r6, #2
  29:Core/Src/ADBMS_LL_Driver.c ****         {
 256              		.loc 1 29 26 discriminator 1 view .LVU90
 257 001c BB42     		cmp	r3, r7
 258 001e 07DD     		ble	.L13
 259              	.LBB5:
  31:Core/Src/ADBMS_LL_Driver.c ****             {
 260              		.loc 1 31 21 view .LVU91
 261 0020 0024     		movs	r4, #0
 262 0022 F7E7     		b	.L7
 263              	.LVL41:
 264              	.L8:
 265              		.cfi_def_cfa_offset 0
 266              		.cfi_restore 3
 267              		.cfi_restore 4
 268              		.cfi_restore 5
 269              		.cfi_restore 6
 270              		.cfi_restore 7
 271              		.cfi_restore 14
ARM GAS  /tmp/cchrlAc9.s 			page 8


  31:Core/Src/ADBMS_LL_Driver.c ****             {
 272              		.loc 1 31 21 view .LVU92
 273              	.LBE5:
 274              	.LBE2:
  25:Core/Src/ADBMS_LL_Driver.c ****     uint16 currentpec = INITAL_PEC;
 275              		.loc 1 25 1 view .LVU93
 276 0024 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 277              		.cfi_def_cfa_offset 24
 278              		.cfi_offset 3, -24
 279              		.cfi_offset 4, -20
 280              		.cfi_offset 5, -16
 281              		.cfi_offset 6, -12
 282              		.cfi_offset 7, -8
 283              		.cfi_offset 14, -4
 284 0026 0546     		mov	r5, r0
 285 0028 0E46     		mov	r6, r1
 286              	.LBB6:
  29:Core/Src/ADBMS_LL_Driver.c ****         {
 287              		.loc 1 29 17 view .LVU94
 288 002a 0027     		movs	r7, #0
 289              	.LBE6:
  26:Core/Src/ADBMS_LL_Driver.c ****     if(datalen >= 3)
 290              		.loc 1 26 12 view .LVU95
 291 002c 1020     		movs	r0, #16
 292              	.LVL42:
  26:Core/Src/ADBMS_LL_Driver.c ****     if(datalen >= 3)
 293              		.loc 1 26 12 view .LVU96
 294 002e F4E7     		b	.L4
 295              	.LVL43:
 296              	.L13:
  38:Core/Src/ADBMS_LL_Driver.c ****         data[datalen-1] = (currentpec<<1) & 0xFF;
 297              		.loc 1 38 9 is_stmt 1 view .LVU97
  38:Core/Src/ADBMS_LL_Driver.c ****         data[datalen-1] = (currentpec<<1) & 0xFF;
 298              		.loc 1 38 25 is_stmt 0 view .LVU98
 299 0030 C209     		lsrs	r2, r0, #7
 300 0032 EA54     		strb	r2, [r5, r3]
  39:Core/Src/ADBMS_LL_Driver.c ****         return 0;
 301              		.loc 1 39 9 is_stmt 1 view .LVU99
  39:Core/Src/ADBMS_LL_Driver.c ****         return 0;
 302              		.loc 1 39 38 is_stmt 0 view .LVU100
 303 0034 4300     		lsls	r3, r0, #1
  39:Core/Src/ADBMS_LL_Driver.c ****         return 0;
 304              		.loc 1 39 13 view .LVU101
 305 0036 013E     		subs	r6, r6, #1
  39:Core/Src/ADBMS_LL_Driver.c ****         return 0;
 306              		.loc 1 39 25 view .LVU102
 307 0038 AB55     		strb	r3, [r5, r6]
  40:Core/Src/ADBMS_LL_Driver.c ****     }
 308              		.loc 1 40 9 is_stmt 1 view .LVU103
  40:Core/Src/ADBMS_LL_Driver.c ****     }
 309              		.loc 1 40 16 is_stmt 0 view .LVU104
 310 003a 0020     		movs	r0, #0
 311              	.LVL44:
  47:Core/Src/ADBMS_LL_Driver.c **** 
 312              		.loc 1 47 1 view .LVU105
 313 003c F8BD     		pop	{r3, r4, r5, r6, r7, pc}
  47:Core/Src/ADBMS_LL_Driver.c **** 
ARM GAS  /tmp/cchrlAc9.s 			page 9


 314              		.loc 1 47 1 view .LVU106
 315              		.cfi_endproc
 316              	.LFE131:
 318              		.section	.text.checkPEC,"ax",%progbits
 319              		.align	1
 320              		.global	checkPEC
 321              		.syntax unified
 322              		.thumb
 323              		.thumb_func
 325              	checkPEC:
 326              	.LVL45:
 327              	.LFB132:
  50:Core/Src/ADBMS_LL_Driver.c **** 	if(datalen <= 3)
 328              		.loc 1 50 1 is_stmt 1 view -0
 329              		.cfi_startproc
 330              		@ args = 0, pretend = 0, frame = 0
 331              		@ frame_needed = 0, uses_anonymous_args = 0
  51:Core/Src/ADBMS_LL_Driver.c **** 	{
 332              		.loc 1 51 2 view .LVU108
  51:Core/Src/ADBMS_LL_Driver.c **** 	{
 333              		.loc 1 51 4 is_stmt 0 view .LVU109
 334 0000 0329     		cmp	r1, #3
 335 0002 25D9     		bls	.L19
  50:Core/Src/ADBMS_LL_Driver.c **** 	if(datalen <= 3)
 336              		.loc 1 50 1 view .LVU110
 337 0004 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 338              		.cfi_def_cfa_offset 24
 339              		.cfi_offset 3, -24
 340              		.cfi_offset 4, -20
 341              		.cfi_offset 5, -16
 342              		.cfi_offset 6, -12
 343              		.cfi_offset 7, -8
 344              		.cfi_offset 14, -4
 345 0006 0546     		mov	r5, r0
 346 0008 0E46     		mov	r6, r1
 347              	.LBB7:
  58:Core/Src/ADBMS_LL_Driver.c **** 	{
 348              		.loc 1 58 10 view .LVU111
 349 000a 0027     		movs	r7, #0
 350              	.LBE7:
  56:Core/Src/ADBMS_LL_Driver.c **** 
 351              		.loc 1 56 9 view .LVU112
 352 000c 1020     		movs	r0, #16
 353              	.LVL46:
  56:Core/Src/ADBMS_LL_Driver.c **** 
 354              		.loc 1 56 9 view .LVU113
 355 000e 08E0     		b	.L16
 356              	.LVL47:
 357              	.L17:
 358              	.LBB11:
 359              	.LBB8:
 360              	.LBB9:
  62:Core/Src/ADBMS_LL_Driver.c **** 	        currentpec = updatePEC(currentpec, din);
 361              		.loc 1 62 10 is_stmt 1 discriminator 3 view .LVU114
  62:Core/Src/ADBMS_LL_Driver.c **** 	        currentpec = updatePEC(currentpec, din);
 362              		.loc 1 62 26 is_stmt 0 discriminator 3 view .LVU115
 363 0010 E95D     		ldrb	r1, [r5, r7]	@ zero_extendqisi2
ARM GAS  /tmp/cchrlAc9.s 			page 10


  62:Core/Src/ADBMS_LL_Driver.c **** 	        currentpec = updatePEC(currentpec, din);
 364              		.loc 1 62 30 discriminator 3 view .LVU116
 365 0012 A140     		lsls	r1, r1, r4
 366              	.LVL48:
  63:Core/Src/ADBMS_LL_Driver.c **** 	    }
 367              		.loc 1 63 10 is_stmt 1 discriminator 3 view .LVU117
  63:Core/Src/ADBMS_LL_Driver.c **** 	    }
 368              		.loc 1 63 23 is_stmt 0 discriminator 3 view .LVU118
 369 0014 C9B2     		uxtb	r1, r1
  63:Core/Src/ADBMS_LL_Driver.c **** 	    }
 370              		.loc 1 63 23 discriminator 3 view .LVU119
 371 0016 FFF7FEFF 		bl	updatePEC
 372              	.LVL49:
  63:Core/Src/ADBMS_LL_Driver.c **** 	    }
 373              		.loc 1 63 23 discriminator 3 view .LVU120
 374              	.LBE9:
  60:Core/Src/ADBMS_LL_Driver.c **** 	    {
 375              		.loc 1 60 28 is_stmt 1 discriminator 3 view .LVU121
 376 001a 0134     		adds	r4, r4, #1
 377              	.LVL50:
 378              	.L18:
  60:Core/Src/ADBMS_LL_Driver.c **** 	    {
 379              		.loc 1 60 23 discriminator 1 view .LVU122
 380 001c 072C     		cmp	r4, #7
 381 001e F7DD     		ble	.L17
  60:Core/Src/ADBMS_LL_Driver.c **** 	    {
 382              		.loc 1 60 23 is_stmt 0 discriminator 1 view .LVU123
 383              	.LBE8:
  58:Core/Src/ADBMS_LL_Driver.c **** 	{
 384              		.loc 1 58 35 is_stmt 1 discriminator 2 view .LVU124
 385 0020 0137     		adds	r7, r7, #1
 386              	.LVL51:
 387              	.L16:
  58:Core/Src/ADBMS_LL_Driver.c **** 	{
 388              		.loc 1 58 19 discriminator 1 view .LVU125
  58:Core/Src/ADBMS_LL_Driver.c **** 	{
 389              		.loc 1 58 29 is_stmt 0 discriminator 1 view .LVU126
 390 0022 B31E     		subs	r3, r6, #2
  58:Core/Src/ADBMS_LL_Driver.c **** 	{
 391              		.loc 1 58 19 discriminator 1 view .LVU127
 392 0024 BB42     		cmp	r3, r7
 393 0026 01DD     		ble	.L27
 394              	.LBB10:
  60:Core/Src/ADBMS_LL_Driver.c **** 	    {
 395              		.loc 1 60 14 view .LVU128
 396 0028 0024     		movs	r4, #0
 397 002a F7E7     		b	.L18
 398              	.L27:
 399              	.LBE10:
 400              	.LBE11:
  67:Core/Src/ADBMS_LL_Driver.c **** 	uint8 peclow = (currentpec<<1) & 0xFF;
 401              		.loc 1 67 2 is_stmt 1 view .LVU129
  67:Core/Src/ADBMS_LL_Driver.c **** 	uint8 peclow = (currentpec<<1) & 0xFF;
 402              		.loc 1 67 8 is_stmt 0 view .LVU130
 403 002c C0F3C712 		ubfx	r2, r0, #7, #8
 404              	.LVL52:
  68:Core/Src/ADBMS_LL_Driver.c **** 
ARM GAS  /tmp/cchrlAc9.s 			page 11


 405              		.loc 1 68 2 is_stmt 1 view .LVU131
  68:Core/Src/ADBMS_LL_Driver.c **** 
 406              		.loc 1 68 28 is_stmt 0 view .LVU132
 407 0030 4300     		lsls	r3, r0, #1
  68:Core/Src/ADBMS_LL_Driver.c **** 
 408              		.loc 1 68 8 view .LVU133
 409 0032 DBB2     		uxtb	r3, r3
 410              	.LVL53:
  70:Core/Src/ADBMS_LL_Driver.c **** 	{
 411              		.loc 1 70 2 is_stmt 1 view .LVU134
  70:Core/Src/ADBMS_LL_Driver.c **** 	{
 412              		.loc 1 70 21 is_stmt 0 view .LVU135
 413 0034 A919     		adds	r1, r5, r6
 414 0036 11F8021C 		ldrb	r1, [r1, #-2]	@ zero_extendqisi2
  70:Core/Src/ADBMS_LL_Driver.c **** 	{
 415              		.loc 1 70 4 view .LVU136
 416 003a 9142     		cmp	r1, r2
 417 003c 01D0     		beq	.L28
  75:Core/Src/ADBMS_LL_Driver.c **** 
 418              		.loc 1 75 9 view .LVU137
 419 003e 0120     		movs	r0, #1
 420              	.LVL54:
 421              	.L15:
  77:Core/Src/ADBMS_LL_Driver.c **** 
 422              		.loc 1 77 1 view .LVU138
 423 0040 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 424              	.LVL55:
 425              	.L28:
  70:Core/Src/ADBMS_LL_Driver.c **** 	{
 426              		.loc 1 70 52 discriminator 1 view .LVU139
 427 0042 3544     		add	r5, r5, r6
 428              	.LVL56:
  70:Core/Src/ADBMS_LL_Driver.c **** 	{
 429              		.loc 1 70 52 discriminator 1 view .LVU140
 430 0044 15F8012C 		ldrb	r2, [r5, #-1]	@ zero_extendqisi2
 431              	.LVL57:
  70:Core/Src/ADBMS_LL_Driver.c **** 	{
 432              		.loc 1 70 34 discriminator 1 view .LVU141
 433 0048 9A42     		cmp	r2, r3
 434 004a 03D0     		beq	.L22
  75:Core/Src/ADBMS_LL_Driver.c **** 
 435              		.loc 1 75 9 view .LVU142
 436 004c 0120     		movs	r0, #1
 437              	.LVL58:
  75:Core/Src/ADBMS_LL_Driver.c **** 
 438              		.loc 1 75 9 view .LVU143
 439 004e F7E7     		b	.L15
 440              	.LVL59:
 441              	.L19:
 442              		.cfi_def_cfa_offset 0
 443              		.cfi_restore 3
 444              		.cfi_restore 4
 445              		.cfi_restore 5
 446              		.cfi_restore 6
 447              		.cfi_restore 7
 448              		.cfi_restore 14
  53:Core/Src/ADBMS_LL_Driver.c **** 	}
ARM GAS  /tmp/cchrlAc9.s 			page 12


 449              		.loc 1 53 10 view .LVU144
 450 0050 FF20     		movs	r0, #255
 451              	.LVL60:
  77:Core/Src/ADBMS_LL_Driver.c **** 
 452              		.loc 1 77 1 view .LVU145
 453 0052 7047     		bx	lr
 454              	.LVL61:
 455              	.L22:
 456              		.cfi_def_cfa_offset 24
 457              		.cfi_offset 3, -24
 458              		.cfi_offset 4, -20
 459              		.cfi_offset 5, -16
 460              		.cfi_offset 6, -12
 461              		.cfi_offset 7, -8
 462              		.cfi_offset 14, -4
  72:Core/Src/ADBMS_LL_Driver.c **** 	}
 463              		.loc 1 72 10 view .LVU146
 464 0054 0020     		movs	r0, #0
 465              	.LVL62:
  72:Core/Src/ADBMS_LL_Driver.c **** 	}
 466              		.loc 1 72 10 view .LVU147
 467 0056 F3E7     		b	.L15
 468              		.cfi_endproc
 469              	.LFE132:
 471              		.section	.text.mcuAdbmsCSLow,"ax",%progbits
 472              		.align	1
 473              		.global	mcuAdbmsCSLow
 474              		.syntax unified
 475              		.thumb
 476              		.thumb_func
 478              	mcuAdbmsCSLow:
 479              	.LFB136:
 111:Core/Src/ADBMS_LL_Driver.c **** 
 112:Core/Src/ADBMS_LL_Driver.c **** uint8 writeCMD(uint16 command, uint8* args, uint8 arglen)
 113:Core/Src/ADBMS_LL_Driver.c **** {
 114:Core/Src/ADBMS_LL_Driver.c **** 	if(arglen > 0)
 115:Core/Src/ADBMS_LL_Driver.c **** 	{
 116:Core/Src/ADBMS_LL_Driver.c **** 	uint8 buffer[6+arglen];
 117:Core/Src/ADBMS_LL_Driver.c **** 	buffer[0] = (command >> 8) & 0xFF;
 118:Core/Src/ADBMS_LL_Driver.c **** 	buffer[1] = (command) & 0xFF;
 119:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(buffer, 4);
 120:Core/Src/ADBMS_LL_Driver.c **** 	for(uint8 i = 0; i < arglen; i++)
 121:Core/Src/ADBMS_LL_Driver.c **** 	{
 122:Core/Src/ADBMS_LL_Driver.c **** 		buffer[4+i] = args[i];
 123:Core/Src/ADBMS_LL_Driver.c **** 	}
 124:Core/Src/ADBMS_LL_Driver.c **** 
 125:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(&buffer[4], arglen+2); //Calculate PEC of Data Part with offset of 4 Bytes for CMD an
 126:Core/Src/ADBMS_LL_Driver.c **** 
 127:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSLow();
 128:Core/Src/ADBMS_LL_Driver.c **** 	mcuSPITransmit(buffer, 6+arglen);
 129:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
 130:Core/Src/ADBMS_LL_Driver.c **** 
 131:Core/Src/ADBMS_LL_Driver.c **** 	}
 132:Core/Src/ADBMS_LL_Driver.c **** 	else
 133:Core/Src/ADBMS_LL_Driver.c **** 	{
 134:Core/Src/ADBMS_LL_Driver.c **** 	uint8 buffer[4];
 135:Core/Src/ADBMS_LL_Driver.c **** 	buffer[0] = (command >> 8) & 0xFF;
ARM GAS  /tmp/cchrlAc9.s 			page 13


 136:Core/Src/ADBMS_LL_Driver.c **** 	buffer[1] = (command) & 0xFF;
 137:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(buffer, 4);
 138:Core/Src/ADBMS_LL_Driver.c **** 
 139:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSLow();
 140:Core/Src/ADBMS_LL_Driver.c **** 
 141:Core/Src/ADBMS_LL_Driver.c **** 	mcuSPITransmit(buffer, 4);
 142:Core/Src/ADBMS_LL_Driver.c **** 
 143:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
 144:Core/Src/ADBMS_LL_Driver.c **** 	}
 145:Core/Src/ADBMS_LL_Driver.c **** 
 146:Core/Src/ADBMS_LL_Driver.c **** 	return 0;
 147:Core/Src/ADBMS_LL_Driver.c **** }
 148:Core/Src/ADBMS_LL_Driver.c **** 
 149:Core/Src/ADBMS_LL_Driver.c **** uint8 readCMD(uint16 command, uint8* buffer, uint8 buflen)
 150:Core/Src/ADBMS_LL_Driver.c **** {
 151:Core/Src/ADBMS_LL_Driver.c **** 	//uint8* txbuffer = (uint8*) malloc(6+buflen);
 152:Core/Src/ADBMS_LL_Driver.c **** 	//uint8* rxbuffer = (uint8*) malloc(6+buflen);
 153:Core/Src/ADBMS_LL_Driver.c **** 	uint8 txbuffer[6+buflen];
 154:Core/Src/ADBMS_LL_Driver.c **** 	uint8 rxbuffer[6+buflen];
 155:Core/Src/ADBMS_LL_Driver.c **** 
 156:Core/Src/ADBMS_LL_Driver.c **** 	txbuffer[0] = (command >> 8) & 0xFF;
 157:Core/Src/ADBMS_LL_Driver.c **** 	txbuffer[1] = (command) & 0xFF;
 158:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(txbuffer, 4);
 159:Core/Src/ADBMS_LL_Driver.c **** 
 160:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSLow();
 161:Core/Src/ADBMS_LL_Driver.c **** 	mcuSPITransmitReceive(rxbuffer, txbuffer, 6+buflen);
 162:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
 163:Core/Src/ADBMS_LL_Driver.c **** 
 164:Core/Src/ADBMS_LL_Driver.c **** 
 165:Core/Src/ADBMS_LL_Driver.c **** 	for(uint8 i = 0; i<buflen; i++)
 166:Core/Src/ADBMS_LL_Driver.c **** 	{
 167:Core/Src/ADBMS_LL_Driver.c **** 		buffer[i] = rxbuffer[i+4];
 168:Core/Src/ADBMS_LL_Driver.c **** 	}
 169:Core/Src/ADBMS_LL_Driver.c **** 
 170:Core/Src/ADBMS_LL_Driver.c **** 	uint8 peccheck = checkPEC(&rxbuffer[4], buflen+2);
 171:Core/Src/ADBMS_LL_Driver.c **** 
 172:Core/Src/ADBMS_LL_Driver.c **** 	//free(txbuffer);
 173:Core/Src/ADBMS_LL_Driver.c **** 	//free(rxbuffer);
 174:Core/Src/ADBMS_LL_Driver.c **** 
 175:Core/Src/ADBMS_LL_Driver.c **** 	if(peccheck == 0)
 176:Core/Src/ADBMS_LL_Driver.c **** 		return 0;
 177:Core/Src/ADBMS_LL_Driver.c **** 	else
 178:Core/Src/ADBMS_LL_Driver.c **** 	{
 179:Core/Src/ADBMS_LL_Driver.c **** 		static int err_cnt = 0;
 180:Core/Src/ADBMS_LL_Driver.c **** 		if (err_cnt++ > 100) {
 181:Core/Src/ADBMS_LL_Driver.c **** 		Error_Handler();
 182:Core/Src/ADBMS_LL_Driver.c **** 		} else {
 183:Core/Src/ADBMS_LL_Driver.c **** 			return 1;
 184:Core/Src/ADBMS_LL_Driver.c **** 		}
 185:Core/Src/ADBMS_LL_Driver.c **** 	}
 186:Core/Src/ADBMS_LL_Driver.c **** 
 187:Core/Src/ADBMS_LL_Driver.c **** }
 188:Core/Src/ADBMS_LL_Driver.c **** 
 189:Core/Src/ADBMS_LL_Driver.c **** void mcuAdbmsCSLow()
 190:Core/Src/ADBMS_LL_Driver.c **** {
 480              		.loc 1 190 1 is_stmt 1 view -0
 481              		.cfi_startproc
ARM GAS  /tmp/cchrlAc9.s 			page 14


 482              		@ args = 0, pretend = 0, frame = 0
 483              		@ frame_needed = 0, uses_anonymous_args = 0
 484 0000 08B5     		push	{r3, lr}
 485              		.cfi_def_cfa_offset 8
 486              		.cfi_offset 3, -8
 487              		.cfi_offset 14, -4
 191:Core/Src/ADBMS_LL_Driver.c **** 	HAL_GPIO_WritePin(CSB_GPIO_Port, CSB_Pin, GPIO_PIN_RESET);
 488              		.loc 1 191 2 view .LVU149
 489 0002 0022     		movs	r2, #0
 490 0004 1021     		movs	r1, #16
 491 0006 4FF09040 		mov	r0, #1207959552
 492 000a FFF7FEFF 		bl	HAL_GPIO_WritePin
 493              	.LVL63:
 192:Core/Src/ADBMS_LL_Driver.c **** }
 494              		.loc 1 192 1 is_stmt 0 view .LVU150
 495 000e 08BD     		pop	{r3, pc}
 496              		.cfi_endproc
 497              	.LFE136:
 499              		.section	.text.mcuAdbmsCSHigh,"ax",%progbits
 500              		.align	1
 501              		.global	mcuAdbmsCSHigh
 502              		.syntax unified
 503              		.thumb
 504              		.thumb_func
 506              	mcuAdbmsCSHigh:
 507              	.LFB137:
 193:Core/Src/ADBMS_LL_Driver.c **** 
 194:Core/Src/ADBMS_LL_Driver.c **** void mcuAdbmsCSHigh()
 195:Core/Src/ADBMS_LL_Driver.c **** {
 508              		.loc 1 195 1 is_stmt 1 view -0
 509              		.cfi_startproc
 510              		@ args = 0, pretend = 0, frame = 0
 511              		@ frame_needed = 0, uses_anonymous_args = 0
 512 0000 08B5     		push	{r3, lr}
 513              		.cfi_def_cfa_offset 8
 514              		.cfi_offset 3, -8
 515              		.cfi_offset 14, -4
 196:Core/Src/ADBMS_LL_Driver.c **** 	HAL_GPIO_WritePin(CSB_GPIO_Port, CSB_Pin, GPIO_PIN_SET);
 516              		.loc 1 196 2 view .LVU152
 517 0002 0122     		movs	r2, #1
 518 0004 1021     		movs	r1, #16
 519 0006 4FF09040 		mov	r0, #1207959552
 520 000a FFF7FEFF 		bl	HAL_GPIO_WritePin
 521              	.LVL64:
 197:Core/Src/ADBMS_LL_Driver.c **** }
 522              		.loc 1 197 1 is_stmt 0 view .LVU153
 523 000e 08BD     		pop	{r3, pc}
 524              		.cfi_endproc
 525              	.LFE137:
 527              		.section	.text.adbmsDriverInit,"ax",%progbits
 528              		.align	1
 529              		.global	adbmsDriverInit
 530              		.syntax unified
 531              		.thumb
 532              		.thumb_func
 534              	adbmsDriverInit:
 535              	.LVL65:
ARM GAS  /tmp/cchrlAc9.s 			page 15


 536              	.LFB130:
  16:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSLow();
 537              		.loc 1 16 1 is_stmt 1 view -0
 538              		.cfi_startproc
 539              		@ args = 0, pretend = 0, frame = 0
 540              		@ frame_needed = 0, uses_anonymous_args = 0
  16:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSLow();
 541              		.loc 1 16 1 is_stmt 0 view .LVU155
 542 0000 10B5     		push	{r4, lr}
 543              		.cfi_def_cfa_offset 8
 544              		.cfi_offset 4, -8
 545              		.cfi_offset 14, -4
 546 0002 0446     		mov	r4, r0
  17:Core/Src/ADBMS_LL_Driver.c **** 	HAL_Delay(1);
 547              		.loc 1 17 2 is_stmt 1 view .LVU156
 548 0004 FFF7FEFF 		bl	mcuAdbmsCSLow
 549              	.LVL66:
  18:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
 550              		.loc 1 18 2 view .LVU157
 551 0008 0120     		movs	r0, #1
 552 000a FFF7FEFF 		bl	HAL_Delay
 553              	.LVL67:
  19:Core/Src/ADBMS_LL_Driver.c **** 	adbmsspi = hspi;
 554              		.loc 1 19 2 view .LVU158
 555 000e FFF7FEFF 		bl	mcuAdbmsCSHigh
 556              	.LVL68:
  20:Core/Src/ADBMS_LL_Driver.c **** 	return 0;
 557              		.loc 1 20 2 view .LVU159
  20:Core/Src/ADBMS_LL_Driver.c **** 	return 0;
 558              		.loc 1 20 11 is_stmt 0 view .LVU160
 559 0012 024B     		ldr	r3, .L35
 560 0014 1C60     		str	r4, [r3]
  21:Core/Src/ADBMS_LL_Driver.c **** }
 561              		.loc 1 21 2 is_stmt 1 view .LVU161
  22:Core/Src/ADBMS_LL_Driver.c **** 
 562              		.loc 1 22 1 is_stmt 0 view .LVU162
 563 0016 0020     		movs	r0, #0
 564 0018 10BD     		pop	{r4, pc}
 565              	.LVL69:
 566              	.L36:
  22:Core/Src/ADBMS_LL_Driver.c **** 
 567              		.loc 1 22 1 view .LVU163
 568 001a 00BF     		.align	2
 569              	.L35:
 570 001c 00000000 		.word	adbmsspi
 571              		.cfi_endproc
 572              	.LFE130:
 574              		.section	.text.mcuSPITransmit,"ax",%progbits
 575              		.align	1
 576              		.global	mcuSPITransmit
 577              		.syntax unified
 578              		.thumb
 579              		.thumb_func
 581              	mcuSPITransmit:
 582              	.LVL70:
 583              	.LFB138:
 198:Core/Src/ADBMS_LL_Driver.c **** 
ARM GAS  /tmp/cchrlAc9.s 			page 16


 199:Core/Src/ADBMS_LL_Driver.c **** uint8 mcuSPITransmit(uint8* buffer, uint8 buffersize)
 200:Core/Src/ADBMS_LL_Driver.c **** {
 584              		.loc 1 200 1 is_stmt 1 view -0
 585              		.cfi_startproc
 586              		@ args = 0, pretend = 0, frame = 8
 587              		@ frame_needed = 1, uses_anonymous_args = 0
 588              		.loc 1 200 1 is_stmt 0 view .LVU165
 589 0000 90B5     		push	{r4, r7, lr}
 590              		.cfi_def_cfa_offset 12
 591              		.cfi_offset 4, -12
 592              		.cfi_offset 7, -8
 593              		.cfi_offset 14, -4
 594 0002 85B0     		sub	sp, sp, #20
 595              		.cfi_def_cfa_offset 32
 596 0004 02AF     		add	r7, sp, #8
 597              		.cfi_def_cfa 7, 24
 598 0006 0B46     		mov	r3, r1
 201:Core/Src/ADBMS_LL_Driver.c **** 	HAL_StatusTypeDef status;
 599              		.loc 1 201 2 is_stmt 1 view .LVU166
 202:Core/Src/ADBMS_LL_Driver.c **** 	//status = HAL_SPI_Transmit(adbmsspi, buffer, buffersize, ADBMS_SPI_TIMEOUT);
 203:Core/Src/ADBMS_LL_Driver.c **** 	//uint8 *rxbuf = (uint8*) malloc(buffersize);
 204:Core/Src/ADBMS_LL_Driver.c **** 	uint8 rxbuf[buffersize];
 600              		.loc 1 204 2 view .LVU167
 601              	.LVL71:
 602              		.loc 1 204 8 is_stmt 0 view .LVU168
 603 0008 CA1D     		adds	r2, r1, #7
 604 000a 02F4FC72 		and	r2, r2, #504
 605 000e ADEB020D 		sub	sp, sp, r2
 606 0012 6A46     		mov	r2, sp
 607              	.LVL72:
 205:Core/Src/ADBMS_LL_Driver.c **** 	status = HAL_SPI_TransmitReceive(adbmsspi, buffer, rxbuf, buffersize, ADBMS_SPI_TIMEOUT);
 608              		.loc 1 205 2 is_stmt 1 view .LVU169
 609              		.loc 1 205 11 is_stmt 0 view .LVU170
 610 0014 0A4C     		ldr	r4, .L39
 611 0016 4FF47A71 		mov	r1, #1000
 612              	.LVL73:
 613              		.loc 1 205 11 view .LVU171
 614 001a 42F8081B 		str	r1, [r2], #8
 615              	.LVL74:
 616              		.loc 1 205 11 view .LVU172
 617 001e 0146     		mov	r1, r0
 618 0020 2068     		ldr	r0, [r4]
 619              	.LVL75:
 620              		.loc 1 205 11 view .LVU173
 621 0022 FFF7FEFF 		bl	HAL_SPI_TransmitReceive
 622              	.LVL76:
 206:Core/Src/ADBMS_LL_Driver.c **** 	__HAL_SPI_CLEAR_OVRFLAG(adbmsspi);
 623              		.loc 1 206 2 is_stmt 1 view .LVU174
 624              	.LBB12:
 625              		.loc 1 206 2 view .LVU175
 626 0026 0023     		movs	r3, #0
 627 0028 7B60     		str	r3, [r7, #4]
 628              		.loc 1 206 2 view .LVU176
 629 002a 2368     		ldr	r3, [r4]
 630 002c 1B68     		ldr	r3, [r3]
 631 002e DA68     		ldr	r2, [r3, #12]
 632 0030 7A60     		str	r2, [r7, #4]
ARM GAS  /tmp/cchrlAc9.s 			page 17


 633              		.loc 1 206 2 view .LVU177
 634 0032 9B68     		ldr	r3, [r3, #8]
 635 0034 7B60     		str	r3, [r7, #4]
 636              		.loc 1 206 2 view .LVU178
 637 0036 7B68     		ldr	r3, [r7, #4]
 638              	.LBE12:
 639              		.loc 1 206 2 view .LVU179
 207:Core/Src/ADBMS_LL_Driver.c **** 	//free(rxbuf);
 208:Core/Src/ADBMS_LL_Driver.c **** 	return status;
 640              		.loc 1 208 2 view .LVU180
 209:Core/Src/ADBMS_LL_Driver.c **** }
 641              		.loc 1 209 1 is_stmt 0 view .LVU181
 642 0038 0C37     		adds	r7, r7, #12
 643              		.cfi_def_cfa_offset 12
 644 003a BD46     		mov	sp, r7
 645              		.cfi_def_cfa_register 13
 646              	.LVL77:
 647              		.loc 1 209 1 view .LVU182
 648              		@ sp needed
 649 003c 90BD     		pop	{r4, r7, pc}
 650              	.L40:
 651 003e 00BF     		.align	2
 652              	.L39:
 653 0040 00000000 		.word	adbmsspi
 654              		.cfi_endproc
 655              	.LFE138:
 657              		.section	.text.writeCMD,"ax",%progbits
 658              		.align	1
 659              		.global	writeCMD
 660              		.syntax unified
 661              		.thumb
 662              		.thumb_func
 664              	writeCMD:
 665              	.LVL78:
 666              	.LFB134:
 113:Core/Src/ADBMS_LL_Driver.c **** 	if(arglen > 0)
 667              		.loc 1 113 1 is_stmt 1 view -0
 668              		.cfi_startproc
 669              		@ args = 0, pretend = 0, frame = 8
 670              		@ frame_needed = 1, uses_anonymous_args = 0
 113:Core/Src/ADBMS_LL_Driver.c **** 	if(arglen > 0)
 671              		.loc 1 113 1 is_stmt 0 view .LVU184
 672 0000 2DE9F041 		push	{r4, r5, r6, r7, r8, lr}
 673              		.cfi_def_cfa_offset 24
 674              		.cfi_offset 4, -24
 675              		.cfi_offset 5, -20
 676              		.cfi_offset 6, -16
 677              		.cfi_offset 7, -12
 678              		.cfi_offset 8, -8
 679              		.cfi_offset 14, -4
 680 0004 82B0     		sub	sp, sp, #8
 681              		.cfi_def_cfa_offset 32
 682 0006 00AF     		add	r7, sp, #0
 683              		.cfi_def_cfa_register 7
 114:Core/Src/ADBMS_LL_Driver.c **** 	{
 684              		.loc 1 114 2 is_stmt 1 view .LVU185
 114:Core/Src/ADBMS_LL_Driver.c **** 	{
ARM GAS  /tmp/cchrlAc9.s 			page 18


 685              		.loc 1 114 4 is_stmt 0 view .LVU186
 686 0008 7AB3     		cbz	r2, .L42
 687 000a 0D46     		mov	r5, r1
 688 000c 1446     		mov	r4, r2
 689              	.LBB13:
 115:Core/Src/ADBMS_LL_Driver.c **** 	uint8 buffer[6+arglen];
 690              		.loc 1 115 2 view .LVU187
 691 000e E846     		mov	r8, sp
 116:Core/Src/ADBMS_LL_Driver.c **** 	buffer[0] = (command >> 8) & 0xFF;
 692              		.loc 1 116 2 is_stmt 1 view .LVU188
 693              	.LVL79:
 116:Core/Src/ADBMS_LL_Driver.c **** 	buffer[0] = (command >> 8) & 0xFF;
 694              		.loc 1 116 8 is_stmt 0 view .LVU189
 695 0010 02F10D03 		add	r3, r2, #13
 696 0014 03F4FC73 		and	r3, r3, #504
 697 0018 ADEB030D 		sub	sp, sp, r3
 698 001c 6E46     		mov	r6, sp
 699              	.LVL80:
 117:Core/Src/ADBMS_LL_Driver.c **** 	buffer[1] = (command) & 0xFF;
 700              		.loc 1 117 2 is_stmt 1 view .LVU190
 117:Core/Src/ADBMS_LL_Driver.c **** 	buffer[1] = (command) & 0xFF;
 701              		.loc 1 117 12 is_stmt 0 view .LVU191
 702 001e 030A     		lsrs	r3, r0, #8
 703 0020 8DF80030 		strb	r3, [sp]
 118:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(buffer, 4);
 704              		.loc 1 118 2 is_stmt 1 view .LVU192
 118:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(buffer, 4);
 705              		.loc 1 118 12 is_stmt 0 view .LVU193
 706 0024 8DF80100 		strb	r0, [sp, #1]
 119:Core/Src/ADBMS_LL_Driver.c **** 	for(uint8 i = 0; i < arglen; i++)
 707              		.loc 1 119 2 is_stmt 1 view .LVU194
 708 0028 0421     		movs	r1, #4
 709              	.LVL81:
 119:Core/Src/ADBMS_LL_Driver.c **** 	for(uint8 i = 0; i < arglen; i++)
 710              		.loc 1 119 2 is_stmt 0 view .LVU195
 711 002a 6846     		mov	r0, sp
 712              	.LVL82:
 119:Core/Src/ADBMS_LL_Driver.c **** 	for(uint8 i = 0; i < arglen; i++)
 713              		.loc 1 119 2 view .LVU196
 714 002c FFF7FEFF 		bl	calculatePEC
 715              	.LVL83:
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 716              		.loc 1 120 2 is_stmt 1 view .LVU197
 717              	.LBB14:
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 718              		.loc 1 120 6 view .LVU198
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 719              		.loc 1 120 12 is_stmt 0 view .LVU199
 720 0030 0023     		movs	r3, #0
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 721              		.loc 1 120 2 view .LVU200
 722 0032 04E0     		b	.L43
 723              	.LVL84:
 724              	.L44:
 122:Core/Src/ADBMS_LL_Driver.c **** 	}
 725              		.loc 1 122 3 is_stmt 1 discriminator 3 view .LVU201
 122:Core/Src/ADBMS_LL_Driver.c **** 	}
ARM GAS  /tmp/cchrlAc9.s 			page 19


 726              		.loc 1 122 11 is_stmt 0 discriminator 3 view .LVU202
 727 0034 1A1D     		adds	r2, r3, #4
 122:Core/Src/ADBMS_LL_Driver.c **** 	}
 728              		.loc 1 122 21 discriminator 3 view .LVU203
 729 0036 E95C     		ldrb	r1, [r5, r3]	@ zero_extendqisi2
 122:Core/Src/ADBMS_LL_Driver.c **** 	}
 730              		.loc 1 122 15 discriminator 3 view .LVU204
 731 0038 B154     		strb	r1, [r6, r2]
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 732              		.loc 1 120 32 is_stmt 1 discriminator 3 view .LVU205
 733 003a 0133     		adds	r3, r3, #1
 734              	.LVL85:
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 735              		.loc 1 120 32 is_stmt 0 discriminator 3 view .LVU206
 736 003c DBB2     		uxtb	r3, r3
 737              	.LVL86:
 738              	.L43:
 120:Core/Src/ADBMS_LL_Driver.c **** 	{
 739              		.loc 1 120 21 is_stmt 1 discriminator 1 view .LVU207
 740 003e A342     		cmp	r3, r4
 741 0040 F8D3     		bcc	.L44
 742              	.LBE14:
 125:Core/Src/ADBMS_LL_Driver.c **** 
 743              		.loc 1 125 2 view .LVU208
 744 0042 A11C     		adds	r1, r4, #2
 745 0044 C9B2     		uxtb	r1, r1
 746 0046 301D     		adds	r0, r6, #4
 747 0048 FFF7FEFF 		bl	calculatePEC
 748              	.LVL87:
 127:Core/Src/ADBMS_LL_Driver.c **** 	mcuSPITransmit(buffer, 6+arglen);
 749              		.loc 1 127 2 view .LVU209
 750 004c FFF7FEFF 		bl	mcuAdbmsCSLow
 751              	.LVL88:
 128:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
 752              		.loc 1 128 2 view .LVU210
 753 0050 A11D     		adds	r1, r4, #6
 754 0052 C9B2     		uxtb	r1, r1
 755 0054 3046     		mov	r0, r6
 756 0056 FFF7FEFF 		bl	mcuSPITransmit
 757              	.LVL89:
 129:Core/Src/ADBMS_LL_Driver.c **** 
 758              		.loc 1 129 2 view .LVU211
 759 005a FFF7FEFF 		bl	mcuAdbmsCSHigh
 760              	.LVL90:
 761 005e C546     		mov	sp, r8
 762              	.LVL91:
 763              	.L45:
 129:Core/Src/ADBMS_LL_Driver.c **** 
 764              		.loc 1 129 2 is_stmt 0 view .LVU212
 765              	.LBE13:
 146:Core/Src/ADBMS_LL_Driver.c **** }
 766              		.loc 1 146 2 is_stmt 1 view .LVU213
 147:Core/Src/ADBMS_LL_Driver.c **** 
 767              		.loc 1 147 1 is_stmt 0 view .LVU214
 768 0060 0020     		movs	r0, #0
 769 0062 0837     		adds	r7, r7, #8
 770              		.cfi_remember_state
ARM GAS  /tmp/cchrlAc9.s 			page 20


 771              		.cfi_def_cfa_offset 24
 772 0064 BD46     		mov	sp, r7
 773              		.cfi_def_cfa_register 13
 774              		@ sp needed
 775 0066 BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 776              	.LVL92:
 777              	.L42:
 778              		.cfi_restore_state
 779              	.LBB15:
 134:Core/Src/ADBMS_LL_Driver.c **** 	buffer[0] = (command >> 8) & 0xFF;
 780              		.loc 1 134 2 is_stmt 1 view .LVU215
 135:Core/Src/ADBMS_LL_Driver.c **** 	buffer[1] = (command) & 0xFF;
 781              		.loc 1 135 2 view .LVU216
 135:Core/Src/ADBMS_LL_Driver.c **** 	buffer[1] = (command) & 0xFF;
 782              		.loc 1 135 12 is_stmt 0 view .LVU217
 783 006a 030A     		lsrs	r3, r0, #8
 784 006c 3B71     		strb	r3, [r7, #4]
 136:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(buffer, 4);
 785              		.loc 1 136 2 is_stmt 1 view .LVU218
 136:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(buffer, 4);
 786              		.loc 1 136 12 is_stmt 0 view .LVU219
 787 006e 7871     		strb	r0, [r7, #5]
 137:Core/Src/ADBMS_LL_Driver.c **** 
 788              		.loc 1 137 2 is_stmt 1 view .LVU220
 789 0070 0421     		movs	r1, #4
 790              	.LVL93:
 137:Core/Src/ADBMS_LL_Driver.c **** 
 791              		.loc 1 137 2 is_stmt 0 view .LVU221
 792 0072 7818     		adds	r0, r7, r1
 793              	.LVL94:
 137:Core/Src/ADBMS_LL_Driver.c **** 
 794              		.loc 1 137 2 view .LVU222
 795 0074 FFF7FEFF 		bl	calculatePEC
 796              	.LVL95:
 139:Core/Src/ADBMS_LL_Driver.c **** 
 797              		.loc 1 139 2 is_stmt 1 view .LVU223
 798 0078 FFF7FEFF 		bl	mcuAdbmsCSLow
 799              	.LVL96:
 141:Core/Src/ADBMS_LL_Driver.c **** 
 800              		.loc 1 141 2 view .LVU224
 801 007c 0421     		movs	r1, #4
 802 007e 7818     		adds	r0, r7, r1
 803 0080 FFF7FEFF 		bl	mcuSPITransmit
 804              	.LVL97:
 143:Core/Src/ADBMS_LL_Driver.c **** 	}
 805              		.loc 1 143 2 view .LVU225
 806 0084 FFF7FEFF 		bl	mcuAdbmsCSHigh
 807              	.LVL98:
 808 0088 EAE7     		b	.L45
 809              	.LBE15:
 810              		.cfi_endproc
 811              	.LFE134:
 813              		.section	.text.mcuSPIReceive,"ax",%progbits
 814              		.align	1
 815              		.global	mcuSPIReceive
 816              		.syntax unified
 817              		.thumb
ARM GAS  /tmp/cchrlAc9.s 			page 21


 818              		.thumb_func
 820              	mcuSPIReceive:
 821              	.LVL99:
 822              	.LFB139:
 210:Core/Src/ADBMS_LL_Driver.c **** 
 211:Core/Src/ADBMS_LL_Driver.c **** uint8 mcuSPIReceive(uint8* buffer, uint8 buffersize)
 212:Core/Src/ADBMS_LL_Driver.c **** {
 823              		.loc 1 212 1 view -0
 824              		.cfi_startproc
 825              		@ args = 0, pretend = 0, frame = 0
 826              		@ frame_needed = 0, uses_anonymous_args = 0
 827              		.loc 1 212 1 is_stmt 0 view .LVU227
 828 0000 08B5     		push	{r3, lr}
 829              		.cfi_def_cfa_offset 8
 830              		.cfi_offset 3, -8
 831              		.cfi_offset 14, -4
 832 0002 0A46     		mov	r2, r1
 213:Core/Src/ADBMS_LL_Driver.c **** 	HAL_StatusTypeDef status;
 833              		.loc 1 213 2 is_stmt 1 view .LVU228
 214:Core/Src/ADBMS_LL_Driver.c **** 	status = HAL_SPI_Receive(adbmsspi, buffer, buffersize, ADBMS_SPI_TIMEOUT);
 834              		.loc 1 214 2 view .LVU229
 835              		.loc 1 214 11 is_stmt 0 view .LVU230
 836 0004 4FF47A73 		mov	r3, #1000
 837 0008 0146     		mov	r1, r0
 838              	.LVL100:
 839              		.loc 1 214 11 view .LVU231
 840 000a 0248     		ldr	r0, .L49
 841              	.LVL101:
 842              		.loc 1 214 11 view .LVU232
 843 000c 0068     		ldr	r0, [r0]
 844 000e FFF7FEFF 		bl	HAL_SPI_Receive
 845              	.LVL102:
 215:Core/Src/ADBMS_LL_Driver.c **** 	return status;
 846              		.loc 1 215 2 is_stmt 1 view .LVU233
 216:Core/Src/ADBMS_LL_Driver.c **** }
 847              		.loc 1 216 1 is_stmt 0 view .LVU234
 848 0012 08BD     		pop	{r3, pc}
 849              	.L50:
 850              		.align	2
 851              	.L49:
 852 0014 00000000 		.word	adbmsspi
 853              		.cfi_endproc
 854              	.LFE139:
 856              		.section	.text.mcuSPITransmitReceive,"ax",%progbits
 857              		.align	1
 858              		.global	mcuSPITransmitReceive
 859              		.syntax unified
 860              		.thumb
 861              		.thumb_func
 863              	mcuSPITransmitReceive:
 864              	.LVL103:
 865              	.LFB140:
 217:Core/Src/ADBMS_LL_Driver.c **** 
 218:Core/Src/ADBMS_LL_Driver.c **** uint8 mcuSPITransmitReceive(uint8* rxbuffer, uint8* txbuffer, uint8 buffersize)
 219:Core/Src/ADBMS_LL_Driver.c **** {
 866              		.loc 1 219 1 is_stmt 1 view -0
 867              		.cfi_startproc
ARM GAS  /tmp/cchrlAc9.s 			page 22


 868              		@ args = 0, pretend = 0, frame = 0
 869              		@ frame_needed = 0, uses_anonymous_args = 0
 870              		.loc 1 219 1 is_stmt 0 view .LVU236
 871 0000 00B5     		push	{lr}
 872              		.cfi_def_cfa_offset 4
 873              		.cfi_offset 14, -4
 874 0002 83B0     		sub	sp, sp, #12
 875              		.cfi_def_cfa_offset 16
 876 0004 1346     		mov	r3, r2
 220:Core/Src/ADBMS_LL_Driver.c **** 	HAL_StatusTypeDef status;
 877              		.loc 1 220 2 is_stmt 1 view .LVU237
 221:Core/Src/ADBMS_LL_Driver.c **** 	status = HAL_SPI_TransmitReceive(adbmsspi, txbuffer, rxbuffer, buffersize, ADBMS_SPI_TIMEOUT);
 878              		.loc 1 221 2 view .LVU238
 879              		.loc 1 221 11 is_stmt 0 view .LVU239
 880 0006 4FF47A72 		mov	r2, #1000
 881              	.LVL104:
 882              		.loc 1 221 11 view .LVU240
 883 000a 0092     		str	r2, [sp]
 884 000c 0246     		mov	r2, r0
 885 000e 0348     		ldr	r0, .L53
 886              	.LVL105:
 887              		.loc 1 221 11 view .LVU241
 888 0010 0068     		ldr	r0, [r0]
 889 0012 FFF7FEFF 		bl	HAL_SPI_TransmitReceive
 890              	.LVL106:
 222:Core/Src/ADBMS_LL_Driver.c **** 	return status;
 891              		.loc 1 222 2 is_stmt 1 view .LVU242
 223:Core/Src/ADBMS_LL_Driver.c **** }
 892              		.loc 1 223 1 is_stmt 0 view .LVU243
 893 0016 03B0     		add	sp, sp, #12
 894              		.cfi_def_cfa_offset 4
 895              		@ sp needed
 896 0018 5DF804FB 		ldr	pc, [sp], #4
 897              	.L54:
 898              		.align	2
 899              	.L53:
 900 001c 00000000 		.word	adbmsspi
 901              		.cfi_endproc
 902              	.LFE140:
 904              		.section	.text.readCMD,"ax",%progbits
 905              		.align	1
 906              		.global	readCMD
 907              		.syntax unified
 908              		.thumb
 909              		.thumb_func
 911              	readCMD:
 912              	.LVL107:
 913              	.LFB135:
 150:Core/Src/ADBMS_LL_Driver.c **** 	//uint8* txbuffer = (uint8*) malloc(6+buflen);
 914              		.loc 1 150 1 is_stmt 1 view -0
 915              		.cfi_startproc
 916              		@ args = 0, pretend = 0, frame = 0
 917              		@ frame_needed = 1, uses_anonymous_args = 0
 150:Core/Src/ADBMS_LL_Driver.c **** 	//uint8* txbuffer = (uint8*) malloc(6+buflen);
 918              		.loc 1 150 1 is_stmt 0 view .LVU245
 919 0000 2DE9F843 		push	{r3, r4, r5, r6, r7, r8, r9, lr}
 920              		.cfi_def_cfa_offset 32
ARM GAS  /tmp/cchrlAc9.s 			page 23


 921              		.cfi_offset 3, -32
 922              		.cfi_offset 4, -28
 923              		.cfi_offset 5, -24
 924              		.cfi_offset 6, -20
 925              		.cfi_offset 7, -16
 926              		.cfi_offset 8, -12
 927              		.cfi_offset 9, -8
 928              		.cfi_offset 14, -4
 929 0004 00AF     		add	r7, sp, #0
 930              		.cfi_def_cfa_register 7
 931 0006 0E46     		mov	r6, r1
 932 0008 1446     		mov	r4, r2
 153:Core/Src/ADBMS_LL_Driver.c **** 	uint8 rxbuffer[6+buflen];
 933              		.loc 1 153 2 is_stmt 1 view .LVU246
 153:Core/Src/ADBMS_LL_Driver.c **** 	uint8 rxbuffer[6+buflen];
 934              		.loc 1 153 18 is_stmt 0 view .LVU247
 935 000a 02F10609 		add	r9, r2, #6
 936              	.LVL108:
 153:Core/Src/ADBMS_LL_Driver.c **** 	uint8 rxbuffer[6+buflen];
 937              		.loc 1 153 8 view .LVU248
 938 000e 02F10D03 		add	r3, r2, #13
 939 0012 03F4FC73 		and	r3, r3, #504
 940 0016 ADEB030D 		sub	sp, sp, r3
 941 001a E846     		mov	r8, sp
 942              	.LVL109:
 154:Core/Src/ADBMS_LL_Driver.c **** 
 943              		.loc 1 154 2 is_stmt 1 view .LVU249
 154:Core/Src/ADBMS_LL_Driver.c **** 
 944              		.loc 1 154 8 is_stmt 0 view .LVU250
 945 001c ADEB030D 		sub	sp, sp, r3
 946 0020 6D46     		mov	r5, sp
 947              	.LVL110:
 156:Core/Src/ADBMS_LL_Driver.c **** 	txbuffer[1] = (command) & 0xFF;
 948              		.loc 1 156 2 is_stmt 1 view .LVU251
 156:Core/Src/ADBMS_LL_Driver.c **** 	txbuffer[1] = (command) & 0xFF;
 949              		.loc 1 156 14 is_stmt 0 view .LVU252
 950 0022 030A     		lsrs	r3, r0, #8
 951 0024 88F80030 		strb	r3, [r8]
 157:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(txbuffer, 4);
 952              		.loc 1 157 2 is_stmt 1 view .LVU253
 157:Core/Src/ADBMS_LL_Driver.c **** 	calculatePEC(txbuffer, 4);
 953              		.loc 1 157 14 is_stmt 0 view .LVU254
 954 0028 88F80100 		strb	r0, [r8, #1]
 158:Core/Src/ADBMS_LL_Driver.c **** 
 955              		.loc 1 158 2 is_stmt 1 view .LVU255
 956 002c 0421     		movs	r1, #4
 957              	.LVL111:
 158:Core/Src/ADBMS_LL_Driver.c **** 
 958              		.loc 1 158 2 is_stmt 0 view .LVU256
 959 002e 4046     		mov	r0, r8
 960              	.LVL112:
 158:Core/Src/ADBMS_LL_Driver.c **** 
 961              		.loc 1 158 2 view .LVU257
 962 0030 FFF7FEFF 		bl	calculatePEC
 963              	.LVL113:
 160:Core/Src/ADBMS_LL_Driver.c **** 	mcuSPITransmitReceive(rxbuffer, txbuffer, 6+buflen);
 964              		.loc 1 160 2 is_stmt 1 view .LVU258
ARM GAS  /tmp/cchrlAc9.s 			page 24


 965 0034 FFF7FEFF 		bl	mcuAdbmsCSLow
 966              	.LVL114:
 161:Core/Src/ADBMS_LL_Driver.c **** 	mcuAdbmsCSHigh();
 967              		.loc 1 161 2 view .LVU259
 968 0038 5FFA89F2 		uxtb	r2, r9
 969 003c 4146     		mov	r1, r8
 970 003e 6846     		mov	r0, sp
 971 0040 FFF7FEFF 		bl	mcuSPITransmitReceive
 972              	.LVL115:
 162:Core/Src/ADBMS_LL_Driver.c **** 
 973              		.loc 1 162 2 view .LVU260
 974 0044 FFF7FEFF 		bl	mcuAdbmsCSHigh
 975              	.LVL116:
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 976              		.loc 1 165 2 view .LVU261
 977              	.LBB16:
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 978              		.loc 1 165 6 view .LVU262
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 979              		.loc 1 165 12 is_stmt 0 view .LVU263
 980 0048 0023     		movs	r3, #0
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 981              		.loc 1 165 2 view .LVU264
 982 004a 04E0     		b	.L56
 983              	.LVL117:
 984              	.L57:
 167:Core/Src/ADBMS_LL_Driver.c **** 	}
 985              		.loc 1 167 3 is_stmt 1 discriminator 3 view .LVU265
 167:Core/Src/ADBMS_LL_Driver.c **** 	}
 986              		.loc 1 167 25 is_stmt 0 discriminator 3 view .LVU266
 987 004c 1A1D     		adds	r2, r3, #4
 167:Core/Src/ADBMS_LL_Driver.c **** 	}
 988              		.loc 1 167 23 discriminator 3 view .LVU267
 989 004e AA5C     		ldrb	r2, [r5, r2]	@ zero_extendqisi2
 167:Core/Src/ADBMS_LL_Driver.c **** 	}
 990              		.loc 1 167 13 discriminator 3 view .LVU268
 991 0050 F254     		strb	r2, [r6, r3]
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 992              		.loc 1 165 30 is_stmt 1 discriminator 3 view .LVU269
 993 0052 0133     		adds	r3, r3, #1
 994              	.LVL118:
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 995              		.loc 1 165 30 is_stmt 0 discriminator 3 view .LVU270
 996 0054 DBB2     		uxtb	r3, r3
 997              	.LVL119:
 998              	.L56:
 165:Core/Src/ADBMS_LL_Driver.c **** 	{
 999              		.loc 1 165 20 is_stmt 1 discriminator 1 view .LVU271
 1000 0056 A342     		cmp	r3, r4
 1001 0058 F8D3     		bcc	.L57
 1002              	.LBE16:
 170:Core/Src/ADBMS_LL_Driver.c **** 
 1003              		.loc 1 170 2 view .LVU272
 170:Core/Src/ADBMS_LL_Driver.c **** 
 1004              		.loc 1 170 19 is_stmt 0 view .LVU273
 1005 005a A11C     		adds	r1, r4, #2
 1006 005c C9B2     		uxtb	r1, r1
ARM GAS  /tmp/cchrlAc9.s 			page 25


 1007 005e 281D     		adds	r0, r5, #4
 1008 0060 FFF7FEFF 		bl	checkPEC
 1009              	.LVL120:
 175:Core/Src/ADBMS_LL_Driver.c **** 		return 0;
 1010              		.loc 1 175 2 is_stmt 1 view .LVU274
 175:Core/Src/ADBMS_LL_Driver.c **** 		return 0;
 1011              		.loc 1 175 4 is_stmt 0 view .LVU275
 1012 0064 30B1     		cbz	r0, .L55
 1013              	.LBB17:
 179:Core/Src/ADBMS_LL_Driver.c **** 		if (err_cnt++ > 100) {
 1014              		.loc 1 179 3 is_stmt 1 view .LVU276
 180:Core/Src/ADBMS_LL_Driver.c **** 		Error_Handler();
 1015              		.loc 1 180 3 view .LVU277
 180:Core/Src/ADBMS_LL_Driver.c **** 		Error_Handler();
 1016              		.loc 1 180 14 is_stmt 0 view .LVU278
 1017 0066 064A     		ldr	r2, .L62
 1018 0068 1368     		ldr	r3, [r2]
 1019 006a 591C     		adds	r1, r3, #1
 1020 006c 1160     		str	r1, [r2]
 180:Core/Src/ADBMS_LL_Driver.c **** 		Error_Handler();
 1021              		.loc 1 180 6 view .LVU279
 1022 006e 642B     		cmp	r3, #100
 1023 0070 03DC     		bgt	.L61
 183:Core/Src/ADBMS_LL_Driver.c **** 		}
 1024              		.loc 1 183 11 view .LVU280
 1025 0072 0120     		movs	r0, #1
 1026              	.LVL121:
 1027              	.L55:
 183:Core/Src/ADBMS_LL_Driver.c **** 		}
 1028              		.loc 1 183 11 view .LVU281
 1029              	.LBE17:
 187:Core/Src/ADBMS_LL_Driver.c **** 
 1030              		.loc 1 187 1 view .LVU282
 1031 0074 BD46     		mov	sp, r7
 1032              		.cfi_remember_state
 1033              		.cfi_def_cfa_register 13
 1034              		@ sp needed
 1035 0076 BDE8F883 		pop	{r3, r4, r5, r6, r7, r8, r9, pc}
 1036              	.LVL122:
 1037              	.L61:
 1038              		.cfi_restore_state
 1039              	.LBB18:
 181:Core/Src/ADBMS_LL_Driver.c **** 		} else {
 1040              		.loc 1 181 3 is_stmt 1 view .LVU283
 1041 007a FFF7FEFF 		bl	Error_Handler
 1042              	.LVL123:
 181:Core/Src/ADBMS_LL_Driver.c **** 		} else {
 1043              		.loc 1 181 3 is_stmt 0 view .LVU284
 1044              	.LBE18:
 187:Core/Src/ADBMS_LL_Driver.c **** 
 1045              		.loc 1 187 1 view .LVU285
 1046 007e F9E7     		b	.L55
 1047              	.L63:
 1048              		.align	2
 1049              	.L62:
 1050 0080 00000000 		.word	err_cnt.0
 1051              		.cfi_endproc
ARM GAS  /tmp/cchrlAc9.s 			page 26


 1052              	.LFE135:
 1054              		.section	.text.mcuDelay,"ax",%progbits
 1055              		.align	1
 1056              		.global	mcuDelay
 1057              		.syntax unified
 1058              		.thumb
 1059              		.thumb_func
 1061              	mcuDelay:
 1062              	.LVL124:
 1063              	.LFB141:
 224:Core/Src/ADBMS_LL_Driver.c **** 
 225:Core/Src/ADBMS_LL_Driver.c **** inline void mcuDelay(uint16 delay)
 226:Core/Src/ADBMS_LL_Driver.c **** {
 1064              		.loc 1 226 1 is_stmt 1 view -0
 1065              		.cfi_startproc
 1066              		@ args = 0, pretend = 0, frame = 0
 1067              		@ frame_needed = 0, uses_anonymous_args = 0
 1068              		.loc 1 226 1 is_stmt 0 view .LVU287
 1069 0000 08B5     		push	{r3, lr}
 1070              		.cfi_def_cfa_offset 8
 1071              		.cfi_offset 3, -8
 1072              		.cfi_offset 14, -4
 227:Core/Src/ADBMS_LL_Driver.c **** 	HAL_Delay(delay);
 1073              		.loc 1 227 2 is_stmt 1 view .LVU288
 1074 0002 FFF7FEFF 		bl	HAL_Delay
 1075              	.LVL125:
 228:Core/Src/ADBMS_LL_Driver.c **** }
 1076              		.loc 1 228 1 is_stmt 0 view .LVU289
 1077 0006 08BD     		pop	{r3, pc}
 1078              		.cfi_endproc
 1079              	.LFE141:
 1081              		.section	.bss.err_cnt.0,"aw",%nobits
 1082              		.align	2
 1085              	err_cnt.0:
 1086 0000 00000000 		.space	4
 1087              		.global	adbmsspi
 1088              		.section	.bss.adbmsspi,"aw",%nobits
 1089              		.align	2
 1092              	adbmsspi:
 1093 0000 00000000 		.space	4
 1094              		.text
 1095              	.Letext0:
 1096              		.file 2 "/home/david/.config/Code/User/globalStorage/bmd.stm32-for-vscode/@xpack-dev-tools/arm-non
 1097              		.file 3 "/home/david/.config/Code/User/globalStorage/bmd.stm32-for-vscode/@xpack-dev-tools/arm-non
 1098              		.file 4 "Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.h"
 1099              		.file 5 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h"
 1100              		.file 6 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h"
 1101              		.file 7 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h"
 1102              		.file 8 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_spi.h"
 1103              		.file 9 "Core/Inc/ADBMS_LL_Driver.h"
 1104              		.file 10 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h"
 1105              		.file 11 "Core/Inc/main.h"
ARM GAS  /tmp/cchrlAc9.s 			page 27


DEFINED SYMBOLS
                            *ABS*:0000000000000000 ADBMS_LL_Driver.c
     /tmp/cchrlAc9.s:21     .text.updatePEC:0000000000000000 $t
     /tmp/cchrlAc9.s:27     .text.updatePEC:0000000000000000 updatePEC
     /tmp/cchrlAc9.s:191    .text.calculatePEC:0000000000000000 $t
     /tmp/cchrlAc9.s:197    .text.calculatePEC:0000000000000000 calculatePEC
     /tmp/cchrlAc9.s:319    .text.checkPEC:0000000000000000 $t
     /tmp/cchrlAc9.s:325    .text.checkPEC:0000000000000000 checkPEC
     /tmp/cchrlAc9.s:472    .text.mcuAdbmsCSLow:0000000000000000 $t
     /tmp/cchrlAc9.s:478    .text.mcuAdbmsCSLow:0000000000000000 mcuAdbmsCSLow
     /tmp/cchrlAc9.s:500    .text.mcuAdbmsCSHigh:0000000000000000 $t
     /tmp/cchrlAc9.s:506    .text.mcuAdbmsCSHigh:0000000000000000 mcuAdbmsCSHigh
     /tmp/cchrlAc9.s:528    .text.adbmsDriverInit:0000000000000000 $t
     /tmp/cchrlAc9.s:534    .text.adbmsDriverInit:0000000000000000 adbmsDriverInit
     /tmp/cchrlAc9.s:570    .text.adbmsDriverInit:000000000000001c $d
     /tmp/cchrlAc9.s:1092   .bss.adbmsspi:0000000000000000 adbmsspi
     /tmp/cchrlAc9.s:575    .text.mcuSPITransmit:0000000000000000 $t
     /tmp/cchrlAc9.s:581    .text.mcuSPITransmit:0000000000000000 mcuSPITransmit
     /tmp/cchrlAc9.s:653    .text.mcuSPITransmit:0000000000000040 $d
     /tmp/cchrlAc9.s:658    .text.writeCMD:0000000000000000 $t
     /tmp/cchrlAc9.s:664    .text.writeCMD:0000000000000000 writeCMD
     /tmp/cchrlAc9.s:814    .text.mcuSPIReceive:0000000000000000 $t
     /tmp/cchrlAc9.s:820    .text.mcuSPIReceive:0000000000000000 mcuSPIReceive
     /tmp/cchrlAc9.s:852    .text.mcuSPIReceive:0000000000000014 $d
     /tmp/cchrlAc9.s:857    .text.mcuSPITransmitReceive:0000000000000000 $t
     /tmp/cchrlAc9.s:863    .text.mcuSPITransmitReceive:0000000000000000 mcuSPITransmitReceive
     /tmp/cchrlAc9.s:900    .text.mcuSPITransmitReceive:000000000000001c $d
     /tmp/cchrlAc9.s:905    .text.readCMD:0000000000000000 $t
     /tmp/cchrlAc9.s:911    .text.readCMD:0000000000000000 readCMD
     /tmp/cchrlAc9.s:1050   .text.readCMD:0000000000000080 $d
     /tmp/cchrlAc9.s:1085   .bss.err_cnt.0:0000000000000000 err_cnt.0
     /tmp/cchrlAc9.s:1055   .text.mcuDelay:0000000000000000 $t
     /tmp/cchrlAc9.s:1061   .text.mcuDelay:0000000000000000 mcuDelay
     /tmp/cchrlAc9.s:1082   .bss.err_cnt.0:0000000000000000 $d
     /tmp/cchrlAc9.s:1089   .bss.adbmsspi:0000000000000000 $d

UNDEFINED SYMBOLS
HAL_GPIO_WritePin
HAL_Delay
HAL_SPI_TransmitReceive
HAL_SPI_Receive
Error_Handler
