adbmsFunctionTest/build/ADBMS_LL_Driver.lst
2024-10-12 22:13:04 +02:00

2576 lines
116 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ARM GAS /tmp/cc6A08EU.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.F_CRC_ObtenValorDeTabla,"ax",%progbits
21 .align 1
22 .syntax unified
23 .thumb
24 .thumb_func
26 F_CRC_ObtenValorDeTabla:
27 .LVL0:
28 .LFB130:
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 ****
8:Core/Src/ADBMS_LL_Driver.c **** #include "ADBMS_LL_Driver.h"
9:Core/Src/ADBMS_LL_Driver.c **** #include <stdbool.h>
10:Core/Src/ADBMS_LL_Driver.c ****
11:Core/Src/ADBMS_LL_Driver.c **** #define INITIAL_COMMAND_PEC 0x0010
12:Core/Src/ADBMS_LL_Driver.c **** #define INITIAL_DATA_PEC 0x0010
13:Core/Src/ADBMS_LL_Driver.c **** #define ADBMS_SPI_TIMEOUT 100 // Timeout in ms
14:Core/Src/ADBMS_LL_Driver.c **** #warning ask about the timeout value
15:Core/Src/ADBMS_LL_Driver.c ****
16:Core/Src/ADBMS_LL_Driver.c **** SPI_HandleTypeDef* adbmsspi;
17:Core/Src/ADBMS_LL_Driver.c ****
18:Core/Src/ADBMS_LL_Driver.c **** uint8 adbmsDriverInit(SPI_HandleTypeDef* hspi) {
19:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
20:Core/Src/ADBMS_LL_Driver.c **** HAL_Delay(1);
21:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
22:Core/Src/ADBMS_LL_Driver.c **** adbmsspi = hspi;
23:Core/Src/ADBMS_LL_Driver.c **** return 0;
24:Core/Src/ADBMS_LL_Driver.c **** }
25:Core/Src/ADBMS_LL_Driver.c ****
26:Core/Src/ADBMS_LL_Driver.c **** //command PEC calculation
27:Core/Src/ADBMS_LL_Driver.c **** //CRC-15
28:Core/Src/ADBMS_LL_Driver.c **** //x^15 + x^14 + x^10 + x^8 + x^7 + x^4 + x^3 + 1
29:Core/Src/ADBMS_LL_Driver.c ****
30:Core/Src/ADBMS_LL_Driver.c **** uint8 calculateCommandPEC(uint8_t* data, uint8_t datalen) {
ARM GAS /tmp/cc6A08EU.s page 2
31:Core/Src/ADBMS_LL_Driver.c **** uint16 currentpec = INITIAL_COMMAND_PEC;
32:Core/Src/ADBMS_LL_Driver.c **** if (datalen >= 3) {
33:Core/Src/ADBMS_LL_Driver.c **** for (int i = 0; i < (datalen - 2); i++) {
34:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
35:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
36:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
37:Core/Src/ADBMS_LL_Driver.c **** }
38:Core/Src/ADBMS_LL_Driver.c **** }
39:Core/Src/ADBMS_LL_Driver.c ****
40:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 2] = (currentpec >> 7) & 0xFF;
41:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 1] = (currentpec << 1) & 0xFF;
42:Core/Src/ADBMS_LL_Driver.c **** return 0;
43:Core/Src/ADBMS_LL_Driver.c **** } else {
44:Core/Src/ADBMS_LL_Driver.c **** return 1;
45:Core/Src/ADBMS_LL_Driver.c **** }
46:Core/Src/ADBMS_LL_Driver.c **** }
47:Core/Src/ADBMS_LL_Driver.c ****
48:Core/Src/ADBMS_LL_Driver.c **** uint8 checkCommandPEC(uint8* data, uint8 datalen) {
49:Core/Src/ADBMS_LL_Driver.c **** if (datalen <= 3) {
50:Core/Src/ADBMS_LL_Driver.c **** return 255;
51:Core/Src/ADBMS_LL_Driver.c **** }
52:Core/Src/ADBMS_LL_Driver.c ****
53:Core/Src/ADBMS_LL_Driver.c **** uint16 currentpec = INITIAL_COMMAND_PEC;
54:Core/Src/ADBMS_LL_Driver.c ****
55:Core/Src/ADBMS_LL_Driver.c **** for (int i = 0; i < (datalen - 2); i++) {
56:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
57:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
58:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
59:Core/Src/ADBMS_LL_Driver.c **** }
60:Core/Src/ADBMS_LL_Driver.c **** }
61:Core/Src/ADBMS_LL_Driver.c ****
62:Core/Src/ADBMS_LL_Driver.c **** uint8 pechigh = (currentpec >> 7) & 0xFF;
63:Core/Src/ADBMS_LL_Driver.c **** uint8 peclow = (currentpec << 1) & 0xFF;
64:Core/Src/ADBMS_LL_Driver.c ****
65:Core/Src/ADBMS_LL_Driver.c **** if ((pechigh == data[datalen - 2]) && (peclow == data[datalen - 1])) {
66:Core/Src/ADBMS_LL_Driver.c **** return 0;
67:Core/Src/ADBMS_LL_Driver.c **** }
68:Core/Src/ADBMS_LL_Driver.c ****
69:Core/Src/ADBMS_LL_Driver.c **** return 1;
70:Core/Src/ADBMS_LL_Driver.c **** }
71:Core/Src/ADBMS_LL_Driver.c ****
72:Core/Src/ADBMS_LL_Driver.c **** uint16 updateCommandPEC(uint16 currentPEC, uint8 din) {
73:Core/Src/ADBMS_LL_Driver.c **** din = (din >> 7) & 0x01;
74:Core/Src/ADBMS_LL_Driver.c **** uint8 in0 = din ^ ((currentPEC >> 14) & 0x01);
75:Core/Src/ADBMS_LL_Driver.c **** uint8 in3 = in0 ^ ((currentPEC >> 2) & 0x01);
76:Core/Src/ADBMS_LL_Driver.c **** uint8 in4 = in0 ^ ((currentPEC >> 3) & 0x01);
77:Core/Src/ADBMS_LL_Driver.c **** uint8 in7 = in0 ^ ((currentPEC >> 6) & 0x01);
78:Core/Src/ADBMS_LL_Driver.c **** uint8 in8 = in0 ^ ((currentPEC >> 7) & 0x01);
79:Core/Src/ADBMS_LL_Driver.c **** uint8 in10 = in0 ^ ((currentPEC >> 9) & 0x01);
80:Core/Src/ADBMS_LL_Driver.c **** uint8 in14 = in0 ^ ((currentPEC >> 13) & 0x01);
81:Core/Src/ADBMS_LL_Driver.c ****
82:Core/Src/ADBMS_LL_Driver.c **** uint16 newPEC = 0;
83:Core/Src/ADBMS_LL_Driver.c ****
84:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in14 << 14;
85:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 12)) << 1;
86:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 11)) << 1;
87:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 10)) << 1;
ARM GAS /tmp/cc6A08EU.s page 3
88:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in10 << 10;
89:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 8)) << 1;
90:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in8 << 8;
91:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in7 << 7;
92:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 5)) << 1;
93:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 4)) << 1;
94:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in4 << 4;
95:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in3 << 3;
96:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 1)) << 1;
97:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01)) << 1;
98:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in0;
99:Core/Src/ADBMS_LL_Driver.c ****
100:Core/Src/ADBMS_LL_Driver.c **** return newPEC;
101:Core/Src/ADBMS_LL_Driver.c **** }
102:Core/Src/ADBMS_LL_Driver.c ****
103:Core/Src/ADBMS_LL_Driver.c **** //data PEC calculation
104:Core/Src/ADBMS_LL_Driver.c **** //CRC-10
105:Core/Src/ADBMS_LL_Driver.c **** //x^10 + x^7 + x^3 + x^2 + x + 1
106:Core/Src/ADBMS_LL_Driver.c ****
107:Core/Src/ADBMS_LL_Driver.c **** uint16_t pec10_calc(bool rx_cmd, int len, uint8_t* data) {
108:Core/Src/ADBMS_LL_Driver.c **** uint16_t remainder = 16; /* PEC_SEED; 0000010000 */
109:Core/Src/ADBMS_LL_Driver.c **** uint16_t polynom = 0x8F; /* x10 + x7 + x3 + x2 + x + 1 <- the CRC15 polynomial
110:Core/Src/ADBMS_LL_Driver.c **** 100 1000 1111 48F */
111:Core/Src/ADBMS_LL_Driver.c ****
112:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a byte at a time. */
113:Core/Src/ADBMS_LL_Driver.c **** for (uint8_t pbyte = 0; pbyte < len; ++pbyte) {
114:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
115:Core/Src/ADBMS_LL_Driver.c **** remainder ^= (uint16_t)(data[pbyte] << 2);
116:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time.*/
117:Core/Src/ADBMS_LL_Driver.c **** for (uint8_t bit_ = 8; bit_ > 0; --bit_) {
118:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
119:Core/Src/ADBMS_LL_Driver.c **** if ((remainder & 0x200) >
120:Core/Src/ADBMS_LL_Driver.c **** 0) // equivalent to remainder & 2^14 simply check for MSB
121:Core/Src/ADBMS_LL_Driver.c **** {
122:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)((remainder << 1));
123:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
124:Core/Src/ADBMS_LL_Driver.c **** } else {
125:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder << 1);
126:Core/Src/ADBMS_LL_Driver.c **** }
127:Core/Src/ADBMS_LL_Driver.c **** }
128:Core/Src/ADBMS_LL_Driver.c **** }
129:Core/Src/ADBMS_LL_Driver.c **** if (rx_cmd == true) {
130:Core/Src/ADBMS_LL_Driver.c **** remainder ^= (uint16_t)((data[len] & 0xFC) << 2);
131:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time */
132:Core/Src/ADBMS_LL_Driver.c **** for (uint8_t bit_ = 6; bit_ > 0; --bit_) {
133:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
134:Core/Src/ADBMS_LL_Driver.c **** if ((remainder & 0x200) >
135:Core/Src/ADBMS_LL_Driver.c **** 0) // equivalent to remainder & 2^14 simply check for MSB
136:Core/Src/ADBMS_LL_Driver.c **** {
137:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)((remainder << 1));
138:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
139:Core/Src/ADBMS_LL_Driver.c **** } else {
140:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)((remainder << 1));
141:Core/Src/ADBMS_LL_Driver.c **** }
142:Core/Src/ADBMS_LL_Driver.c **** }
143:Core/Src/ADBMS_LL_Driver.c **** }
144:Core/Src/ADBMS_LL_Driver.c **** return ((uint16_t)(remainder & 0x3FF));
ARM GAS /tmp/cc6A08EU.s page 4
145:Core/Src/ADBMS_LL_Driver.c **** }
146:Core/Src/ADBMS_LL_Driver.c ****
147:Core/Src/ADBMS_LL_Driver.c **** typedef uint16_t crc;
148:Core/Src/ADBMS_LL_Driver.c **** crc F_CRC_CalculaCheckSum(uint8_t const AF_Datos[], uint16_t VF_nBytes);
149:Core/Src/ADBMS_LL_Driver.c ****
150:Core/Src/ADBMS_LL_Driver.c **** uint8 calculateDataPEC(uint8_t* data, uint8_t datalen) {
151:Core/Src/ADBMS_LL_Driver.c ****
152:Core/Src/ADBMS_LL_Driver.c **** if (datalen >= 3) {
153:Core/Src/ADBMS_LL_Driver.c ****
154:Core/Src/ADBMS_LL_Driver.c ****
155:Core/Src/ADBMS_LL_Driver.c **** crc currentpec = pec10_calc(true, datalen - 2, data) & 0x3FF; // mask to 10 bits
156:Core/Src/ADBMS_LL_Driver.c ****
157:Core/Src/ADBMS_LL_Driver.c **** // memory layout is [[zeroes], PEC[9:8]], [PEC[7:0]]
158:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 2] = (currentpec >> 8) & 0xFF;
159:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 1] = currentpec & 0xFF;
160:Core/Src/ADBMS_LL_Driver.c ****
161:Core/Src/ADBMS_LL_Driver.c **** volatile uint8 result = pec10_calc(true, datalen, data);
162:Core/Src/ADBMS_LL_Driver.c ****
163:Core/Src/ADBMS_LL_Driver.c **** return 0;
164:Core/Src/ADBMS_LL_Driver.c **** } else {
165:Core/Src/ADBMS_LL_Driver.c **** return 1;
166:Core/Src/ADBMS_LL_Driver.c **** }
167:Core/Src/ADBMS_LL_Driver.c **** }
168:Core/Src/ADBMS_LL_Driver.c ****
169:Core/Src/ADBMS_LL_Driver.c **** uint8 checkDataPEC(uint8* data, uint8 len) {
170:Core/Src/ADBMS_LL_Driver.c **** if (len <= 2) {
171:Core/Src/ADBMS_LL_Driver.c **** return 255;
172:Core/Src/ADBMS_LL_Driver.c **** }
173:Core/Src/ADBMS_LL_Driver.c ****
174:Core/Src/ADBMS_LL_Driver.c **** crc currentpec = F_CRC_CalculaCheckSum(data, len);
175:Core/Src/ADBMS_LL_Driver.c ****
176:Core/Src/ADBMS_LL_Driver.c **** return (currentpec == 0) ? 0 : 1;
177:Core/Src/ADBMS_LL_Driver.c **** }
178:Core/Src/ADBMS_LL_Driver.c ****
179:Core/Src/ADBMS_LL_Driver.c ****
180:Core/Src/ADBMS_LL_Driver.c **** static crc F_CRC_ObtenValorDeTabla(uint8_t VP_Pos_Tabla) {
29 .loc 1 180 58 view -0
30 .cfi_startproc
31 @ args = 0, pretend = 0, frame = 0
32 @ frame_needed = 0, uses_anonymous_args = 0
33 @ link register save eliminated.
181:Core/Src/ADBMS_LL_Driver.c **** crc VP_CRCTableValue = 0;
34 .loc 1 181 3 view .LVU1
182:Core/Src/ADBMS_LL_Driver.c **** uint8_t VP_Pos_bit = 0;
35 .loc 1 182 3 view .LVU2
183:Core/Src/ADBMS_LL_Driver.c ****
184:Core/Src/ADBMS_LL_Driver.c **** VP_CRCTableValue = ((crc)(VP_Pos_Tabla)) << (10 - 8);
36 .loc 1 184 3 view .LVU3
37 .loc 1 184 20 is_stmt 0 view .LVU4
38 0000 8000 lsls r0, r0, #2
39 .LVL1:
185:Core/Src/ADBMS_LL_Driver.c ****
186:Core/Src/ADBMS_LL_Driver.c **** for (VP_Pos_bit = 0; VP_Pos_bit < 8; VP_Pos_bit++) {
40 .loc 1 186 3 is_stmt 1 view .LVU5
41 .loc 1 186 19 is_stmt 0 view .LVU6
42 0002 0023 movs r3, #0
43 .loc 1 186 3 view .LVU7
ARM GAS /tmp/cc6A08EU.s page 5
44 0004 03E0 b .L2
45 .LVL2:
46 .L3:
187:Core/Src/ADBMS_LL_Driver.c **** if (VP_CRCTableValue & (((crc)1) << (10 - 1))) {
188:Core/Src/ADBMS_LL_Driver.c **** VP_CRCTableValue = (VP_CRCTableValue << 1) ^ 0x8F;
189:Core/Src/ADBMS_LL_Driver.c **** } else {
190:Core/Src/ADBMS_LL_Driver.c **** VP_CRCTableValue = (VP_CRCTableValue << 1);
47 .loc 1 190 7 is_stmt 1 view .LVU8
48 .loc 1 190 24 is_stmt 0 view .LVU9
49 0006 4000 lsls r0, r0, #1
50 .LVL3:
51 .loc 1 190 24 view .LVU10
52 0008 80B2 uxth r0, r0
53 .LVL4:
54 .L4:
186:Core/Src/ADBMS_LL_Driver.c **** if (VP_CRCTableValue & (((crc)1) << (10 - 1))) {
55 .loc 1 186 50 is_stmt 1 discriminator 2 view .LVU11
56 000a 0133 adds r3, r3, #1
57 .LVL5:
186:Core/Src/ADBMS_LL_Driver.c **** if (VP_CRCTableValue & (((crc)1) << (10 - 1))) {
58 .loc 1 186 50 is_stmt 0 discriminator 2 view .LVU12
59 000c DBB2 uxtb r3, r3
60 .LVL6:
61 .L2:
186:Core/Src/ADBMS_LL_Driver.c **** if (VP_CRCTableValue & (((crc)1) << (10 - 1))) {
62 .loc 1 186 35 is_stmt 1 discriminator 1 view .LVU13
63 000e 072B cmp r3, #7
64 0010 07D8 bhi .L6
187:Core/Src/ADBMS_LL_Driver.c **** if (VP_CRCTableValue & (((crc)1) << (10 - 1))) {
65 .loc 1 187 5 view .LVU14
187:Core/Src/ADBMS_LL_Driver.c **** if (VP_CRCTableValue & (((crc)1) << (10 - 1))) {
66 .loc 1 187 8 is_stmt 0 view .LVU15
67 0012 10F4007F tst r0, #512
68 0016 F6D0 beq .L3
188:Core/Src/ADBMS_LL_Driver.c **** } else {
69 .loc 1 188 7 is_stmt 1 view .LVU16
188:Core/Src/ADBMS_LL_Driver.c **** } else {
70 .loc 1 188 50 is_stmt 0 view .LVU17
71 0018 4000 lsls r0, r0, #1
72 .LVL7:
188:Core/Src/ADBMS_LL_Driver.c **** } else {
73 .loc 1 188 50 view .LVU18
74 001a 80F08F00 eor r0, r0, #143
188:Core/Src/ADBMS_LL_Driver.c **** } else {
75 .loc 1 188 24 view .LVU19
76 001e 80B2 uxth r0, r0
77 .LVL8:
188:Core/Src/ADBMS_LL_Driver.c **** } else {
78 .loc 1 188 24 view .LVU20
79 0020 F3E7 b .L4
80 .L6:
191:Core/Src/ADBMS_LL_Driver.c **** }
192:Core/Src/ADBMS_LL_Driver.c **** }
193:Core/Src/ADBMS_LL_Driver.c **** return ((VP_CRCTableValue));
81 .loc 1 193 3 is_stmt 1 view .LVU21
194:Core/Src/ADBMS_LL_Driver.c **** }
82 .loc 1 194 1 is_stmt 0 view .LVU22
ARM GAS /tmp/cc6A08EU.s page 6
83 0022 7047 bx lr
84 .cfi_endproc
85 .LFE130:
87 .section .text.updateCommandPEC,"ax",%progbits
88 .align 1
89 .global updateCommandPEC
90 .syntax unified
91 .thumb
92 .thumb_func
94 updateCommandPEC:
95 .LVL9:
96 .LFB126:
72:Core/Src/ADBMS_LL_Driver.c **** din = (din >> 7) & 0x01;
97 .loc 1 72 55 is_stmt 1 view -0
98 .cfi_startproc
99 @ args = 0, pretend = 0, frame = 0
100 @ frame_needed = 0, uses_anonymous_args = 0
72:Core/Src/ADBMS_LL_Driver.c **** din = (din >> 7) & 0x01;
101 .loc 1 72 55 is_stmt 0 view .LVU24
102 0000 70B5 push {r4, r5, r6, lr}
103 .cfi_def_cfa_offset 16
104 .cfi_offset 4, -16
105 .cfi_offset 5, -12
106 .cfi_offset 6, -8
107 .cfi_offset 14, -4
73:Core/Src/ADBMS_LL_Driver.c **** uint8 in0 = din ^ ((currentPEC >> 14) & 0x01);
108 .loc 1 73 3 is_stmt 1 view .LVU25
109 .LVL10:
74:Core/Src/ADBMS_LL_Driver.c **** uint8 in3 = in0 ^ ((currentPEC >> 2) & 0x01);
110 .loc 1 74 3 view .LVU26
74:Core/Src/ADBMS_LL_Driver.c **** uint8 in3 = in0 ^ ((currentPEC >> 2) & 0x01);
111 .loc 1 74 41 is_stmt 0 view .LVU27
112 0002 C0F38032 ubfx r2, r0, #14, #1
74:Core/Src/ADBMS_LL_Driver.c **** uint8 in3 = in0 ^ ((currentPEC >> 2) & 0x01);
113 .loc 1 74 19 view .LVU28
114 0006 82EAD113 eor r3, r2, r1, lsr #7
74:Core/Src/ADBMS_LL_Driver.c **** uint8 in3 = in0 ^ ((currentPEC >> 2) & 0x01);
115 .loc 1 74 9 view .LVU29
116 000a 1946 mov r1, r3
117 .LVL11:
75:Core/Src/ADBMS_LL_Driver.c **** uint8 in4 = in0 ^ ((currentPEC >> 3) & 0x01);
118 .loc 1 75 3 is_stmt 1 view .LVU30
75:Core/Src/ADBMS_LL_Driver.c **** uint8 in4 = in0 ^ ((currentPEC >> 3) & 0x01);
119 .loc 1 75 40 is_stmt 0 view .LVU31
120 000c C0F38002 ubfx r2, r0, #2, #1
75:Core/Src/ADBMS_LL_Driver.c **** uint8 in4 = in0 ^ ((currentPEC >> 3) & 0x01);
121 .loc 1 75 9 view .LVU32
122 0010 5A40 eors r2, r2, r3
123 .LVL12:
76:Core/Src/ADBMS_LL_Driver.c **** uint8 in7 = in0 ^ ((currentPEC >> 6) & 0x01);
124 .loc 1 76 3 is_stmt 1 view .LVU33
76:Core/Src/ADBMS_LL_Driver.c **** uint8 in7 = in0 ^ ((currentPEC >> 6) & 0x01);
125 .loc 1 76 40 is_stmt 0 view .LVU34
126 0012 C0F3C00C ubfx ip, r0, #3, #1
76:Core/Src/ADBMS_LL_Driver.c **** uint8 in7 = in0 ^ ((currentPEC >> 6) & 0x01);
127 .loc 1 76 9 view .LVU35
128 0016 83EA0C0C eor ip, r3, ip
ARM GAS /tmp/cc6A08EU.s page 7
129 .LVL13:
77:Core/Src/ADBMS_LL_Driver.c **** uint8 in8 = in0 ^ ((currentPEC >> 7) & 0x01);
130 .loc 1 77 3 is_stmt 1 view .LVU36
77:Core/Src/ADBMS_LL_Driver.c **** uint8 in8 = in0 ^ ((currentPEC >> 7) & 0x01);
131 .loc 1 77 40 is_stmt 0 view .LVU37
132 001a C0F3801E ubfx lr, r0, #6, #1
77:Core/Src/ADBMS_LL_Driver.c **** uint8 in8 = in0 ^ ((currentPEC >> 7) & 0x01);
133 .loc 1 77 9 view .LVU38
134 001e 83EA0E0E eor lr, r3, lr
135 .LVL14:
78:Core/Src/ADBMS_LL_Driver.c **** uint8 in10 = in0 ^ ((currentPEC >> 9) & 0x01);
136 .loc 1 78 3 is_stmt 1 view .LVU39
78:Core/Src/ADBMS_LL_Driver.c **** uint8 in10 = in0 ^ ((currentPEC >> 9) & 0x01);
137 .loc 1 78 40 is_stmt 0 view .LVU40
138 0022 C0F3C014 ubfx r4, r0, #7, #1
78:Core/Src/ADBMS_LL_Driver.c **** uint8 in10 = in0 ^ ((currentPEC >> 9) & 0x01);
139 .loc 1 78 9 view .LVU41
140 0026 5C40 eors r4, r4, r3
141 .LVL15:
79:Core/Src/ADBMS_LL_Driver.c **** uint8 in14 = in0 ^ ((currentPEC >> 13) & 0x01);
142 .loc 1 79 3 is_stmt 1 view .LVU42
79:Core/Src/ADBMS_LL_Driver.c **** uint8 in14 = in0 ^ ((currentPEC >> 13) & 0x01);
143 .loc 1 79 41 is_stmt 0 view .LVU43
144 0028 C0F34025 ubfx r5, r0, #9, #1
79:Core/Src/ADBMS_LL_Driver.c **** uint8 in14 = in0 ^ ((currentPEC >> 13) & 0x01);
145 .loc 1 79 9 view .LVU44
146 002c 5D40 eors r5, r5, r3
147 .LVL16:
80:Core/Src/ADBMS_LL_Driver.c ****
148 .loc 1 80 3 is_stmt 1 view .LVU45
80:Core/Src/ADBMS_LL_Driver.c ****
149 .loc 1 80 42 is_stmt 0 view .LVU46
150 002e C0F34036 ubfx r6, r0, #13, #1
151 .LVL17:
82:Core/Src/ADBMS_LL_Driver.c ****
152 .loc 1 82 3 is_stmt 1 view .LVU47
84:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 12)) << 1;
153 .loc 1 84 3 view .LVU48
84:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 12)) << 1;
154 .loc 1 84 10 is_stmt 0 view .LVU49
155 0032 5E40 eors r6, r6, r3
156 .LVL18:
85:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 11)) << 1;
157 .loc 1 85 3 is_stmt 1 view .LVU50
85:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 11)) << 1;
158 .loc 1 85 41 is_stmt 0 view .LVU51
159 0034 4000 lsls r0, r0, #1
160 .LVL19:
85:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 11)) << 1;
161 .loc 1 85 41 view .LVU52
162 0036 00F40053 and r3, r0, #8192
163 .LVL20:
85:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 11)) << 1;
164 .loc 1 85 10 view .LVU53
165 003a 43EA8633 orr r3, r3, r6, lsl #14
166 .LVL21:
86:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 10)) << 1;
ARM GAS /tmp/cc6A08EU.s page 8
167 .loc 1 86 3 is_stmt 1 view .LVU54
86:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 10)) << 1;
168 .loc 1 86 41 is_stmt 0 view .LVU55
169 003e 00F48056 and r6, r0, #4096
170 .LVL22:
86:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 10)) << 1;
171 .loc 1 86 10 view .LVU56
172 0042 3343 orrs r3, r3, r6
173 .LVL23:
86:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 10)) << 1;
174 .loc 1 86 10 view .LVU57
175 0044 1BB2 sxth r3, r3
176 .LVL24:
87:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in10 << 10;
177 .loc 1 87 3 is_stmt 1 view .LVU58
87:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in10 << 10;
178 .loc 1 87 41 is_stmt 0 view .LVU59
179 0046 00F40066 and r6, r0, #2048
87:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in10 << 10;
180 .loc 1 87 10 view .LVU60
181 004a 3343 orrs r3, r3, r6
182 .LVL25:
88:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 8)) << 1;
183 .loc 1 88 3 is_stmt 1 view .LVU61
88:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 8)) << 1;
184 .loc 1 88 10 is_stmt 0 view .LVU62
185 004c 43EA8523 orr r3, r3, r5, lsl #10
186 .LVL26:
89:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in8 << 8;
187 .loc 1 89 3 is_stmt 1 view .LVU63
89:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in8 << 8;
188 .loc 1 89 40 is_stmt 0 view .LVU64
189 0050 00F40075 and r5, r0, #512
190 .LVL27:
89:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in8 << 8;
191 .loc 1 89 10 view .LVU65
192 0054 2B43 orrs r3, r3, r5
193 .LVL28:
89:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in8 << 8;
194 .loc 1 89 10 view .LVU66
195 0056 1BB2 sxth r3, r3
196 .LVL29:
90:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in7 << 7;
197 .loc 1 90 3 is_stmt 1 view .LVU67
90:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in7 << 7;
198 .loc 1 90 10 is_stmt 0 view .LVU68
199 0058 43EA0423 orr r3, r3, r4, lsl #8
200 .LVL30:
91:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 5)) << 1;
201 .loc 1 91 3 is_stmt 1 view .LVU69
91:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 5)) << 1;
202 .loc 1 91 10 is_stmt 0 view .LVU70
203 005c 43EACE13 orr r3, r3, lr, lsl #7
204 .LVL31:
92:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 4)) << 1;
205 .loc 1 92 3 is_stmt 1 view .LVU71
92:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 4)) << 1;
ARM GAS /tmp/cc6A08EU.s page 9
206 .loc 1 92 40 is_stmt 0 view .LVU72
207 0060 00F04004 and r4, r0, #64
208 .LVL32:
92:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 4)) << 1;
209 .loc 1 92 10 view .LVU73
210 0064 2343 orrs r3, r3, r4
211 .LVL33:
92:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 4)) << 1;
212 .loc 1 92 10 view .LVU74
213 0066 1BB2 sxth r3, r3
214 .LVL34:
93:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in4 << 4;
215 .loc 1 93 3 is_stmt 1 view .LVU75
93:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in4 << 4;
216 .loc 1 93 40 is_stmt 0 view .LVU76
217 0068 00F02004 and r4, r0, #32
93:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in4 << 4;
218 .loc 1 93 10 view .LVU77
219 006c 2343 orrs r3, r3, r4
220 .LVL35:
94:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in3 << 3;
221 .loc 1 94 3 is_stmt 1 view .LVU78
94:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in3 << 3;
222 .loc 1 94 10 is_stmt 0 view .LVU79
223 006e 43EA0C13 orr r3, r3, ip, lsl #4
224 .LVL36:
95:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 1)) << 1;
225 .loc 1 95 3 is_stmt 1 view .LVU80
95:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 1)) << 1;
226 .loc 1 95 10 is_stmt 0 view .LVU81
227 0072 43EAC203 orr r3, r3, r2, lsl #3
228 .LVL37:
96:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01)) << 1;
229 .loc 1 96 3 is_stmt 1 view .LVU82
96:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01)) << 1;
230 .loc 1 96 40 is_stmt 0 view .LVU83
231 0076 00F00402 and r2, r0, #4
232 .LVL38:
96:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01)) << 1;
233 .loc 1 96 10 view .LVU84
234 007a 1343 orrs r3, r3, r2
235 .LVL39:
96:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01)) << 1;
236 .loc 1 96 10 view .LVU85
237 007c 1BB2 sxth r3, r3
238 .LVL40:
97:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in0;
239 .loc 1 97 3 is_stmt 1 view .LVU86
97:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in0;
240 .loc 1 97 35 is_stmt 0 view .LVU87
241 007e 00F00200 and r0, r0, #2
97:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in0;
242 .loc 1 97 10 view .LVU88
243 0082 0343 orrs r3, r3, r0
244 .LVL41:
97:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in0;
245 .loc 1 97 10 view .LVU89
ARM GAS /tmp/cc6A08EU.s page 10
246 0084 9BB2 uxth r3, r3
247 .LVL42:
98:Core/Src/ADBMS_LL_Driver.c ****
248 .loc 1 98 3 is_stmt 1 view .LVU90
100:Core/Src/ADBMS_LL_Driver.c **** }
249 .loc 1 100 3 view .LVU91
101:Core/Src/ADBMS_LL_Driver.c ****
250 .loc 1 101 1 is_stmt 0 view .LVU92
251 0086 41EA0300 orr r0, r1, r3
252 .LVL43:
101:Core/Src/ADBMS_LL_Driver.c ****
253 .loc 1 101 1 view .LVU93
254 008a 70BD pop {r4, r5, r6, pc}
255 .cfi_endproc
256 .LFE126:
258 .section .text.calculateCommandPEC,"ax",%progbits
259 .align 1
260 .global calculateCommandPEC
261 .syntax unified
262 .thumb
263 .thumb_func
265 calculateCommandPEC:
266 .LVL44:
267 .LFB124:
30:Core/Src/ADBMS_LL_Driver.c **** uint16 currentpec = INITIAL_COMMAND_PEC;
268 .loc 1 30 59 is_stmt 1 view -0
269 .cfi_startproc
270 @ args = 0, pretend = 0, frame = 0
271 @ frame_needed = 0, uses_anonymous_args = 0
31:Core/Src/ADBMS_LL_Driver.c **** if (datalen >= 3) {
272 .loc 1 31 3 view .LVU95
32:Core/Src/ADBMS_LL_Driver.c **** for (int i = 0; i < (datalen - 2); i++) {
273 .loc 1 32 3 view .LVU96
32:Core/Src/ADBMS_LL_Driver.c **** for (int i = 0; i < (datalen - 2); i++) {
274 .loc 1 32 6 is_stmt 0 view .LVU97
275 0000 0229 cmp r1, #2
276 0002 0FD8 bhi .L14
44:Core/Src/ADBMS_LL_Driver.c **** }
277 .loc 1 44 12 view .LVU98
278 0004 0120 movs r0, #1
279 .LVL45:
46:Core/Src/ADBMS_LL_Driver.c ****
280 .loc 1 46 1 view .LVU99
281 0006 7047 bx lr
282 .LVL46:
283 .L12:
284 .cfi_def_cfa_offset 24
285 .cfi_offset 3, -24
286 .cfi_offset 4, -20
287 .cfi_offset 5, -16
288 .cfi_offset 6, -12
289 .cfi_offset 7, -8
290 .cfi_offset 14, -4
291 .LBB2:
292 .LBB3:
293 .LBB4:
35:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
ARM GAS /tmp/cc6A08EU.s page 11
294 .loc 1 35 9 is_stmt 1 view .LVU100
35:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
295 .loc 1 35 25 is_stmt 0 view .LVU101
296 0008 715D ldrb r1, [r6, r5] @ zero_extendqisi2
35:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
297 .loc 1 35 29 view .LVU102
298 000a A140 lsls r1, r1, r4
299 .LVL47:
36:Core/Src/ADBMS_LL_Driver.c **** }
300 .loc 1 36 9 is_stmt 1 view .LVU103
36:Core/Src/ADBMS_LL_Driver.c **** }
301 .loc 1 36 22 is_stmt 0 view .LVU104
302 000c C9B2 uxtb r1, r1
36:Core/Src/ADBMS_LL_Driver.c **** }
303 .loc 1 36 22 view .LVU105
304 000e FFF7FEFF bl updateCommandPEC
305 .LVL48:
36:Core/Src/ADBMS_LL_Driver.c **** }
306 .loc 1 36 22 view .LVU106
307 .LBE4:
34:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
308 .loc 1 34 31 is_stmt 1 discriminator 3 view .LVU107
309 0012 0134 adds r4, r4, #1
310 .LVL49:
311 .L13:
34:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
312 .loc 1 34 25 discriminator 1 view .LVU108
313 0014 072C cmp r4, #7
314 0016 F7DD ble .L12
34:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
315 .loc 1 34 25 is_stmt 0 discriminator 1 view .LVU109
316 .LBE3:
33:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
317 .loc 1 33 41 is_stmt 1 discriminator 2 view .LVU110
318 0018 0135 adds r5, r5, #1
319 .LVL50:
320 .L10:
33:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
321 .loc 1 33 23 discriminator 1 view .LVU111
33:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
322 .loc 1 33 34 is_stmt 0 discriminator 1 view .LVU112
323 001a BB1E subs r3, r7, #2
33:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
324 .loc 1 33 23 discriminator 1 view .LVU113
325 001c AB42 cmp r3, r5
326 001e 07DD ble .L19
327 .LBB5:
34:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
328 .loc 1 34 16 view .LVU114
329 0020 0024 movs r4, #0
330 0022 F7E7 b .L13
331 .LVL51:
332 .L14:
333 .cfi_def_cfa_offset 0
334 .cfi_restore 3
335 .cfi_restore 4
336 .cfi_restore 5
ARM GAS /tmp/cc6A08EU.s page 12
337 .cfi_restore 6
338 .cfi_restore 7
339 .cfi_restore 14
34:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
340 .loc 1 34 16 view .LVU115
341 .LBE5:
342 .LBE2:
30:Core/Src/ADBMS_LL_Driver.c **** uint16 currentpec = INITIAL_COMMAND_PEC;
343 .loc 1 30 59 view .LVU116
344 0024 F8B5 push {r3, r4, r5, r6, r7, lr}
345 .cfi_def_cfa_offset 24
346 .cfi_offset 3, -24
347 .cfi_offset 4, -20
348 .cfi_offset 5, -16
349 .cfi_offset 6, -12
350 .cfi_offset 7, -8
351 .cfi_offset 14, -4
352 0026 0646 mov r6, r0
353 0028 0F46 mov r7, r1
354 .LBB6:
33:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
355 .loc 1 33 14 view .LVU117
356 002a 0025 movs r5, #0
357 .LBE6:
31:Core/Src/ADBMS_LL_Driver.c **** if (datalen >= 3) {
358 .loc 1 31 10 view .LVU118
359 002c 1020 movs r0, #16
360 .LVL52:
31:Core/Src/ADBMS_LL_Driver.c **** if (datalen >= 3) {
361 .loc 1 31 10 view .LVU119
362 002e F4E7 b .L10
363 .LVL53:
364 .L19:
40:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 1] = (currentpec << 1) & 0xFF;
365 .loc 1 40 5 is_stmt 1 view .LVU120
40:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 1] = (currentpec << 1) & 0xFF;
366 .loc 1 40 23 is_stmt 0 view .LVU121
367 0030 C209 lsrs r2, r0, #7
368 0032 F254 strb r2, [r6, r3]
41:Core/Src/ADBMS_LL_Driver.c **** return 0;
369 .loc 1 41 5 is_stmt 1 view .LVU122
41:Core/Src/ADBMS_LL_Driver.c **** return 0;
370 .loc 1 41 9 is_stmt 0 view .LVU123
371 0034 013F subs r7, r7, #1
41:Core/Src/ADBMS_LL_Driver.c **** return 0;
372 .loc 1 41 23 view .LVU124
373 0036 4300 lsls r3, r0, #1
374 0038 F355 strb r3, [r6, r7]
42:Core/Src/ADBMS_LL_Driver.c **** } else {
375 .loc 1 42 5 is_stmt 1 view .LVU125
42:Core/Src/ADBMS_LL_Driver.c **** } else {
376 .loc 1 42 12 is_stmt 0 view .LVU126
377 003a 0020 movs r0, #0
378 .LVL54:
46:Core/Src/ADBMS_LL_Driver.c ****
379 .loc 1 46 1 view .LVU127
380 003c F8BD pop {r3, r4, r5, r6, r7, pc}
ARM GAS /tmp/cc6A08EU.s page 13
46:Core/Src/ADBMS_LL_Driver.c ****
381 .loc 1 46 1 view .LVU128
382 .cfi_endproc
383 .LFE124:
385 .section .text.checkCommandPEC,"ax",%progbits
386 .align 1
387 .global checkCommandPEC
388 .syntax unified
389 .thumb
390 .thumb_func
392 checkCommandPEC:
393 .LVL55:
394 .LFB125:
48:Core/Src/ADBMS_LL_Driver.c **** if (datalen <= 3) {
395 .loc 1 48 51 is_stmt 1 view -0
396 .cfi_startproc
397 @ args = 0, pretend = 0, frame = 0
398 @ frame_needed = 0, uses_anonymous_args = 0
49:Core/Src/ADBMS_LL_Driver.c **** return 255;
399 .loc 1 49 3 view .LVU130
49:Core/Src/ADBMS_LL_Driver.c **** return 255;
400 .loc 1 49 6 is_stmt 0 view .LVU131
401 0000 0329 cmp r1, #3
402 0002 25D9 bls .L25
48:Core/Src/ADBMS_LL_Driver.c **** if (datalen <= 3) {
403 .loc 1 48 51 view .LVU132
404 0004 F8B5 push {r3, r4, r5, r6, r7, lr}
405 .cfi_def_cfa_offset 24
406 .cfi_offset 3, -24
407 .cfi_offset 4, -20
408 .cfi_offset 5, -16
409 .cfi_offset 6, -12
410 .cfi_offset 7, -8
411 .cfi_offset 14, -4
412 0006 0546 mov r5, r0
413 0008 0E46 mov r6, r1
414 .LBB7:
55:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
415 .loc 1 55 12 view .LVU133
416 000a 0027 movs r7, #0
417 .LBE7:
53:Core/Src/ADBMS_LL_Driver.c ****
418 .loc 1 53 10 view .LVU134
419 000c 1020 movs r0, #16
420 .LVL56:
53:Core/Src/ADBMS_LL_Driver.c ****
421 .loc 1 53 10 view .LVU135
422 000e 08E0 b .L22
423 .LVL57:
424 .L23:
425 .LBB11:
426 .LBB8:
427 .LBB9:
57:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
428 .loc 1 57 7 is_stmt 1 view .LVU136
57:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
429 .loc 1 57 23 is_stmt 0 view .LVU137
ARM GAS /tmp/cc6A08EU.s page 14
430 0010 E95D ldrb r1, [r5, r7] @ zero_extendqisi2
57:Core/Src/ADBMS_LL_Driver.c **** currentpec = updateCommandPEC(currentpec, din);
431 .loc 1 57 27 view .LVU138
432 0012 A140 lsls r1, r1, r4
433 .LVL58:
58:Core/Src/ADBMS_LL_Driver.c **** }
434 .loc 1 58 7 is_stmt 1 view .LVU139
58:Core/Src/ADBMS_LL_Driver.c **** }
435 .loc 1 58 20 is_stmt 0 view .LVU140
436 0014 C9B2 uxtb r1, r1
58:Core/Src/ADBMS_LL_Driver.c **** }
437 .loc 1 58 20 view .LVU141
438 0016 FFF7FEFF bl updateCommandPEC
439 .LVL59:
58:Core/Src/ADBMS_LL_Driver.c **** }
440 .loc 1 58 20 view .LVU142
441 .LBE9:
56:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
442 .loc 1 56 29 is_stmt 1 discriminator 3 view .LVU143
443 001a 0134 adds r4, r4, #1
444 .LVL60:
445 .L24:
56:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
446 .loc 1 56 23 discriminator 1 view .LVU144
447 001c 072C cmp r4, #7
448 001e F7DD ble .L23
56:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
449 .loc 1 56 23 is_stmt 0 discriminator 1 view .LVU145
450 .LBE8:
55:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
451 .loc 1 55 39 is_stmt 1 discriminator 2 view .LVU146
452 0020 0137 adds r7, r7, #1
453 .LVL61:
454 .L22:
55:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
455 .loc 1 55 21 discriminator 1 view .LVU147
55:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
456 .loc 1 55 32 is_stmt 0 discriminator 1 view .LVU148
457 0022 B31E subs r3, r6, #2
55:Core/Src/ADBMS_LL_Driver.c **** for (int n = 0; n < 8; n++) {
458 .loc 1 55 21 discriminator 1 view .LVU149
459 0024 BB42 cmp r3, r7
460 0026 01DD ble .L33
461 .LBB10:
56:Core/Src/ADBMS_LL_Driver.c **** uint8 din = data[i] << (n);
462 .loc 1 56 14 view .LVU150
463 0028 0024 movs r4, #0
464 002a F7E7 b .L24
465 .L33:
466 .LBE10:
467 .LBE11:
62:Core/Src/ADBMS_LL_Driver.c **** uint8 peclow = (currentpec << 1) & 0xFF;
468 .loc 1 62 3 is_stmt 1 view .LVU151
62:Core/Src/ADBMS_LL_Driver.c **** uint8 peclow = (currentpec << 1) & 0xFF;
469 .loc 1 62 9 is_stmt 0 view .LVU152
470 002c C0F3C712 ubfx r2, r0, #7, #8
471 .LVL62:
ARM GAS /tmp/cc6A08EU.s page 15
63:Core/Src/ADBMS_LL_Driver.c ****
472 .loc 1 63 3 is_stmt 1 view .LVU153
63:Core/Src/ADBMS_LL_Driver.c ****
473 .loc 1 63 9 is_stmt 0 view .LVU154
474 0030 4300 lsls r3, r0, #1
475 0032 DBB2 uxtb r3, r3
476 .LVL63:
65:Core/Src/ADBMS_LL_Driver.c **** return 0;
477 .loc 1 65 3 is_stmt 1 view .LVU155
65:Core/Src/ADBMS_LL_Driver.c **** return 0;
478 .loc 1 65 23 is_stmt 0 view .LVU156
479 0034 A919 adds r1, r5, r6
480 0036 11F8021C ldrb r1, [r1, #-2] @ zero_extendqisi2
65:Core/Src/ADBMS_LL_Driver.c **** return 0;
481 .loc 1 65 6 view .LVU157
482 003a 9142 cmp r1, r2
483 003c 01D0 beq .L34
69:Core/Src/ADBMS_LL_Driver.c **** }
484 .loc 1 69 10 view .LVU158
485 003e 0120 movs r0, #1
486 .LVL64:
487 .L21:
70:Core/Src/ADBMS_LL_Driver.c ****
488 .loc 1 70 1 view .LVU159
489 0040 F8BD pop {r3, r4, r5, r6, r7, pc}
490 .LVL65:
491 .L34:
65:Core/Src/ADBMS_LL_Driver.c **** return 0;
492 .loc 1 65 56 discriminator 1 view .LVU160
493 0042 3544 add r5, r5, r6
494 .LVL66:
65:Core/Src/ADBMS_LL_Driver.c **** return 0;
495 .loc 1 65 56 discriminator 1 view .LVU161
496 0044 15F8012C ldrb r2, [r5, #-1] @ zero_extendqisi2
497 .LVL67:
65:Core/Src/ADBMS_LL_Driver.c **** return 0;
498 .loc 1 65 38 discriminator 1 view .LVU162
499 0048 9A42 cmp r2, r3
500 004a 03D0 beq .L28
69:Core/Src/ADBMS_LL_Driver.c **** }
501 .loc 1 69 10 view .LVU163
502 004c 0120 movs r0, #1
503 .LVL68:
69:Core/Src/ADBMS_LL_Driver.c **** }
504 .loc 1 69 10 view .LVU164
505 004e F7E7 b .L21
506 .LVL69:
507 .L25:
508 .cfi_def_cfa_offset 0
509 .cfi_restore 3
510 .cfi_restore 4
511 .cfi_restore 5
512 .cfi_restore 6
513 .cfi_restore 7
514 .cfi_restore 14
50:Core/Src/ADBMS_LL_Driver.c **** }
515 .loc 1 50 12 view .LVU165
ARM GAS /tmp/cc6A08EU.s page 16
516 0050 FF20 movs r0, #255
517 .LVL70:
70:Core/Src/ADBMS_LL_Driver.c ****
518 .loc 1 70 1 view .LVU166
519 0052 7047 bx lr
520 .LVL71:
521 .L28:
522 .cfi_def_cfa_offset 24
523 .cfi_offset 3, -24
524 .cfi_offset 4, -20
525 .cfi_offset 5, -16
526 .cfi_offset 6, -12
527 .cfi_offset 7, -8
528 .cfi_offset 14, -4
66:Core/Src/ADBMS_LL_Driver.c **** }
529 .loc 1 66 12 view .LVU167
530 0054 0020 movs r0, #0
531 .LVL72:
66:Core/Src/ADBMS_LL_Driver.c **** }
532 .loc 1 66 12 view .LVU168
533 0056 F3E7 b .L21
534 .cfi_endproc
535 .LFE125:
537 .section .text.pec10_calc,"ax",%progbits
538 .align 1
539 .global pec10_calc
540 .syntax unified
541 .thumb
542 .thumb_func
544 pec10_calc:
545 .LVL73:
546 .LFB127:
107:Core/Src/ADBMS_LL_Driver.c **** uint16_t remainder = 16; /* PEC_SEED; 0000010000 */
547 .loc 1 107 58 is_stmt 1 view -0
548 .cfi_startproc
549 @ args = 0, pretend = 0, frame = 0
550 @ frame_needed = 0, uses_anonymous_args = 0
107:Core/Src/ADBMS_LL_Driver.c **** uint16_t remainder = 16; /* PEC_SEED; 0000010000 */
551 .loc 1 107 58 is_stmt 0 view .LVU170
552 0000 10B5 push {r4, lr}
553 .cfi_def_cfa_offset 8
554 .cfi_offset 4, -8
555 .cfi_offset 14, -4
556 0002 0446 mov r4, r0
108:Core/Src/ADBMS_LL_Driver.c **** uint16_t polynom = 0x8F; /* x10 + x7 + x3 + x2 + x + 1 <- the CRC15 polynomial
557 .loc 1 108 3 is_stmt 1 view .LVU171
558 .LVL74:
109:Core/Src/ADBMS_LL_Driver.c **** 100 1000 1111 48F */
559 .loc 1 109 3 view .LVU172
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
560 .loc 1 113 3 view .LVU173
561 .LBB12:
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
562 .loc 1 113 8 view .LVU174
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
563 .loc 1 113 16 is_stmt 0 view .LVU175
564 0004 4FF0000C mov ip, #0
ARM GAS /tmp/cc6A08EU.s page 17
565 .LBE12:
108:Core/Src/ADBMS_LL_Driver.c **** uint16_t polynom = 0x8F; /* x10 + x7 + x3 + x2 + x + 1 <- the CRC15 polynomial
566 .loc 1 108 12 view .LVU176
567 0008 1023 movs r3, #16
568 .LBB15:
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
569 .loc 1 113 3 view .LVU177
570 000a 10E0 b .L36
571 .LVL75:
572 .L38:
573 .LBB13:
125:Core/Src/ADBMS_LL_Driver.c **** }
574 .loc 1 125 9 is_stmt 1 view .LVU178
125:Core/Src/ADBMS_LL_Driver.c **** }
575 .loc 1 125 19 is_stmt 0 view .LVU179
576 000c 5B00 lsls r3, r3, #1
577 .LVL76:
125:Core/Src/ADBMS_LL_Driver.c **** }
578 .loc 1 125 19 view .LVU180
579 000e 9BB2 uxth r3, r3
580 .LVL77:
581 .L39:
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
582 .loc 1 117 38 is_stmt 1 discriminator 2 view .LVU181
583 0010 0138 subs r0, r0, #1
584 .LVL78:
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
585 .loc 1 117 38 is_stmt 0 discriminator 2 view .LVU182
586 0012 C0B2 uxtb r0, r0
587 .LVL79:
588 .L37:
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
589 .loc 1 117 33 is_stmt 1 discriminator 1 view .LVU183
590 0014 38B1 cbz r0, .L48
119:Core/Src/ADBMS_LL_Driver.c **** 0) // equivalent to remainder & 2^14 simply check for MSB
591 .loc 1 119 7 view .LVU184
119:Core/Src/ADBMS_LL_Driver.c **** 0) // equivalent to remainder & 2^14 simply check for MSB
592 .loc 1 119 10 is_stmt 0 view .LVU185
593 0016 13F4007F tst r3, #512
594 001a F7D0 beq .L38
122:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
595 .loc 1 122 9 is_stmt 1 view .LVU186
122:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
596 .loc 1 122 19 is_stmt 0 view .LVU187
597 001c 5B00 lsls r3, r3, #1
598 .LVL80:
122:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
599 .loc 1 122 19 view .LVU188
600 001e 9BB2 uxth r3, r3
601 .LVL81:
123:Core/Src/ADBMS_LL_Driver.c **** } else {
602 .loc 1 123 9 is_stmt 1 view .LVU189
123:Core/Src/ADBMS_LL_Driver.c **** } else {
603 .loc 1 123 19 is_stmt 0 view .LVU190
604 0020 83F08F03 eor r3, r3, #143
605 .LVL82:
123:Core/Src/ADBMS_LL_Driver.c **** } else {
ARM GAS /tmp/cc6A08EU.s page 18
606 .loc 1 123 19 view .LVU191
607 0024 F4E7 b .L39
608 .L48:
123:Core/Src/ADBMS_LL_Driver.c **** } else {
609 .loc 1 123 19 view .LVU192
610 .LBE13:
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
611 .loc 1 113 40 is_stmt 1 discriminator 2 view .LVU193
612 0026 0CF1010C add ip, ip, #1
613 .LVL83:
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
614 .loc 1 113 40 is_stmt 0 discriminator 2 view .LVU194
615 002a 5FFA8CFC uxtb ip, ip
616 .LVL84:
617 .L36:
113:Core/Src/ADBMS_LL_Driver.c **** /* Bring the next byte into the remainder. */
618 .loc 1 113 33 is_stmt 1 discriminator 1 view .LVU195
619 002e 8C45 cmp ip, r1
620 0030 05DA bge .L49
115:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time.*/
621 .loc 1 115 5 view .LVU196
115:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time.*/
622 .loc 1 115 33 is_stmt 0 view .LVU197
623 0032 12F80CE0 ldrb lr, [r2, ip] @ zero_extendqisi2
115:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time.*/
624 .loc 1 115 15 view .LVU198
625 0036 83EA8E03 eor r3, r3, lr, lsl #2
626 .LVL85:
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
627 .loc 1 117 5 is_stmt 1 view .LVU199
628 .LBB14:
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
629 .loc 1 117 10 view .LVU200
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
630 .loc 1 117 18 is_stmt 0 view .LVU201
631 003a 0820 movs r0, #8
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
632 .loc 1 117 5 view .LVU202
633 003c EAE7 b .L37
634 .LVL86:
635 .L49:
117:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit. */
636 .loc 1 117 5 view .LVU203
637 .LBE14:
638 .LBE15:
129:Core/Src/ADBMS_LL_Driver.c **** remainder ^= (uint16_t)((data[len] & 0xFC) << 2);
639 .loc 1 129 3 is_stmt 1 view .LVU204
129:Core/Src/ADBMS_LL_Driver.c **** remainder ^= (uint16_t)((data[len] & 0xFC) << 2);
640 .loc 1 129 6 is_stmt 0 view .LVU205
641 003e 9CB1 cbz r4, .L42
130:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time */
642 .loc 1 130 5 is_stmt 1 view .LVU206
130:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time */
643 .loc 1 130 34 is_stmt 0 view .LVU207
644 0040 525C ldrb r2, [r2, r1] @ zero_extendqisi2
645 .LVL87:
130:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time */
ARM GAS /tmp/cc6A08EU.s page 19
646 .loc 1 130 48 view .LVU208
647 0042 9200 lsls r2, r2, #2
130:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time */
648 .loc 1 130 18 view .LVU209
649 0044 02F47C72 and r2, r2, #1008
130:Core/Src/ADBMS_LL_Driver.c **** /* Perform modulo-2 division, a bit at a time */
650 .loc 1 130 15 view .LVU210
651 0048 5340 eors r3, r3, r2
652 .LVL88:
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
653 .loc 1 132 5 is_stmt 1 view .LVU211
654 .LBB16:
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
655 .loc 1 132 10 view .LVU212
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
656 .loc 1 132 18 is_stmt 0 view .LVU213
657 004a 0622 movs r2, #6
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
658 .loc 1 132 5 view .LVU214
659 004c 03E0 b .L43
660 .LVL89:
661 .L44:
140:Core/Src/ADBMS_LL_Driver.c **** }
662 .loc 1 140 9 is_stmt 1 view .LVU215
140:Core/Src/ADBMS_LL_Driver.c **** }
663 .loc 1 140 19 is_stmt 0 view .LVU216
664 004e 5B00 lsls r3, r3, #1
665 .LVL90:
140:Core/Src/ADBMS_LL_Driver.c **** }
666 .loc 1 140 19 view .LVU217
667 0050 9BB2 uxth r3, r3
668 .LVL91:
669 .L45:
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
670 .loc 1 132 38 is_stmt 1 discriminator 2 view .LVU218
671 0052 013A subs r2, r2, #1
672 .LVL92:
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
673 .loc 1 132 38 is_stmt 0 discriminator 2 view .LVU219
674 0054 D2B2 uxtb r2, r2
675 .LVL93:
676 .L43:
132:Core/Src/ADBMS_LL_Driver.c **** /* Try to divide the current data bit */
677 .loc 1 132 33 is_stmt 1 discriminator 1 view .LVU220
678 0056 3AB1 cbz r2, .L42
134:Core/Src/ADBMS_LL_Driver.c **** 0) // equivalent to remainder & 2^14 simply check for MSB
679 .loc 1 134 7 view .LVU221
134:Core/Src/ADBMS_LL_Driver.c **** 0) // equivalent to remainder & 2^14 simply check for MSB
680 .loc 1 134 10 is_stmt 0 view .LVU222
681 0058 13F4007F tst r3, #512
682 005c F7D0 beq .L44
137:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
683 .loc 1 137 9 is_stmt 1 view .LVU223
137:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
684 .loc 1 137 19 is_stmt 0 view .LVU224
685 005e 5B00 lsls r3, r3, #1
686 .LVL94:
ARM GAS /tmp/cc6A08EU.s page 20
137:Core/Src/ADBMS_LL_Driver.c **** remainder = (uint16_t)(remainder ^ polynom);
687 .loc 1 137 19 view .LVU225
688 0060 9BB2 uxth r3, r3
689 .LVL95:
138:Core/Src/ADBMS_LL_Driver.c **** } else {
690 .loc 1 138 9 is_stmt 1 view .LVU226
138:Core/Src/ADBMS_LL_Driver.c **** } else {
691 .loc 1 138 19 is_stmt 0 view .LVU227
692 0062 83F08F03 eor r3, r3, #143
693 .LVL96:
138:Core/Src/ADBMS_LL_Driver.c **** } else {
694 .loc 1 138 19 view .LVU228
695 0066 F4E7 b .L45
696 .LVL97:
697 .L42:
138:Core/Src/ADBMS_LL_Driver.c **** } else {
698 .loc 1 138 19 view .LVU229
699 .LBE16:
144:Core/Src/ADBMS_LL_Driver.c **** }
700 .loc 1 144 3 is_stmt 1 view .LVU230
145:Core/Src/ADBMS_LL_Driver.c ****
701 .loc 1 145 1 is_stmt 0 view .LVU231
702 0068 C3F30900 ubfx r0, r3, #0, #10
703 006c 10BD pop {r4, pc}
145:Core/Src/ADBMS_LL_Driver.c ****
704 .loc 1 145 1 view .LVU232
705 .cfi_endproc
706 .LFE127:
708 .section .text.calculateDataPEC,"ax",%progbits
709 .align 1
710 .global calculateDataPEC
711 .syntax unified
712 .thumb
713 .thumb_func
715 calculateDataPEC:
716 .LVL98:
717 .LFB128:
150:Core/Src/ADBMS_LL_Driver.c ****
718 .loc 1 150 56 is_stmt 1 view -0
719 .cfi_startproc
720 @ args = 0, pretend = 0, frame = 8
721 @ frame_needed = 0, uses_anonymous_args = 0
152:Core/Src/ADBMS_LL_Driver.c ****
722 .loc 1 152 3 view .LVU234
152:Core/Src/ADBMS_LL_Driver.c ****
723 .loc 1 152 6 is_stmt 0 view .LVU235
724 0000 0229 cmp r1, #2
725 0002 01D8 bhi .L57
165:Core/Src/ADBMS_LL_Driver.c **** }
726 .loc 1 165 12 view .LVU236
727 0004 0120 movs r0, #1
728 .LVL99:
167:Core/Src/ADBMS_LL_Driver.c ****
729 .loc 1 167 1 view .LVU237
730 0006 7047 bx lr
731 .LVL100:
732 .L57:
ARM GAS /tmp/cc6A08EU.s page 21
150:Core/Src/ADBMS_LL_Driver.c ****
733 .loc 1 150 56 view .LVU238
734 0008 70B5 push {r4, r5, r6, lr}
735 .cfi_def_cfa_offset 16
736 .cfi_offset 4, -16
737 .cfi_offset 5, -12
738 .cfi_offset 6, -8
739 .cfi_offset 14, -4
740 000a 82B0 sub sp, sp, #8
741 .cfi_def_cfa_offset 24
742 000c 0546 mov r5, r0
743 000e 0C46 mov r4, r1
744 .LBB17:
155:Core/Src/ADBMS_LL_Driver.c ****
745 .loc 1 155 5 is_stmt 1 view .LVU239
155:Core/Src/ADBMS_LL_Driver.c ****
746 .loc 1 155 22 is_stmt 0 view .LVU240
747 0010 8E1E subs r6, r1, #2
748 0012 0246 mov r2, r0
749 0014 3146 mov r1, r6
750 .LVL101:
155:Core/Src/ADBMS_LL_Driver.c ****
751 .loc 1 155 22 view .LVU241
752 0016 0120 movs r0, #1
753 .LVL102:
155:Core/Src/ADBMS_LL_Driver.c ****
754 .loc 1 155 22 view .LVU242
755 0018 FFF7FEFF bl pec10_calc
756 .LVL103:
158:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 1] = currentpec & 0xFF;
757 .loc 1 158 5 is_stmt 1 view .LVU243
158:Core/Src/ADBMS_LL_Driver.c **** data[datalen - 1] = currentpec & 0xFF;
758 .loc 1 158 23 is_stmt 0 view .LVU244
759 001c C0F30123 ubfx r3, r0, #8, #2
760 0020 AB55 strb r3, [r5, r6]
159:Core/Src/ADBMS_LL_Driver.c ****
761 .loc 1 159 5 is_stmt 1 view .LVU245
159:Core/Src/ADBMS_LL_Driver.c ****
762 .loc 1 159 9 is_stmt 0 view .LVU246
763 0022 631E subs r3, r4, #1
159:Core/Src/ADBMS_LL_Driver.c ****
764 .loc 1 159 23 view .LVU247
765 0024 E854 strb r0, [r5, r3]
161:Core/Src/ADBMS_LL_Driver.c ****
766 .loc 1 161 5 is_stmt 1 view .LVU248
161:Core/Src/ADBMS_LL_Driver.c ****
767 .loc 1 161 29 is_stmt 0 view .LVU249
768 0026 2A46 mov r2, r5
769 0028 2146 mov r1, r4
770 002a 0120 movs r0, #1
771 .LVL104:
161:Core/Src/ADBMS_LL_Driver.c ****
772 .loc 1 161 29 view .LVU250
773 002c FFF7FEFF bl pec10_calc
774 .LVL105:
161:Core/Src/ADBMS_LL_Driver.c ****
775 .loc 1 161 20 discriminator 1 view .LVU251
ARM GAS /tmp/cc6A08EU.s page 22
776 0030 C0B2 uxtb r0, r0
777 0032 8DF80700 strb r0, [sp, #7]
163:Core/Src/ADBMS_LL_Driver.c **** } else {
778 .loc 1 163 5 is_stmt 1 view .LVU252
163:Core/Src/ADBMS_LL_Driver.c **** } else {
779 .loc 1 163 12 is_stmt 0 view .LVU253
780 0036 0020 movs r0, #0
781 .LBE17:
167:Core/Src/ADBMS_LL_Driver.c ****
782 .loc 1 167 1 view .LVU254
783 0038 02B0 add sp, sp, #8
784 .cfi_def_cfa_offset 16
785 @ sp needed
786 003a 70BD pop {r4, r5, r6, pc}
167:Core/Src/ADBMS_LL_Driver.c ****
787 .loc 1 167 1 view .LVU255
788 .cfi_endproc
789 .LFE128:
791 .section .text.F_CRC_CalculaCheckSum,"ax",%progbits
792 .align 1
793 .global F_CRC_CalculaCheckSum
794 .syntax unified
795 .thumb
796 .thumb_func
798 F_CRC_CalculaCheckSum:
799 .LVL106:
800 .LFB131:
195:Core/Src/ADBMS_LL_Driver.c **** crc F_CRC_CalculaCheckSum(uint8_t const AF_Datos[], uint16_t VF_nBytes) {
801 .loc 1 195 73 is_stmt 1 view -0
802 .cfi_startproc
803 @ args = 0, pretend = 0, frame = 0
804 @ frame_needed = 0, uses_anonymous_args = 0
805 .loc 1 195 73 is_stmt 0 view .LVU257
806 0000 F8B5 push {r3, r4, r5, r6, r7, lr}
807 .cfi_def_cfa_offset 24
808 .cfi_offset 3, -24
809 .cfi_offset 4, -20
810 .cfi_offset 5, -16
811 .cfi_offset 6, -12
812 .cfi_offset 7, -8
813 .cfi_offset 14, -4
814 0002 0746 mov r7, r0
815 0004 0E46 mov r6, r1
196:Core/Src/ADBMS_LL_Driver.c **** crc VP_CRCTableValue = 16;
816 .loc 1 196 3 is_stmt 1 view .LVU258
817 .LVL107:
197:Core/Src/ADBMS_LL_Driver.c **** int16_t VP_bytes = 0;
818 .loc 1 197 3 view .LVU259
198:Core/Src/ADBMS_LL_Driver.c ****
199:Core/Src/ADBMS_LL_Driver.c **** for (VP_bytes = 0; VP_bytes < VF_nBytes; VP_bytes++) {
819 .loc 1 199 3 view .LVU260
820 .loc 1 199 17 is_stmt 0 view .LVU261
821 0006 0025 movs r5, #0
196:Core/Src/ADBMS_LL_Driver.c **** int16_t VP_bytes = 0;
822 .loc 1 196 7 view .LVU262
823 0008 1024 movs r4, #16
824 .loc 1 199 3 view .LVU263
ARM GAS /tmp/cc6A08EU.s page 23
825 000a 0BE0 b .L59
826 .LVL108:
827 .L60:
200:Core/Src/ADBMS_LL_Driver.c ****
201:Core/Src/ADBMS_LL_Driver.c **** VP_CRCTableValue = (VP_CRCTableValue << 8) ^
828 .loc 1 201 5 is_stmt 1 view .LVU264
202:Core/Src/ADBMS_LL_Driver.c **** F_CRC_ObtenValorDeTabla(
203:Core/Src/ADBMS_LL_Driver.c **** ((uint8_t)((VP_CRCTableValue >> (10 - 8)) & 0xFF)) ^
829 .loc 1 203 29 is_stmt 0 view .LVU265
830 000c C4F38700 ubfx r0, r4, #2, #8
204:Core/Src/ADBMS_LL_Driver.c **** AF_Datos[VP_bytes]);
831 .loc 1 204 36 view .LVU266
832 0010 7B5D ldrb r3, [r7, r5] @ zero_extendqisi2
202:Core/Src/ADBMS_LL_Driver.c **** F_CRC_ObtenValorDeTabla(
833 .loc 1 202 24 view .LVU267
834 0012 5840 eors r0, r0, r3
835 0014 FFF7FEFF bl F_CRC_ObtenValorDeTabla
836 .LVL109:
837 0018 2402 lsls r4, r4, #8
838 .LVL110:
202:Core/Src/ADBMS_LL_Driver.c **** F_CRC_ObtenValorDeTabla(
839 .loc 1 202 24 view .LVU268
840 001a A4B2 uxth r4, r4
201:Core/Src/ADBMS_LL_Driver.c **** F_CRC_ObtenValorDeTabla(
841 .loc 1 201 22 view .LVU269
842 001c 6040 eors r0, r0, r4
843 001e 84B2 uxth r4, r0
844 .LVL111:
199:Core/Src/ADBMS_LL_Driver.c ****
845 .loc 1 199 52 is_stmt 1 discriminator 3 view .LVU270
846 0020 0135 adds r5, r5, #1
847 .LVL112:
199:Core/Src/ADBMS_LL_Driver.c ****
848 .loc 1 199 52 is_stmt 0 discriminator 3 view .LVU271
849 0022 2DB2 sxth r5, r5
850 .LVL113:
851 .L59:
199:Core/Src/ADBMS_LL_Driver.c ****
852 .loc 1 199 31 is_stmt 1 discriminator 1 view .LVU272
853 0024 B542 cmp r5, r6
854 0026 F1DB blt .L60
205:Core/Src/ADBMS_LL_Driver.c **** }
206:Core/Src/ADBMS_LL_Driver.c ****
207:Core/Src/ADBMS_LL_Driver.c **** if ((8 * sizeof(crc)) > 10) {
855 .loc 1 207 3 view .LVU273
208:Core/Src/ADBMS_LL_Driver.c **** VP_CRCTableValue = VP_CRCTableValue & ((((crc)(1)) << 10) - 1);
856 .loc 1 208 5 view .LVU274
857 .LVL114:
209:Core/Src/ADBMS_LL_Driver.c **** }
210:Core/Src/ADBMS_LL_Driver.c ****
211:Core/Src/ADBMS_LL_Driver.c **** return (VP_CRCTableValue ^ 0x0000);
858 .loc 1 211 3 view .LVU275
212:Core/Src/ADBMS_LL_Driver.c **** }
859 .loc 1 212 1 is_stmt 0 view .LVU276
860 0028 C4F30900 ubfx r0, r4, #0, #10
861 002c F8BD pop {r3, r4, r5, r6, r7, pc}
862 .loc 1 212 1 view .LVU277
ARM GAS /tmp/cc6A08EU.s page 24
863 .cfi_endproc
864 .LFE131:
866 .section .text.checkDataPEC,"ax",%progbits
867 .align 1
868 .global checkDataPEC
869 .syntax unified
870 .thumb
871 .thumb_func
873 checkDataPEC:
874 .LVL115:
875 .LFB129:
169:Core/Src/ADBMS_LL_Driver.c **** if (len <= 2) {
876 .loc 1 169 44 is_stmt 1 view -0
877 .cfi_startproc
878 @ args = 0, pretend = 0, frame = 0
879 @ frame_needed = 0, uses_anonymous_args = 0
170:Core/Src/ADBMS_LL_Driver.c **** return 255;
880 .loc 1 170 3 view .LVU279
170:Core/Src/ADBMS_LL_Driver.c **** return 255;
881 .loc 1 170 6 is_stmt 0 view .LVU280
882 0000 0229 cmp r1, #2
883 0002 06D9 bls .L64
169:Core/Src/ADBMS_LL_Driver.c **** if (len <= 2) {
884 .loc 1 169 44 view .LVU281
885 0004 08B5 push {r3, lr}
886 .cfi_def_cfa_offset 8
887 .cfi_offset 3, -8
888 .cfi_offset 14, -4
174:Core/Src/ADBMS_LL_Driver.c ****
889 .loc 1 174 3 is_stmt 1 view .LVU282
174:Core/Src/ADBMS_LL_Driver.c ****
890 .loc 1 174 20 is_stmt 0 view .LVU283
891 0006 FFF7FEFF bl F_CRC_CalculaCheckSum
892 .LVL116:
176:Core/Src/ADBMS_LL_Driver.c **** }
893 .loc 1 176 3 is_stmt 1 view .LVU284
176:Core/Src/ADBMS_LL_Driver.c **** }
894 .loc 1 176 32 is_stmt 0 view .LVU285
895 000a 0038 subs r0, r0, #0
176:Core/Src/ADBMS_LL_Driver.c **** }
896 .loc 1 176 32 view .LVU286
897 000c 18BF it ne
898 000e 0120 movne r0, #1
899 .LVL117:
177:Core/Src/ADBMS_LL_Driver.c ****
900 .loc 1 177 1 view .LVU287
901 0010 08BD pop {r3, pc}
902 .LVL118:
903 .L64:
904 .cfi_def_cfa_offset 0
905 .cfi_restore 3
906 .cfi_restore 14
171:Core/Src/ADBMS_LL_Driver.c **** }
907 .loc 1 171 12 view .LVU288
908 0012 FF20 movs r0, #255
909 .LVL119:
177:Core/Src/ADBMS_LL_Driver.c ****
ARM GAS /tmp/cc6A08EU.s page 25
910 .loc 1 177 1 view .LVU289
911 0014 7047 bx lr
912 .cfi_endproc
913 .LFE129:
915 .section .text.updateDataPEC,"ax",%progbits
916 .align 1
917 .global updateDataPEC
918 .syntax unified
919 .thumb
920 .thumb_func
922 updateDataPEC:
923 .LVL120:
924 .LFB132:
213:Core/Src/ADBMS_LL_Driver.c ****
214:Core/Src/ADBMS_LL_Driver.c **** uint16 updateDataPEC(uint16 currentPEC, uint8 din) {
925 .loc 1 214 52 is_stmt 1 view -0
926 .cfi_startproc
927 @ args = 0, pretend = 0, frame = 0
928 @ frame_needed = 0, uses_anonymous_args = 0
929 .loc 1 214 52 is_stmt 0 view .LVU291
930 0000 10B5 push {r4, lr}
931 .cfi_def_cfa_offset 8
932 .cfi_offset 4, -8
933 .cfi_offset 14, -4
215:Core/Src/ADBMS_LL_Driver.c **** din = (din >> 7) & 0x01;
934 .loc 1 215 3 is_stmt 1 view .LVU292
935 .LVL121:
216:Core/Src/ADBMS_LL_Driver.c **** uint8 in0 = din ^ ((currentPEC >> 9) & 0x01);
936 .loc 1 216 3 view .LVU293
937 .loc 1 216 40 is_stmt 0 view .LVU294
938 0002 C0F34022 ubfx r2, r0, #9, #1
939 .loc 1 216 19 view .LVU295
940 0006 82EAD113 eor r3, r2, r1, lsr #7
941 .loc 1 216 9 view .LVU296
942 000a 1946 mov r1, r3
943 .LVL122:
217:Core/Src/ADBMS_LL_Driver.c **** uint8 in2 = in0 ^ ((currentPEC >> 1) & 0x01);
944 .loc 1 217 3 is_stmt 1 view .LVU297
945 .loc 1 217 40 is_stmt 0 view .LVU298
946 000c C0F3400E ubfx lr, r0, #1, #1
947 .loc 1 217 9 view .LVU299
948 0010 83EA0E0E eor lr, r3, lr
949 .LVL123:
218:Core/Src/ADBMS_LL_Driver.c **** uint8 in3 = in0 ^ ((currentPEC >> 2) & 0x01);
950 .loc 1 218 3 is_stmt 1 view .LVU300
951 .loc 1 218 40 is_stmt 0 view .LVU301
952 0014 C0F38004 ubfx r4, r0, #2, #1
953 .loc 1 218 9 view .LVU302
954 0018 5C40 eors r4, r4, r3
955 .LVL124:
219:Core/Src/ADBMS_LL_Driver.c **** uint8 in7 = in0 ^ ((currentPEC >> 6) & 0x01);
956 .loc 1 219 3 is_stmt 1 view .LVU303
957 .loc 1 219 40 is_stmt 0 view .LVU304
958 001a C0F38012 ubfx r2, r0, #6, #1
959 .loc 1 219 9 view .LVU305
960 001e 83EA020C eor ip, r3, r2
961 .LVL125:
ARM GAS /tmp/cc6A08EU.s page 26
220:Core/Src/ADBMS_LL_Driver.c ****
221:Core/Src/ADBMS_LL_Driver.c **** uint16 newPEC = 0;
962 .loc 1 221 3 is_stmt 1 view .LVU306
222:Core/Src/ADBMS_LL_Driver.c ****
223:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 8)) << 1;
963 .loc 1 223 3 view .LVU307
964 .loc 1 223 40 is_stmt 0 view .LVU308
965 0022 4200 lsls r2, r0, #1
966 0024 02F40073 and r3, r2, #512
967 .LVL126:
224:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 7)) << 1;
968 .loc 1 224 3 is_stmt 1 view .LVU309
969 .loc 1 224 40 is_stmt 0 view .LVU310
970 0028 02F48070 and r0, r2, #256
971 .LVL127:
972 .loc 1 224 10 view .LVU311
973 002c 0343 orrs r3, r3, r0
974 .LVL128:
225:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in7 << 7;
975 .loc 1 225 3 is_stmt 1 view .LVU312
976 .loc 1 225 10 is_stmt 0 view .LVU313
977 002e 43EACC13 orr r3, r3, ip, lsl #7
978 .LVL129:
226:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 5)) << 1;
979 .loc 1 226 3 is_stmt 1 view .LVU314
980 .loc 1 226 40 is_stmt 0 view .LVU315
981 0032 02F04000 and r0, r2, #64
982 .loc 1 226 10 view .LVU316
983 0036 0343 orrs r3, r3, r0
984 .LVL130:
985 .loc 1 226 10 view .LVU317
986 0038 1BB2 sxth r3, r3
987 .LVL131:
227:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01 << 4)) << 1;
988 .loc 1 227 3 is_stmt 1 view .LVU318
989 .loc 1 227 40 is_stmt 0 view .LVU319
990 003a 02F02000 and r0, r2, #32
991 .loc 1 227 10 view .LVU320
992 003e 0343 orrs r3, r3, r0
993 .LVL132:
228:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in3 << 3;
994 .loc 1 228 3 is_stmt 1 view .LVU321
995 .loc 1 228 10 is_stmt 0 view .LVU322
996 0040 43EAC403 orr r3, r3, r4, lsl #3
997 .LVL133:
229:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in2 << 2;
998 .loc 1 229 3 is_stmt 1 view .LVU323
999 .loc 1 229 10 is_stmt 0 view .LVU324
1000 0044 43EA8E03 orr r3, r3, lr, lsl #2
1001 .LVL134:
230:Core/Src/ADBMS_LL_Driver.c **** newPEC |= (currentPEC & (0x01)) << 1;
1002 .loc 1 230 3 is_stmt 1 view .LVU325
1003 .loc 1 230 35 is_stmt 0 view .LVU326
1004 0048 02F00202 and r2, r2, #2
1005 .loc 1 230 10 view .LVU327
1006 004c 1343 orrs r3, r3, r2
1007 .LVL135:
ARM GAS /tmp/cc6A08EU.s page 27
1008 .loc 1 230 10 view .LVU328
1009 004e 9BB2 uxth r3, r3
1010 .LVL136:
231:Core/Src/ADBMS_LL_Driver.c **** newPEC |= in0;
1011 .loc 1 231 3 is_stmt 1 view .LVU329
232:Core/Src/ADBMS_LL_Driver.c ****
233:Core/Src/ADBMS_LL_Driver.c **** return newPEC;
1012 .loc 1 233 3 view .LVU330
234:Core/Src/ADBMS_LL_Driver.c **** }
1013 .loc 1 234 1 is_stmt 0 view .LVU331
1014 0050 41EA0300 orr r0, r1, r3
1015 .LVL137:
1016 .loc 1 234 1 view .LVU332
1017 0054 10BD pop {r4, pc}
1018 .loc 1 234 1 view .LVU333
1019 .cfi_endproc
1020 .LFE132:
1022 .section .text.mcuAdbmsCSLow,"ax",%progbits
1023 .align 1
1024 .global mcuAdbmsCSLow
1025 .syntax unified
1026 .thumb
1027 .thumb_func
1029 mcuAdbmsCSLow:
1030 .LFB136:
235:Core/Src/ADBMS_LL_Driver.c ****
236:Core/Src/ADBMS_LL_Driver.c **** uint8 writeCMD(uint16 command, uint8* args, uint8 arglen) {
237:Core/Src/ADBMS_LL_Driver.c **** uint8 ret;
238:Core/Src/ADBMS_LL_Driver.c **** if (arglen > 0) {
239:Core/Src/ADBMS_LL_Driver.c **** uint8 buffer[6 + arglen]; //command + PEC (2 bytes) + data + DPEC (2 bytes)
240:Core/Src/ADBMS_LL_Driver.c **** buffer[0] = (command >> 8) & 0xFF;
241:Core/Src/ADBMS_LL_Driver.c **** buffer[1] = (command) & 0xFF;
242:Core/Src/ADBMS_LL_Driver.c ****
243:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(buffer, 4);
244:Core/Src/ADBMS_LL_Driver.c ****
245:Core/Src/ADBMS_LL_Driver.c **** for (uint8 i = 0; i < arglen; i++) {
246:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
247:Core/Src/ADBMS_LL_Driver.c **** }
248:Core/Src/ADBMS_LL_Driver.c ****
249:Core/Src/ADBMS_LL_Driver.c **** calculateDataPEC(&buffer[4], arglen + 2); //DPEC is calculated over the data, not the command,
250:Core/Src/ADBMS_LL_Driver.c ****
251:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
252:Core/Src/ADBMS_LL_Driver.c **** ret = mcuSPITransmit(buffer, 6 + arglen);
253:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
254:Core/Src/ADBMS_LL_Driver.c **** } else {
255:Core/Src/ADBMS_LL_Driver.c **** uint8 buffer[4];
256:Core/Src/ADBMS_LL_Driver.c **** buffer[0] = (command >> 8) & 0xFF;
257:Core/Src/ADBMS_LL_Driver.c **** buffer[1] = (command) & 0xFF;
258:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(buffer, 4);
259:Core/Src/ADBMS_LL_Driver.c ****
260:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
261:Core/Src/ADBMS_LL_Driver.c ****
262:Core/Src/ADBMS_LL_Driver.c **** ret = mcuSPITransmit(buffer, 4);
263:Core/Src/ADBMS_LL_Driver.c ****
264:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
265:Core/Src/ADBMS_LL_Driver.c **** }
266:Core/Src/ADBMS_LL_Driver.c ****
ARM GAS /tmp/cc6A08EU.s page 28
267:Core/Src/ADBMS_LL_Driver.c **** return ret;
268:Core/Src/ADBMS_LL_Driver.c **** }
269:Core/Src/ADBMS_LL_Driver.c ****
270:Core/Src/ADBMS_LL_Driver.c **** uint8 readCMD(uint16 command, uint8* buffer, uint8 buflen) {
271:Core/Src/ADBMS_LL_Driver.c **** uint8 txbuffer[6 + buflen];
272:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[6 + buflen];
273:Core/Src/ADBMS_LL_Driver.c ****
274:Core/Src/ADBMS_LL_Driver.c **** txbuffer[0] = (command >> 8) & 0xFF;
275:Core/Src/ADBMS_LL_Driver.c **** txbuffer[1] = (command)&0xFF;
276:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(txbuffer, 4);
277:Core/Src/ADBMS_LL_Driver.c ****
278:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
279:Core/Src/ADBMS_LL_Driver.c **** uint8 status = mcuSPITransmitReceive(rxbuffer, txbuffer, 6 + buflen);
280:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
281:Core/Src/ADBMS_LL_Driver.c ****
282:Core/Src/ADBMS_LL_Driver.c **** if (status != 0) {
283:Core/Src/ADBMS_LL_Driver.c **** return status;
284:Core/Src/ADBMS_LL_Driver.c **** }
285:Core/Src/ADBMS_LL_Driver.c ****
286:Core/Src/ADBMS_LL_Driver.c **** for (uint8 i = 0; i < buflen; i++) {
287:Core/Src/ADBMS_LL_Driver.c **** buffer[i] = rxbuffer[i + 4];
288:Core/Src/ADBMS_LL_Driver.c **** }
289:Core/Src/ADBMS_LL_Driver.c ****
290:Core/Src/ADBMS_LL_Driver.c **** [[maybe_unused]] uint8 commandCounter = rxbuffer[sizeof(rxbuffer) - 2] & 0xFC; //command counter
291:Core/Src/ADBMS_LL_Driver.c **** //TODO: check comm
292:Core/Src/ADBMS_LL_Driver.c ****
293:Core/Src/ADBMS_LL_Driver.c **** return checkDataPEC(&rxbuffer[4], buflen + 2);
294:Core/Src/ADBMS_LL_Driver.c **** }
295:Core/Src/ADBMS_LL_Driver.c ****
296:Core/Src/ADBMS_LL_Driver.c **** //check poll command - no data PEC sent back
297:Core/Src/ADBMS_LL_Driver.c **** uint8 pollCMD(uint16 command) {
298:Core/Src/ADBMS_LL_Driver.c **** uint8 txbuffer[5] = {};
299:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[5] = {};
300:Core/Src/ADBMS_LL_Driver.c ****
301:Core/Src/ADBMS_LL_Driver.c **** txbuffer[0] = (command >> 8) & 0xFF;
302:Core/Src/ADBMS_LL_Driver.c **** txbuffer[1] = (command)&0xFF;
303:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(txbuffer, 4);
304:Core/Src/ADBMS_LL_Driver.c ****
305:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
306:Core/Src/ADBMS_LL_Driver.c **** uint8 status = mcuSPITransmitReceive(rxbuffer, txbuffer, 5);
307:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
308:Core/Src/ADBMS_LL_Driver.c ****
309:Core/Src/ADBMS_LL_Driver.c **** if (status != 0) {
310:Core/Src/ADBMS_LL_Driver.c **** return status;
311:Core/Src/ADBMS_LL_Driver.c **** }
312:Core/Src/ADBMS_LL_Driver.c ****
313:Core/Src/ADBMS_LL_Driver.c **** return rxbuffer[4]; //last byte will be poll response
314:Core/Src/ADBMS_LL_Driver.c **** }
315:Core/Src/ADBMS_LL_Driver.c ****
316:Core/Src/ADBMS_LL_Driver.c **** void mcuAdbmsCSLow() {
1031 .loc 1 316 22 is_stmt 1 view -0
1032 .cfi_startproc
1033 @ args = 0, pretend = 0, frame = 0
1034 @ frame_needed = 0, uses_anonymous_args = 0
1035 0000 08B5 push {r3, lr}
1036 .cfi_def_cfa_offset 8
1037 .cfi_offset 3, -8
ARM GAS /tmp/cc6A08EU.s page 29
1038 .cfi_offset 14, -4
317:Core/Src/ADBMS_LL_Driver.c **** HAL_GPIO_WritePin(CSB_GPIO_Port, CSB_Pin, GPIO_PIN_RESET);
1039 .loc 1 317 3 view .LVU335
1040 0002 0022 movs r2, #0
1041 0004 4021 movs r1, #64
1042 0006 0248 ldr r0, .L73
1043 0008 FFF7FEFF bl HAL_GPIO_WritePin
1044 .LVL138:
318:Core/Src/ADBMS_LL_Driver.c **** }
1045 .loc 1 318 1 is_stmt 0 view .LVU336
1046 000c 08BD pop {r3, pc}
1047 .L74:
1048 000e 00BF .align 2
1049 .L73:
1050 0010 00040048 .word 1207960576
1051 .cfi_endproc
1052 .LFE136:
1054 .section .text.mcuAdbmsCSHigh,"ax",%progbits
1055 .align 1
1056 .global mcuAdbmsCSHigh
1057 .syntax unified
1058 .thumb
1059 .thumb_func
1061 mcuAdbmsCSHigh:
1062 .LFB137:
319:Core/Src/ADBMS_LL_Driver.c ****
320:Core/Src/ADBMS_LL_Driver.c **** void mcuAdbmsCSHigh() {
1063 .loc 1 320 23 is_stmt 1 view -0
1064 .cfi_startproc
1065 @ args = 0, pretend = 0, frame = 0
1066 @ frame_needed = 0, uses_anonymous_args = 0
1067 0000 08B5 push {r3, lr}
1068 .cfi_def_cfa_offset 8
1069 .cfi_offset 3, -8
1070 .cfi_offset 14, -4
321:Core/Src/ADBMS_LL_Driver.c **** HAL_GPIO_WritePin(CSB_GPIO_Port, CSB_Pin, GPIO_PIN_SET);
1071 .loc 1 321 3 view .LVU338
1072 0002 0122 movs r2, #1
1073 0004 4021 movs r1, #64
1074 0006 0248 ldr r0, .L77
1075 0008 FFF7FEFF bl HAL_GPIO_WritePin
1076 .LVL139:
322:Core/Src/ADBMS_LL_Driver.c **** }
1077 .loc 1 322 1 is_stmt 0 view .LVU339
1078 000c 08BD pop {r3, pc}
1079 .L78:
1080 000e 00BF .align 2
1081 .L77:
1082 0010 00040048 .word 1207960576
1083 .cfi_endproc
1084 .LFE137:
1086 .section .text.adbmsDriverInit,"ax",%progbits
1087 .align 1
1088 .global adbmsDriverInit
1089 .syntax unified
1090 .thumb
1091 .thumb_func
ARM GAS /tmp/cc6A08EU.s page 30
1093 adbmsDriverInit:
1094 .LVL140:
1095 .LFB123:
18:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
1096 .loc 1 18 48 is_stmt 1 view -0
1097 .cfi_startproc
1098 @ args = 0, pretend = 0, frame = 0
1099 @ frame_needed = 0, uses_anonymous_args = 0
18:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSLow();
1100 .loc 1 18 48 is_stmt 0 view .LVU341
1101 0000 10B5 push {r4, lr}
1102 .cfi_def_cfa_offset 8
1103 .cfi_offset 4, -8
1104 .cfi_offset 14, -4
1105 0002 0446 mov r4, r0
19:Core/Src/ADBMS_LL_Driver.c **** HAL_Delay(1);
1106 .loc 1 19 3 is_stmt 1 view .LVU342
1107 0004 FFF7FEFF bl mcuAdbmsCSLow
1108 .LVL141:
20:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1109 .loc 1 20 3 view .LVU343
1110 0008 0120 movs r0, #1
1111 000a FFF7FEFF bl HAL_Delay
1112 .LVL142:
21:Core/Src/ADBMS_LL_Driver.c **** adbmsspi = hspi;
1113 .loc 1 21 3 view .LVU344
1114 000e FFF7FEFF bl mcuAdbmsCSHigh
1115 .LVL143:
22:Core/Src/ADBMS_LL_Driver.c **** return 0;
1116 .loc 1 22 3 view .LVU345
22:Core/Src/ADBMS_LL_Driver.c **** return 0;
1117 .loc 1 22 12 is_stmt 0 view .LVU346
1118 0012 024B ldr r3, .L81
1119 0014 1C60 str r4, [r3]
23:Core/Src/ADBMS_LL_Driver.c **** }
1120 .loc 1 23 3 is_stmt 1 view .LVU347
24:Core/Src/ADBMS_LL_Driver.c ****
1121 .loc 1 24 1 is_stmt 0 view .LVU348
1122 0016 0020 movs r0, #0
1123 0018 10BD pop {r4, pc}
1124 .LVL144:
1125 .L82:
24:Core/Src/ADBMS_LL_Driver.c ****
1126 .loc 1 24 1 view .LVU349
1127 001a 00BF .align 2
1128 .L81:
1129 001c 00000000 .word adbmsspi
1130 .cfi_endproc
1131 .LFE123:
1133 .section .text.mcuSPITransmit,"ax",%progbits
1134 .align 1
1135 .global mcuSPITransmit
1136 .syntax unified
1137 .thumb
1138 .thumb_func
1140 mcuSPITransmit:
1141 .LVL145:
ARM GAS /tmp/cc6A08EU.s page 31
1142 .LFB138:
323:Core/Src/ADBMS_LL_Driver.c ****
324:Core/Src/ADBMS_LL_Driver.c **** uint8 mcuSPITransmit(uint8* buffer, uint8 buffersize) {
1143 .loc 1 324 55 is_stmt 1 view -0
1144 .cfi_startproc
1145 @ args = 0, pretend = 0, frame = 8
1146 @ frame_needed = 1, uses_anonymous_args = 0
1147 .loc 1 324 55 is_stmt 0 view .LVU351
1148 0000 90B5 push {r4, r7, lr}
1149 .cfi_def_cfa_offset 12
1150 .cfi_offset 4, -12
1151 .cfi_offset 7, -8
1152 .cfi_offset 14, -4
1153 0002 85B0 sub sp, sp, #20
1154 .cfi_def_cfa_offset 32
1155 0004 02AF add r7, sp, #8
1156 .cfi_def_cfa 7, 24
1157 0006 0B46 mov r3, r1
325:Core/Src/ADBMS_LL_Driver.c **** HAL_StatusTypeDef status;
1158 .loc 1 325 3 is_stmt 1 view .LVU352
326:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuf[buffersize];
1159 .loc 1 326 3 view .LVU353
1160 .LVL146:
1161 .loc 1 326 9 is_stmt 0 view .LVU354
1162 0008 CA1D adds r2, r1, #7
1163 000a 02F4FC72 and r2, r2, #504
1164 000e ADEB020D sub sp, sp, r2
1165 0012 6A46 mov r2, sp
1166 .LVL147:
327:Core/Src/ADBMS_LL_Driver.c **** status = HAL_SPI_TransmitReceive(adbmsspi, buffer, rxbuf, buffersize,
1167 .loc 1 327 3 is_stmt 1 view .LVU355
1168 .loc 1 327 12 is_stmt 0 view .LVU356
1169 0014 094C ldr r4, .L85
1170 0016 6421 movs r1, #100
1171 .LVL148:
1172 .loc 1 327 12 view .LVU357
1173 0018 42F8081B str r1, [r2], #8
1174 .LVL149:
1175 .loc 1 327 12 view .LVU358
1176 001c 0146 mov r1, r0
1177 001e 2068 ldr r0, [r4]
1178 .LVL150:
1179 .loc 1 327 12 view .LVU359
1180 0020 FFF7FEFF bl HAL_SPI_TransmitReceive
1181 .LVL151:
328:Core/Src/ADBMS_LL_Driver.c **** ADBMS_SPI_TIMEOUT);
329:Core/Src/ADBMS_LL_Driver.c **** __HAL_SPI_CLEAR_OVRFLAG(adbmsspi);
1182 .loc 1 329 3 is_stmt 1 view .LVU360
1183 .LBB18:
1184 .loc 1 329 3 view .LVU361
1185 0024 0023 movs r3, #0
1186 0026 7B60 str r3, [r7, #4]
1187 .loc 1 329 3 view .LVU362
1188 0028 2368 ldr r3, [r4]
1189 002a 1B68 ldr r3, [r3]
1190 002c DA68 ldr r2, [r3, #12]
1191 002e 7A60 str r2, [r7, #4]
ARM GAS /tmp/cc6A08EU.s page 32
1192 .loc 1 329 3 view .LVU363
1193 0030 9B68 ldr r3, [r3, #8]
1194 0032 7B60 str r3, [r7, #4]
1195 .loc 1 329 3 view .LVU364
1196 0034 7B68 ldr r3, [r7, #4]
1197 .LBE18:
1198 .loc 1 329 3 view .LVU365
330:Core/Src/ADBMS_LL_Driver.c **** return status;
1199 .loc 1 330 3 view .LVU366
331:Core/Src/ADBMS_LL_Driver.c **** }
1200 .loc 1 331 1 is_stmt 0 view .LVU367
1201 0036 0C37 adds r7, r7, #12
1202 .cfi_def_cfa_offset 12
1203 0038 BD46 mov sp, r7
1204 .cfi_def_cfa_register 13
1205 .LVL152:
1206 .loc 1 331 1 view .LVU368
1207 @ sp needed
1208 003a 90BD pop {r4, r7, pc}
1209 .L86:
1210 .align 2
1211 .L85:
1212 003c 00000000 .word adbmsspi
1213 .cfi_endproc
1214 .LFE138:
1216 .section .text.writeCMD,"ax",%progbits
1217 .align 1
1218 .global writeCMD
1219 .syntax unified
1220 .thumb
1221 .thumb_func
1223 writeCMD:
1224 .LVL153:
1225 .LFB133:
236:Core/Src/ADBMS_LL_Driver.c **** uint8 ret;
1226 .loc 1 236 59 is_stmt 1 view -0
1227 .cfi_startproc
1228 @ args = 0, pretend = 0, frame = 8
1229 @ frame_needed = 1, uses_anonymous_args = 0
236:Core/Src/ADBMS_LL_Driver.c **** uint8 ret;
1230 .loc 1 236 59 is_stmt 0 view .LVU370
1231 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr}
1232 .cfi_def_cfa_offset 24
1233 .cfi_offset 4, -24
1234 .cfi_offset 5, -20
1235 .cfi_offset 6, -16
1236 .cfi_offset 7, -12
1237 .cfi_offset 8, -8
1238 .cfi_offset 14, -4
1239 0004 82B0 sub sp, sp, #8
1240 .cfi_def_cfa_offset 32
1241 0006 00AF add r7, sp, #0
1242 .cfi_def_cfa_register 7
237:Core/Src/ADBMS_LL_Driver.c **** if (arglen > 0) {
1243 .loc 1 237 3 is_stmt 1 view .LVU371
238:Core/Src/ADBMS_LL_Driver.c **** uint8 buffer[6 + arglen]; //command + PEC (2 bytes) + data + DPEC (2 bytes)
1244 .loc 1 238 3 view .LVU372
ARM GAS /tmp/cc6A08EU.s page 33
238:Core/Src/ADBMS_LL_Driver.c **** uint8 buffer[6 + arglen]; //command + PEC (2 bytes) + data + DPEC (2 bytes)
1245 .loc 1 238 6 is_stmt 0 view .LVU373
1246 0008 82B3 cbz r2, .L88
1247 000a 0D46 mov r5, r1
1248 000c 1446 mov r4, r2
1249 .LBB19:
238:Core/Src/ADBMS_LL_Driver.c **** uint8 buffer[6 + arglen]; //command + PEC (2 bytes) + data + DPEC (2 bytes)
1250 .loc 1 238 19 discriminator 1 view .LVU374
1251 000e E846 mov r8, sp
239:Core/Src/ADBMS_LL_Driver.c **** buffer[0] = (command >> 8) & 0xFF;
1252 .loc 1 239 5 is_stmt 1 view .LVU375
1253 .LVL154:
239:Core/Src/ADBMS_LL_Driver.c **** buffer[0] = (command >> 8) & 0xFF;
1254 .loc 1 239 11 is_stmt 0 view .LVU376
1255 0010 02F10D03 add r3, r2, #13
1256 0014 03F4FC73 and r3, r3, #504
1257 0018 ADEB030D sub sp, sp, r3
1258 001c 6E46 mov r6, sp
1259 .LVL155:
240:Core/Src/ADBMS_LL_Driver.c **** buffer[1] = (command) & 0xFF;
1260 .loc 1 240 5 is_stmt 1 view .LVU377
240:Core/Src/ADBMS_LL_Driver.c **** buffer[1] = (command) & 0xFF;
1261 .loc 1 240 15 is_stmt 0 view .LVU378
1262 001e 030A lsrs r3, r0, #8
1263 0020 8DF80030 strb r3, [sp]
241:Core/Src/ADBMS_LL_Driver.c ****
1264 .loc 1 241 5 is_stmt 1 view .LVU379
241:Core/Src/ADBMS_LL_Driver.c ****
1265 .loc 1 241 15 is_stmt 0 view .LVU380
1266 0024 8DF80100 strb r0, [sp, #1]
243:Core/Src/ADBMS_LL_Driver.c ****
1267 .loc 1 243 5 is_stmt 1 view .LVU381
1268 0028 0421 movs r1, #4
1269 .LVL156:
243:Core/Src/ADBMS_LL_Driver.c ****
1270 .loc 1 243 5 is_stmt 0 view .LVU382
1271 002a 6846 mov r0, sp
1272 .LVL157:
243:Core/Src/ADBMS_LL_Driver.c ****
1273 .loc 1 243 5 view .LVU383
1274 002c FFF7FEFF bl calculateCommandPEC
1275 .LVL158:
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1276 .loc 1 245 5 is_stmt 1 view .LVU384
1277 .LBB20:
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1278 .loc 1 245 10 view .LVU385
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1279 .loc 1 245 16 is_stmt 0 view .LVU386
1280 0030 0023 movs r3, #0
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1281 .loc 1 245 5 view .LVU387
1282 0032 04E0 b .L89
1283 .LVL159:
1284 .L90:
246:Core/Src/ADBMS_LL_Driver.c **** }
1285 .loc 1 246 7 is_stmt 1 view .LVU388
ARM GAS /tmp/cc6A08EU.s page 34
246:Core/Src/ADBMS_LL_Driver.c **** }
1286 .loc 1 246 16 is_stmt 0 view .LVU389
1287 0034 1A1D adds r2, r3, #4
246:Core/Src/ADBMS_LL_Driver.c **** }
1288 .loc 1 246 27 view .LVU390
1289 0036 E95C ldrb r1, [r5, r3] @ zero_extendqisi2
246:Core/Src/ADBMS_LL_Driver.c **** }
1290 .loc 1 246 21 view .LVU391
1291 0038 B154 strb r1, [r6, r2]
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1292 .loc 1 245 36 is_stmt 1 discriminator 3 view .LVU392
1293 003a 0133 adds r3, r3, #1
1294 .LVL160:
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1295 .loc 1 245 36 is_stmt 0 discriminator 3 view .LVU393
1296 003c DBB2 uxtb r3, r3
1297 .LVL161:
1298 .L89:
245:Core/Src/ADBMS_LL_Driver.c **** buffer[4 + i] = args[i];
1299 .loc 1 245 25 is_stmt 1 discriminator 1 view .LVU394
1300 003e A342 cmp r3, r4
1301 0040 F8D3 bcc .L90
1302 .LBE20:
249:Core/Src/ADBMS_LL_Driver.c ****
1303 .loc 1 249 5 view .LVU395
1304 0042 A11C adds r1, r4, #2
1305 0044 C9B2 uxtb r1, r1
1306 0046 301D adds r0, r6, #4
1307 0048 FFF7FEFF bl calculateDataPEC
1308 .LVL162:
251:Core/Src/ADBMS_LL_Driver.c **** ret = mcuSPITransmit(buffer, 6 + arglen);
1309 .loc 1 251 5 view .LVU396
1310 004c FFF7FEFF bl mcuAdbmsCSLow
1311 .LVL163:
252:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1312 .loc 1 252 5 view .LVU397
252:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1313 .loc 1 252 11 is_stmt 0 view .LVU398
1314 0050 A11D adds r1, r4, #6
1315 0052 C9B2 uxtb r1, r1
1316 0054 3046 mov r0, r6
1317 0056 FFF7FEFF bl mcuSPITransmit
1318 .LVL164:
1319 005a 0446 mov r4, r0
1320 .LVL165:
253:Core/Src/ADBMS_LL_Driver.c **** } else {
1321 .loc 1 253 5 is_stmt 1 view .LVU399
1322 005c FFF7FEFF bl mcuAdbmsCSHigh
1323 .LVL166:
1324 0060 C546 mov sp, r8
1325 .LVL167:
1326 .L91:
253:Core/Src/ADBMS_LL_Driver.c **** } else {
1327 .loc 1 253 5 is_stmt 0 view .LVU400
1328 .LBE19:
267:Core/Src/ADBMS_LL_Driver.c **** }
1329 .loc 1 267 3 is_stmt 1 view .LVU401
ARM GAS /tmp/cc6A08EU.s page 35
268:Core/Src/ADBMS_LL_Driver.c ****
1330 .loc 1 268 1 is_stmt 0 view .LVU402
1331 0062 2046 mov r0, r4
1332 0064 0837 adds r7, r7, #8
1333 .cfi_remember_state
1334 .cfi_def_cfa_offset 24
1335 0066 BD46 mov sp, r7
1336 .cfi_def_cfa_register 13
1337 @ sp needed
1338 0068 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
1339 .LVL168:
1340 .L88:
1341 .cfi_restore_state
1342 .LBB21:
255:Core/Src/ADBMS_LL_Driver.c **** buffer[0] = (command >> 8) & 0xFF;
1343 .loc 1 255 5 is_stmt 1 view .LVU403
256:Core/Src/ADBMS_LL_Driver.c **** buffer[1] = (command) & 0xFF;
1344 .loc 1 256 5 view .LVU404
256:Core/Src/ADBMS_LL_Driver.c **** buffer[1] = (command) & 0xFF;
1345 .loc 1 256 15 is_stmt 0 view .LVU405
1346 006c 030A lsrs r3, r0, #8
1347 006e 3B71 strb r3, [r7, #4]
257:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(buffer, 4);
1348 .loc 1 257 5 is_stmt 1 view .LVU406
257:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(buffer, 4);
1349 .loc 1 257 15 is_stmt 0 view .LVU407
1350 0070 7871 strb r0, [r7, #5]
258:Core/Src/ADBMS_LL_Driver.c ****
1351 .loc 1 258 5 is_stmt 1 view .LVU408
1352 0072 0421 movs r1, #4
1353 .LVL169:
258:Core/Src/ADBMS_LL_Driver.c ****
1354 .loc 1 258 5 is_stmt 0 view .LVU409
1355 0074 7818 adds r0, r7, r1
1356 .LVL170:
258:Core/Src/ADBMS_LL_Driver.c ****
1357 .loc 1 258 5 view .LVU410
1358 0076 FFF7FEFF bl calculateCommandPEC
1359 .LVL171:
260:Core/Src/ADBMS_LL_Driver.c ****
1360 .loc 1 260 5 is_stmt 1 view .LVU411
1361 007a FFF7FEFF bl mcuAdbmsCSLow
1362 .LVL172:
262:Core/Src/ADBMS_LL_Driver.c ****
1363 .loc 1 262 5 view .LVU412
262:Core/Src/ADBMS_LL_Driver.c ****
1364 .loc 1 262 11 is_stmt 0 view .LVU413
1365 007e 0421 movs r1, #4
1366 0080 7818 adds r0, r7, r1
1367 0082 FFF7FEFF bl mcuSPITransmit
1368 .LVL173:
1369 0086 0446 mov r4, r0
1370 .LVL174:
264:Core/Src/ADBMS_LL_Driver.c **** }
1371 .loc 1 264 5 is_stmt 1 view .LVU414
1372 0088 FFF7FEFF bl mcuAdbmsCSHigh
1373 .LVL175:
ARM GAS /tmp/cc6A08EU.s page 36
1374 008c E9E7 b .L91
1375 .LBE21:
1376 .cfi_endproc
1377 .LFE133:
1379 .section .text.mcuSPIReceive,"ax",%progbits
1380 .align 1
1381 .global mcuSPIReceive
1382 .syntax unified
1383 .thumb
1384 .thumb_func
1386 mcuSPIReceive:
1387 .LVL176:
1388 .LFB139:
332:Core/Src/ADBMS_LL_Driver.c ****
333:Core/Src/ADBMS_LL_Driver.c **** uint8 mcuSPIReceive(uint8* buffer, uint8 buffersize) {
1389 .loc 1 333 54 view -0
1390 .cfi_startproc
1391 @ args = 0, pretend = 0, frame = 0
1392 @ frame_needed = 0, uses_anonymous_args = 0
1393 .loc 1 333 54 is_stmt 0 view .LVU416
1394 0000 08B5 push {r3, lr}
1395 .cfi_def_cfa_offset 8
1396 .cfi_offset 3, -8
1397 .cfi_offset 14, -4
1398 0002 0A46 mov r2, r1
334:Core/Src/ADBMS_LL_Driver.c **** HAL_StatusTypeDef status;
1399 .loc 1 334 3 is_stmt 1 view .LVU417
335:Core/Src/ADBMS_LL_Driver.c **** status = HAL_SPI_Receive(adbmsspi, buffer, buffersize, ADBMS_SPI_TIMEOUT);
1400 .loc 1 335 3 view .LVU418
1401 .loc 1 335 12 is_stmt 0 view .LVU419
1402 0004 6423 movs r3, #100
1403 0006 0146 mov r1, r0
1404 .LVL177:
1405 .loc 1 335 12 view .LVU420
1406 0008 0248 ldr r0, .L95
1407 .LVL178:
1408 .loc 1 335 12 view .LVU421
1409 000a 0068 ldr r0, [r0]
1410 000c FFF7FEFF bl HAL_SPI_Receive
1411 .LVL179:
336:Core/Src/ADBMS_LL_Driver.c **** return status;
1412 .loc 1 336 3 is_stmt 1 view .LVU422
337:Core/Src/ADBMS_LL_Driver.c **** }
1413 .loc 1 337 1 is_stmt 0 view .LVU423
1414 0010 08BD pop {r3, pc}
1415 .L96:
1416 0012 00BF .align 2
1417 .L95:
1418 0014 00000000 .word adbmsspi
1419 .cfi_endproc
1420 .LFE139:
1422 .section .text.mcuSPITransmitReceive,"ax",%progbits
1423 .align 1
1424 .global mcuSPITransmitReceive
1425 .syntax unified
1426 .thumb
1427 .thumb_func
ARM GAS /tmp/cc6A08EU.s page 37
1429 mcuSPITransmitReceive:
1430 .LVL180:
1431 .LFB140:
338:Core/Src/ADBMS_LL_Driver.c ****
339:Core/Src/ADBMS_LL_Driver.c **** uint8 mcuSPITransmitReceive(uint8* rxbuffer, uint8* txbuffer,
340:Core/Src/ADBMS_LL_Driver.c **** uint8 buffersize) {
1432 .loc 1 340 47 is_stmt 1 view -0
1433 .cfi_startproc
1434 @ args = 0, pretend = 0, frame = 0
1435 @ frame_needed = 0, uses_anonymous_args = 0
1436 .loc 1 340 47 is_stmt 0 view .LVU425
1437 0000 00B5 push {lr}
1438 .cfi_def_cfa_offset 4
1439 .cfi_offset 14, -4
1440 0002 83B0 sub sp, sp, #12
1441 .cfi_def_cfa_offset 16
1442 0004 1346 mov r3, r2
341:Core/Src/ADBMS_LL_Driver.c **** HAL_StatusTypeDef status;
1443 .loc 1 341 3 is_stmt 1 view .LVU426
342:Core/Src/ADBMS_LL_Driver.c **** status = HAL_SPI_TransmitReceive(adbmsspi, txbuffer, rxbuffer, buffersize,
1444 .loc 1 342 3 view .LVU427
1445 .loc 1 342 12 is_stmt 0 view .LVU428
1446 0006 6422 movs r2, #100
1447 .LVL181:
1448 .loc 1 342 12 view .LVU429
1449 0008 0092 str r2, [sp]
1450 000a 0246 mov r2, r0
1451 000c 0348 ldr r0, .L99
1452 .LVL182:
1453 .loc 1 342 12 view .LVU430
1454 000e 0068 ldr r0, [r0]
1455 0010 FFF7FEFF bl HAL_SPI_TransmitReceive
1456 .LVL183:
343:Core/Src/ADBMS_LL_Driver.c **** ADBMS_SPI_TIMEOUT);
344:Core/Src/ADBMS_LL_Driver.c **** return status;
1457 .loc 1 344 3 is_stmt 1 view .LVU431
345:Core/Src/ADBMS_LL_Driver.c **** }
1458 .loc 1 345 1 is_stmt 0 view .LVU432
1459 0014 03B0 add sp, sp, #12
1460 .cfi_def_cfa_offset 4
1461 @ sp needed
1462 0016 5DF804FB ldr pc, [sp], #4
1463 .L100:
1464 001a 00BF .align 2
1465 .L99:
1466 001c 00000000 .word adbmsspi
1467 .cfi_endproc
1468 .LFE140:
1470 .section .text.readCMD,"ax",%progbits
1471 .align 1
1472 .global readCMD
1473 .syntax unified
1474 .thumb
1475 .thumb_func
1477 readCMD:
1478 .LVL184:
1479 .LFB134:
ARM GAS /tmp/cc6A08EU.s page 38
270:Core/Src/ADBMS_LL_Driver.c **** uint8 txbuffer[6 + buflen];
1480 .loc 1 270 60 is_stmt 1 view -0
1481 .cfi_startproc
1482 @ args = 0, pretend = 0, frame = 0
1483 @ frame_needed = 1, uses_anonymous_args = 0
270:Core/Src/ADBMS_LL_Driver.c **** uint8 txbuffer[6 + buflen];
1484 .loc 1 270 60 is_stmt 0 view .LVU434
1485 0000 2DE9F843 push {r3, r4, r5, r6, r7, r8, r9, lr}
1486 .cfi_def_cfa_offset 32
1487 .cfi_offset 3, -32
1488 .cfi_offset 4, -28
1489 .cfi_offset 5, -24
1490 .cfi_offset 6, -20
1491 .cfi_offset 7, -16
1492 .cfi_offset 8, -12
1493 .cfi_offset 9, -8
1494 .cfi_offset 14, -4
1495 0004 00AF add r7, sp, #0
1496 .cfi_def_cfa_register 7
1497 0006 8846 mov r8, r1
1498 0008 1546 mov r5, r2
271:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[6 + buflen];
1499 .loc 1 271 3 is_stmt 1 view .LVU435
271:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[6 + buflen];
1500 .loc 1 271 20 is_stmt 0 view .LVU436
1501 000a 02F10609 add r9, r2, #6
1502 .LVL185:
271:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[6 + buflen];
1503 .loc 1 271 9 view .LVU437
1504 000e 02F10D03 add r3, r2, #13
1505 0012 03F4FC73 and r3, r3, #504
1506 0016 ADEB030D sub sp, sp, r3
1507 001a 6C46 mov r4, sp
1508 .LVL186:
272:Core/Src/ADBMS_LL_Driver.c ****
1509 .loc 1 272 3 is_stmt 1 view .LVU438
272:Core/Src/ADBMS_LL_Driver.c ****
1510 .loc 1 272 9 is_stmt 0 view .LVU439
1511 001c ADEB030D sub sp, sp, r3
1512 0020 6E46 mov r6, sp
1513 .LVL187:
274:Core/Src/ADBMS_LL_Driver.c **** txbuffer[1] = (command)&0xFF;
1514 .loc 1 274 3 is_stmt 1 view .LVU440
274:Core/Src/ADBMS_LL_Driver.c **** txbuffer[1] = (command)&0xFF;
1515 .loc 1 274 15 is_stmt 0 view .LVU441
1516 0022 030A lsrs r3, r0, #8
1517 0024 2370 strb r3, [r4]
275:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(txbuffer, 4);
1518 .loc 1 275 3 is_stmt 1 view .LVU442
275:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(txbuffer, 4);
1519 .loc 1 275 15 is_stmt 0 view .LVU443
1520 0026 6070 strb r0, [r4, #1]
276:Core/Src/ADBMS_LL_Driver.c ****
1521 .loc 1 276 3 is_stmt 1 view .LVU444
1522 0028 0421 movs r1, #4
1523 .LVL188:
276:Core/Src/ADBMS_LL_Driver.c ****
ARM GAS /tmp/cc6A08EU.s page 39
1524 .loc 1 276 3 is_stmt 0 view .LVU445
1525 002a 2046 mov r0, r4
1526 .LVL189:
276:Core/Src/ADBMS_LL_Driver.c ****
1527 .loc 1 276 3 view .LVU446
1528 002c FFF7FEFF bl calculateCommandPEC
1529 .LVL190:
278:Core/Src/ADBMS_LL_Driver.c **** uint8 status = mcuSPITransmitReceive(rxbuffer, txbuffer, 6 + buflen);
1530 .loc 1 278 3 is_stmt 1 view .LVU447
1531 0030 FFF7FEFF bl mcuAdbmsCSLow
1532 .LVL191:
279:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1533 .loc 1 279 3 view .LVU448
279:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1534 .loc 1 279 18 is_stmt 0 view .LVU449
1535 0034 5FFA89F2 uxtb r2, r9
1536 0038 2146 mov r1, r4
1537 003a 6846 mov r0, sp
1538 003c FFF7FEFF bl mcuSPITransmitReceive
1539 .LVL192:
1540 0040 0446 mov r4, r0
1541 .LVL193:
280:Core/Src/ADBMS_LL_Driver.c ****
1542 .loc 1 280 3 is_stmt 1 view .LVU450
1543 0042 FFF7FEFF bl mcuAdbmsCSHigh
1544 .LVL194:
282:Core/Src/ADBMS_LL_Driver.c **** return status;
1545 .loc 1 282 3 view .LVU451
282:Core/Src/ADBMS_LL_Driver.c **** return status;
1546 .loc 1 282 6 is_stmt 0 view .LVU452
1547 0046 34B1 cbz r4, .L103
1548 0048 0DE0 b .L102
1549 .LVL195:
1550 .L104:
1551 .LBB22:
287:Core/Src/ADBMS_LL_Driver.c **** }
1552 .loc 1 287 5 is_stmt 1 view .LVU453
287:Core/Src/ADBMS_LL_Driver.c **** }
1553 .loc 1 287 28 is_stmt 0 view .LVU454
1554 004a 231D adds r3, r4, #4
287:Core/Src/ADBMS_LL_Driver.c **** }
1555 .loc 1 287 25 view .LVU455
1556 004c F35C ldrb r3, [r6, r3] @ zero_extendqisi2
287:Core/Src/ADBMS_LL_Driver.c **** }
1557 .loc 1 287 15 view .LVU456
1558 004e 08F80430 strb r3, [r8, r4]
286:Core/Src/ADBMS_LL_Driver.c **** buffer[i] = rxbuffer[i + 4];
1559 .loc 1 286 34 is_stmt 1 discriminator 3 view .LVU457
1560 0052 0134 adds r4, r4, #1
1561 .LVL196:
286:Core/Src/ADBMS_LL_Driver.c **** buffer[i] = rxbuffer[i + 4];
1562 .loc 1 286 34 is_stmt 0 discriminator 3 view .LVU458
1563 0054 E4B2 uxtb r4, r4
1564 .LVL197:
1565 .L103:
286:Core/Src/ADBMS_LL_Driver.c **** buffer[i] = rxbuffer[i + 4];
1566 .loc 1 286 23 is_stmt 1 discriminator 1 view .LVU459
ARM GAS /tmp/cc6A08EU.s page 40
1567 0056 AC42 cmp r4, r5
1568 0058 F7D3 bcc .L104
1569 .LBE22:
290:Core/Src/ADBMS_LL_Driver.c **** //TODO: check comm
1570 .loc 1 290 20 view .LVU460
1571 .LVL198:
293:Core/Src/ADBMS_LL_Driver.c **** }
1572 .loc 1 293 3 view .LVU461
293:Core/Src/ADBMS_LL_Driver.c **** }
1573 .loc 1 293 10 is_stmt 0 view .LVU462
1574 005a A91C adds r1, r5, #2
1575 005c C9B2 uxtb r1, r1
1576 005e 301D adds r0, r6, #4
1577 0060 FFF7FEFF bl checkDataPEC
1578 .LVL199:
293:Core/Src/ADBMS_LL_Driver.c **** }
1579 .loc 1 293 10 view .LVU463
1580 0064 0446 mov r4, r0
1581 .LVL200:
1582 .L102:
294:Core/Src/ADBMS_LL_Driver.c ****
1583 .loc 1 294 1 view .LVU464
1584 0066 2046 mov r0, r4
1585 0068 BD46 mov sp, r7
1586 .cfi_def_cfa_register 13
1587 @ sp needed
1588 006a BDE8F883 pop {r3, r4, r5, r6, r7, r8, r9, pc}
294:Core/Src/ADBMS_LL_Driver.c ****
1589 .loc 1 294 1 view .LVU465
1590 .cfi_endproc
1591 .LFE134:
1593 .section .text.pollCMD,"ax",%progbits
1594 .align 1
1595 .global pollCMD
1596 .syntax unified
1597 .thumb
1598 .thumb_func
1600 pollCMD:
1601 .LVL201:
1602 .LFB135:
297:Core/Src/ADBMS_LL_Driver.c **** uint8 txbuffer[5] = {};
1603 .loc 1 297 31 is_stmt 1 view -0
1604 .cfi_startproc
1605 @ args = 0, pretend = 0, frame = 16
1606 @ frame_needed = 0, uses_anonymous_args = 0
297:Core/Src/ADBMS_LL_Driver.c **** uint8 txbuffer[5] = {};
1607 .loc 1 297 31 is_stmt 0 view .LVU467
1608 0000 10B5 push {r4, lr}
1609 .cfi_def_cfa_offset 8
1610 .cfi_offset 4, -8
1611 .cfi_offset 14, -4
1612 0002 84B0 sub sp, sp, #16
1613 .cfi_def_cfa_offset 24
298:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[5] = {};
1614 .loc 1 298 3 is_stmt 1 view .LVU468
298:Core/Src/ADBMS_LL_Driver.c **** uint8 rxbuffer[5] = {};
1615 .loc 1 298 9 is_stmt 0 view .LVU469
ARM GAS /tmp/cc6A08EU.s page 41
1616 0004 0023 movs r3, #0
1617 0006 0293 str r3, [sp, #8]
1618 0008 8DF80C30 strb r3, [sp, #12]
299:Core/Src/ADBMS_LL_Driver.c ****
1619 .loc 1 299 3 is_stmt 1 view .LVU470
299:Core/Src/ADBMS_LL_Driver.c ****
1620 .loc 1 299 9 is_stmt 0 view .LVU471
1621 000c 0093 str r3, [sp]
1622 000e 8DF80430 strb r3, [sp, #4]
301:Core/Src/ADBMS_LL_Driver.c **** txbuffer[1] = (command)&0xFF;
1623 .loc 1 301 3 is_stmt 1 view .LVU472
301:Core/Src/ADBMS_LL_Driver.c **** txbuffer[1] = (command)&0xFF;
1624 .loc 1 301 15 is_stmt 0 view .LVU473
1625 0012 030A lsrs r3, r0, #8
1626 0014 8DF80830 strb r3, [sp, #8]
302:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(txbuffer, 4);
1627 .loc 1 302 3 is_stmt 1 view .LVU474
302:Core/Src/ADBMS_LL_Driver.c **** calculateCommandPEC(txbuffer, 4);
1628 .loc 1 302 15 is_stmt 0 view .LVU475
1629 0018 8DF80900 strb r0, [sp, #9]
303:Core/Src/ADBMS_LL_Driver.c ****
1630 .loc 1 303 3 is_stmt 1 view .LVU476
1631 001c 0421 movs r1, #4
1632 001e 02A8 add r0, sp, #8
1633 .LVL202:
303:Core/Src/ADBMS_LL_Driver.c ****
1634 .loc 1 303 3 is_stmt 0 view .LVU477
1635 0020 FFF7FEFF bl calculateCommandPEC
1636 .LVL203:
305:Core/Src/ADBMS_LL_Driver.c **** uint8 status = mcuSPITransmitReceive(rxbuffer, txbuffer, 5);
1637 .loc 1 305 3 is_stmt 1 view .LVU478
1638 0024 FFF7FEFF bl mcuAdbmsCSLow
1639 .LVL204:
306:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1640 .loc 1 306 3 view .LVU479
306:Core/Src/ADBMS_LL_Driver.c **** mcuAdbmsCSHigh();
1641 .loc 1 306 18 is_stmt 0 view .LVU480
1642 0028 0522 movs r2, #5
1643 002a 02A9 add r1, sp, #8
1644 002c 6846 mov r0, sp
1645 002e FFF7FEFF bl mcuSPITransmitReceive
1646 .LVL205:
1647 0032 0446 mov r4, r0
1648 .LVL206:
307:Core/Src/ADBMS_LL_Driver.c ****
1649 .loc 1 307 3 is_stmt 1 view .LVU481
1650 0034 FFF7FEFF bl mcuAdbmsCSHigh
1651 .LVL207:
309:Core/Src/ADBMS_LL_Driver.c **** return status;
1652 .loc 1 309 3 view .LVU482
309:Core/Src/ADBMS_LL_Driver.c **** return status;
1653 .loc 1 309 6 is_stmt 0 view .LVU483
1654 0038 0CB9 cbnz r4, .L107
313:Core/Src/ADBMS_LL_Driver.c **** }
1655 .loc 1 313 3 is_stmt 1 view .LVU484
313:Core/Src/ADBMS_LL_Driver.c **** }
1656 .loc 1 313 18 is_stmt 0 view .LVU485
ARM GAS /tmp/cc6A08EU.s page 42
1657 003a 9DF80440 ldrb r4, [sp, #4] @ zero_extendqisi2
1658 .LVL208:
1659 .L107:
314:Core/Src/ADBMS_LL_Driver.c ****
1660 .loc 1 314 1 view .LVU486
1661 003e 2046 mov r0, r4
1662 0040 04B0 add sp, sp, #16
1663 .cfi_def_cfa_offset 8
1664 @ sp needed
1665 0042 10BD pop {r4, pc}
1666 .cfi_endproc
1667 .LFE135:
1669 .section .text.mcuDelay,"ax",%progbits
1670 .align 1
1671 .global mcuDelay
1672 .syntax unified
1673 .thumb
1674 .thumb_func
1676 mcuDelay:
1677 .LVL209:
1678 .LFB141:
346:Core/Src/ADBMS_LL_Driver.c ****
347:Core/Src/ADBMS_LL_Driver.c **** inline void mcuDelay(uint16 delay) { HAL_Delay(delay); }
1679 .loc 1 347 36 is_stmt 1 view -0
1680 .cfi_startproc
1681 @ args = 0, pretend = 0, frame = 0
1682 @ frame_needed = 0, uses_anonymous_args = 0
1683 .loc 1 347 36 is_stmt 0 view .LVU488
1684 0000 08B5 push {r3, lr}
1685 .cfi_def_cfa_offset 8
1686 .cfi_offset 3, -8
1687 .cfi_offset 14, -4
1688 .loc 1 347 38 is_stmt 1 view .LVU489
1689 0002 FFF7FEFF bl HAL_Delay
1690 .LVL210:
1691 .loc 1 347 56 is_stmt 0 view .LVU490
1692 0006 08BD pop {r3, pc}
1693 .cfi_endproc
1694 .LFE141:
1696 .global adbmsspi
1697 .section .bss.adbmsspi,"aw",%nobits
1698 .align 2
1701 adbmsspi:
1702 0000 00000000 .space 4
1703 .text
1704 .Letext0:
1705 .file 2 "/home/chiangni/.config/VSCodium/User/globalStorage/bmd.stm32-for-vscode/@xpack-dev-tools/
1706 .file 3 "/home/chiangni/.config/VSCodium/User/globalStorage/bmd.stm32-for-vscode/@xpack-dev-tools/
1707 .file 4 "Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302x8.h"
1708 .file 5 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h"
1709 .file 6 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h"
1710 .file 7 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h"
1711 .file 8 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_spi.h"
1712 .file 9 "Core/Inc/ADBMS_LL_Driver.h"
1713 .file 10 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h"
ARM GAS /tmp/cc6A08EU.s page 43
DEFINED SYMBOLS
*ABS*:00000000 ADBMS_LL_Driver.c
/tmp/cc6A08EU.s:21 .text.F_CRC_ObtenValorDeTabla:00000000 $t
/tmp/cc6A08EU.s:26 .text.F_CRC_ObtenValorDeTabla:00000000 F_CRC_ObtenValorDeTabla
/tmp/cc6A08EU.s:88 .text.updateCommandPEC:00000000 $t
/tmp/cc6A08EU.s:94 .text.updateCommandPEC:00000000 updateCommandPEC
/tmp/cc6A08EU.s:259 .text.calculateCommandPEC:00000000 $t
/tmp/cc6A08EU.s:265 .text.calculateCommandPEC:00000000 calculateCommandPEC
/tmp/cc6A08EU.s:386 .text.checkCommandPEC:00000000 $t
/tmp/cc6A08EU.s:392 .text.checkCommandPEC:00000000 checkCommandPEC
/tmp/cc6A08EU.s:538 .text.pec10_calc:00000000 $t
/tmp/cc6A08EU.s:544 .text.pec10_calc:00000000 pec10_calc
/tmp/cc6A08EU.s:709 .text.calculateDataPEC:00000000 $t
/tmp/cc6A08EU.s:715 .text.calculateDataPEC:00000000 calculateDataPEC
/tmp/cc6A08EU.s:792 .text.F_CRC_CalculaCheckSum:00000000 $t
/tmp/cc6A08EU.s:798 .text.F_CRC_CalculaCheckSum:00000000 F_CRC_CalculaCheckSum
/tmp/cc6A08EU.s:867 .text.checkDataPEC:00000000 $t
/tmp/cc6A08EU.s:873 .text.checkDataPEC:00000000 checkDataPEC
/tmp/cc6A08EU.s:916 .text.updateDataPEC:00000000 $t
/tmp/cc6A08EU.s:922 .text.updateDataPEC:00000000 updateDataPEC
/tmp/cc6A08EU.s:1023 .text.mcuAdbmsCSLow:00000000 $t
/tmp/cc6A08EU.s:1029 .text.mcuAdbmsCSLow:00000000 mcuAdbmsCSLow
/tmp/cc6A08EU.s:1050 .text.mcuAdbmsCSLow:00000010 $d
/tmp/cc6A08EU.s:1055 .text.mcuAdbmsCSHigh:00000000 $t
/tmp/cc6A08EU.s:1061 .text.mcuAdbmsCSHigh:00000000 mcuAdbmsCSHigh
/tmp/cc6A08EU.s:1082 .text.mcuAdbmsCSHigh:00000010 $d
/tmp/cc6A08EU.s:1087 .text.adbmsDriverInit:00000000 $t
/tmp/cc6A08EU.s:1093 .text.adbmsDriverInit:00000000 adbmsDriverInit
/tmp/cc6A08EU.s:1129 .text.adbmsDriverInit:0000001c $d
/tmp/cc6A08EU.s:1701 .bss.adbmsspi:00000000 adbmsspi
/tmp/cc6A08EU.s:1134 .text.mcuSPITransmit:00000000 $t
/tmp/cc6A08EU.s:1140 .text.mcuSPITransmit:00000000 mcuSPITransmit
/tmp/cc6A08EU.s:1212 .text.mcuSPITransmit:0000003c $d
/tmp/cc6A08EU.s:1217 .text.writeCMD:00000000 $t
/tmp/cc6A08EU.s:1223 .text.writeCMD:00000000 writeCMD
/tmp/cc6A08EU.s:1380 .text.mcuSPIReceive:00000000 $t
/tmp/cc6A08EU.s:1386 .text.mcuSPIReceive:00000000 mcuSPIReceive
/tmp/cc6A08EU.s:1418 .text.mcuSPIReceive:00000014 $d
/tmp/cc6A08EU.s:1423 .text.mcuSPITransmitReceive:00000000 $t
/tmp/cc6A08EU.s:1429 .text.mcuSPITransmitReceive:00000000 mcuSPITransmitReceive
/tmp/cc6A08EU.s:1466 .text.mcuSPITransmitReceive:0000001c $d
/tmp/cc6A08EU.s:1471 .text.readCMD:00000000 $t
/tmp/cc6A08EU.s:1477 .text.readCMD:00000000 readCMD
/tmp/cc6A08EU.s:1594 .text.pollCMD:00000000 $t
/tmp/cc6A08EU.s:1600 .text.pollCMD:00000000 pollCMD
/tmp/cc6A08EU.s:1670 .text.mcuDelay:00000000 $t
/tmp/cc6A08EU.s:1676 .text.mcuDelay:00000000 mcuDelay
/tmp/cc6A08EU.s:1698 .bss.adbmsspi:00000000 $d
UNDEFINED SYMBOLS
HAL_GPIO_WritePin
HAL_Delay
HAL_SPI_TransmitReceive
HAL_SPI_Receive