|
|
ARM GAS /tmp/ccnIeFZt.s page 1
|
|
|
|
|
|
|
|
|
1 .cpu cortex-m0plus
|
|
|
2 .eabi_attribute 20, 1
|
|
|
3 .eabi_attribute 21, 1
|
|
|
4 .eabi_attribute 23, 3
|
|
|
5 .eabi_attribute 24, 1
|
|
|
6 .eabi_attribute 25, 1
|
|
|
7 .eabi_attribute 26, 1
|
|
|
8 .eabi_attribute 30, 1
|
|
|
9 .eabi_attribute 34, 0
|
|
|
10 .eabi_attribute 18, 4
|
|
|
11 .file "voc_sensor.c"
|
|
|
12 .text
|
|
|
13 .Ltext0:
|
|
|
14 .cfi_sections .debug_frame
|
|
|
15 .section .text.user_delay_ms,"ax",%progbits
|
|
|
16 .align 1
|
|
|
17 .syntax unified
|
|
|
18 .code 16
|
|
|
19 .thumb_func
|
|
|
20 .fpu softvfp
|
|
|
22 user_delay_ms:
|
|
|
23 .LFB96:
|
|
|
24 .file 1 "./Src/voc_sensor.c"
|
|
|
1:./Src/voc_sensor.c **** //
|
|
|
2:./Src/voc_sensor.c **** // Created by MightyPork on 2017/11/17.
|
|
|
3:./Src/voc_sensor.c **** //
|
|
|
4:./Src/voc_sensor.c ****
|
|
|
5:./Src/voc_sensor.c **** #include <hw.h>
|
|
|
6:./Src/voc_sensor.c **** #include <hw_i2c.h>
|
|
|
7:./Src/voc_sensor.c **** #include "voc_sensor.h"
|
|
|
8:./Src/voc_sensor.c ****
|
|
|
9:./Src/voc_sensor.c **** struct bme680_dev gas_sensor;
|
|
|
10:./Src/voc_sensor.c ****
|
|
|
11:./Src/voc_sensor.c **** static void user_delay_ms(uint32_t period)
|
|
|
12:./Src/voc_sensor.c **** {
|
|
|
25 .loc 1 12 0
|
|
|
26 .cfi_startproc
|
|
|
27 @ args = 0, pretend = 0, frame = 0
|
|
|
28 @ frame_needed = 0, uses_anonymous_args = 0
|
|
|
29 .LVL0:
|
|
|
30 0000 10B5 push {r4, lr}
|
|
|
31 .LCFI0:
|
|
|
32 .cfi_def_cfa_offset 8
|
|
|
33 .cfi_offset 4, -8
|
|
|
34 .cfi_offset 14, -4
|
|
|
13:./Src/voc_sensor.c **** /*
|
|
|
14:./Src/voc_sensor.c **** * Return control or wait,
|
|
|
15:./Src/voc_sensor.c **** * for a period amount of milliseconds
|
|
|
16:./Src/voc_sensor.c **** */
|
|
|
17:./Src/voc_sensor.c **** HAL_Delay(period);
|
|
|
35 .loc 1 17 0
|
|
|
36 0002 FFF7FEFF bl HAL_Delay
|
|
|
37 .LVL1:
|
|
|
18:./Src/voc_sensor.c **** }
|
|
|
38 .loc 1 18 0
|
|
|
39 @ sp needed
|
|
|
40 0006 10BD pop {r4, pc}
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 2
|
|
|
|
|
|
|
|
|
41 .cfi_endproc
|
|
|
42 .LFE96:
|
|
|
44 .section .text.user_i2c_write,"ax",%progbits
|
|
|
45 .align 1
|
|
|
46 .syntax unified
|
|
|
47 .code 16
|
|
|
48 .thumb_func
|
|
|
49 .fpu softvfp
|
|
|
51 user_i2c_write:
|
|
|
52 .LFB98:
|
|
|
19:./Src/voc_sensor.c ****
|
|
|
20:./Src/voc_sensor.c **** #if 0
|
|
|
21:./Src/voc_sensor.c **** static int8_t user_spi_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
|
|
|
22:./Src/voc_sensor.c **** {
|
|
|
23:./Src/voc_sensor.c **** int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */
|
|
|
24:./Src/voc_sensor.c ****
|
|
|
25:./Src/voc_sensor.c **** /*
|
|
|
26:./Src/voc_sensor.c **** * The parameter dev_id can be used as a variable to select which Chip Select pin has
|
|
|
27:./Src/voc_sensor.c **** * to be set low to activate the relevant device on the SPI bus
|
|
|
28:./Src/voc_sensor.c **** */
|
|
|
29:./Src/voc_sensor.c ****
|
|
|
30:./Src/voc_sensor.c **** /*
|
|
|
31:./Src/voc_sensor.c **** * Data on the bus should be like
|
|
|
32:./Src/voc_sensor.c **** * |----------------+---------------------+-------------|
|
|
|
33:./Src/voc_sensor.c **** * | MOSI | MISO | Chip Select |
|
|
|
34:./Src/voc_sensor.c **** * |----------------+---------------------|-------------|
|
|
|
35:./Src/voc_sensor.c **** * | (don't care) | (don't care) | HIGH |
|
|
|
36:./Src/voc_sensor.c **** * | (reg_addr) | (don't care) | LOW |
|
|
|
37:./Src/voc_sensor.c **** * | (don't care) | (reg_data[0]) | LOW |
|
|
|
38:./Src/voc_sensor.c **** * | (....) | (....) | LOW |
|
|
|
39:./Src/voc_sensor.c **** * | (don't care) | (reg_data[len - 1]) | LOW |
|
|
|
40:./Src/voc_sensor.c **** * | (don't care) | (don't care) | HIGH |
|
|
|
41:./Src/voc_sensor.c **** * |----------------+---------------------|-------------|
|
|
|
42:./Src/voc_sensor.c **** */
|
|
|
43:./Src/voc_sensor.c ****
|
|
|
44:./Src/voc_sensor.c **** return rslt;
|
|
|
45:./Src/voc_sensor.c **** }
|
|
|
46:./Src/voc_sensor.c ****
|
|
|
47:./Src/voc_sensor.c **** static int8_t user_spi_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
|
|
|
48:./Src/voc_sensor.c **** {
|
|
|
49:./Src/voc_sensor.c **** int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */
|
|
|
50:./Src/voc_sensor.c ****
|
|
|
51:./Src/voc_sensor.c **** /*
|
|
|
52:./Src/voc_sensor.c **** * The parameter dev_id can be used as a variable to select which Chip Select pin has
|
|
|
53:./Src/voc_sensor.c **** * to be set low to activate the relevant device on the SPI bus
|
|
|
54:./Src/voc_sensor.c **** */
|
|
|
55:./Src/voc_sensor.c ****
|
|
|
56:./Src/voc_sensor.c **** /*
|
|
|
57:./Src/voc_sensor.c **** * Data on the bus should be like
|
|
|
58:./Src/voc_sensor.c **** * |---------------------+--------------+-------------|
|
|
|
59:./Src/voc_sensor.c **** * | MOSI | MISO | Chip Select |
|
|
|
60:./Src/voc_sensor.c **** * |---------------------+--------------|-------------|
|
|
|
61:./Src/voc_sensor.c **** * | (don't care) | (don't care) | HIGH |
|
|
|
62:./Src/voc_sensor.c **** * | (reg_addr) | (don't care) | LOW |
|
|
|
63:./Src/voc_sensor.c **** * | (reg_data[0]) | (don't care) | LOW |
|
|
|
64:./Src/voc_sensor.c **** * | (....) | (....) | LOW |
|
|
|
65:./Src/voc_sensor.c **** * | (reg_data[len - 1]) | (don't care) | LOW |
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 3
|
|
|
|
|
|
|
|
|
66:./Src/voc_sensor.c **** * | (don't care) | (don't care) | HIGH |
|
|
|
67:./Src/voc_sensor.c **** * |---------------------+--------------|-------------|
|
|
|
68:./Src/voc_sensor.c **** */
|
|
|
69:./Src/voc_sensor.c ****
|
|
|
70:./Src/voc_sensor.c **** return rslt;
|
|
|
71:./Src/voc_sensor.c **** }
|
|
|
72:./Src/voc_sensor.c **** #endif
|
|
|
73:./Src/voc_sensor.c ****
|
|
|
74:./Src/voc_sensor.c **** static int8_t user_i2c_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
|
|
|
75:./Src/voc_sensor.c **** {
|
|
|
76:./Src/voc_sensor.c **** int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */
|
|
|
77:./Src/voc_sensor.c ****
|
|
|
78:./Src/voc_sensor.c **** /*
|
|
|
79:./Src/voc_sensor.c **** * The parameter dev_id can be used as a variable to store the I2C address of the device
|
|
|
80:./Src/voc_sensor.c **** */
|
|
|
81:./Src/voc_sensor.c ****
|
|
|
82:./Src/voc_sensor.c **** /*
|
|
|
83:./Src/voc_sensor.c **** * Data on the bus should be like
|
|
|
84:./Src/voc_sensor.c **** * |------------+---------------------|
|
|
|
85:./Src/voc_sensor.c **** * | I2C action | Data |
|
|
|
86:./Src/voc_sensor.c **** * |------------+---------------------|
|
|
|
87:./Src/voc_sensor.c **** * | Start | - |
|
|
|
88:./Src/voc_sensor.c **** * | Write | (reg_addr) |
|
|
|
89:./Src/voc_sensor.c **** * | Stop | - |
|
|
|
90:./Src/voc_sensor.c **** * | Start | - |
|
|
|
91:./Src/voc_sensor.c **** * | Read | (reg_data[0]) |
|
|
|
92:./Src/voc_sensor.c **** * | Read | (....) |
|
|
|
93:./Src/voc_sensor.c **** * | Read | (reg_data[len - 1]) |
|
|
|
94:./Src/voc_sensor.c **** * | Stop | - |
|
|
|
95:./Src/voc_sensor.c **** * |------------+---------------------|
|
|
|
96:./Src/voc_sensor.c **** */
|
|
|
97:./Src/voc_sensor.c **** HAL_I2C_Master_Transmit(&hi2c1, dev_id<<1, ®_addr, 1, 100);
|
|
|
98:./Src/voc_sensor.c **** HAL_I2C_Master_Receive(&hi2c1, dev_id<<1, reg_data, len, 100);
|
|
|
99:./Src/voc_sensor.c ****
|
|
|
100:./Src/voc_sensor.c **** return rslt;
|
|
|
101:./Src/voc_sensor.c **** }
|
|
|
102:./Src/voc_sensor.c ****
|
|
|
103:./Src/voc_sensor.c **** static int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
|
|
|
104:./Src/voc_sensor.c **** {
|
|
|
53 .loc 1 104 0
|
|
|
54 .cfi_startproc
|
|
|
55 @ args = 0, pretend = 0, frame = 64
|
|
|
56 @ frame_needed = 0, uses_anonymous_args = 0
|
|
|
57 .LVL2:
|
|
|
58 0000 70B5 push {r4, r5, r6, lr}
|
|
|
59 .LCFI1:
|
|
|
60 .cfi_def_cfa_offset 16
|
|
|
61 .cfi_offset 4, -16
|
|
|
62 .cfi_offset 5, -12
|
|
|
63 .cfi_offset 6, -8
|
|
|
64 .cfi_offset 14, -4
|
|
|
65 0002 92B0 sub sp, sp, #72
|
|
|
66 .LCFI2:
|
|
|
67 .cfi_def_cfa_offset 88
|
|
|
105:./Src/voc_sensor.c **** /*
|
|
|
106:./Src/voc_sensor.c **** * The parameter dev_id can be used as a variable to store the I2C address of the device
|
|
|
107:./Src/voc_sensor.c **** */
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 4
|
|
|
|
|
|
|
|
|
108:./Src/voc_sensor.c ****
|
|
|
109:./Src/voc_sensor.c **** /*
|
|
|
110:./Src/voc_sensor.c **** * Data on the bus should be like
|
|
|
111:./Src/voc_sensor.c **** * |------------+---------------------|
|
|
|
112:./Src/voc_sensor.c **** * | I2C action | Data |
|
|
|
113:./Src/voc_sensor.c **** * |------------+---------------------|
|
|
|
114:./Src/voc_sensor.c **** * | Start | - |
|
|
|
115:./Src/voc_sensor.c **** * | Write | (reg_addr) |
|
|
|
116:./Src/voc_sensor.c **** * | Write | (reg_data[0]) |
|
|
|
117:./Src/voc_sensor.c **** * | Write | (....) |
|
|
|
118:./Src/voc_sensor.c **** * | Write | (reg_data[len - 1]) |
|
|
|
119:./Src/voc_sensor.c **** * | Stop | - |
|
|
|
120:./Src/voc_sensor.c **** * |------------+---------------------|
|
|
|
121:./Src/voc_sensor.c **** */
|
|
|
122:./Src/voc_sensor.c **** uint8_t data[64];
|
|
|
123:./Src/voc_sensor.c **** data[0] = reg_addr;
|
|
|
68 .loc 1 123 0
|
|
|
69 0004 02AC add r4, sp, #8
|
|
|
70 0006 2170 strb r1, [r4]
|
|
|
71 .LVL3:
|
|
|
72 .LBB2:
|
|
|
124:./Src/voc_sensor.c **** for (int i = 0; i < len; i++) {
|
|
|
73 .loc 1 124 0
|
|
|
74 0008 0024 movs r4, #0
|
|
|
75 000a 04E0 b .L3
|
|
|
76 .LVL4:
|
|
|
77 .L4:
|
|
|
125:./Src/voc_sensor.c **** data[i+1] = reg_data[i];
|
|
|
78 .loc 1 125 0 discriminator 3
|
|
|
79 000c 1519 adds r5, r2, r4
|
|
|
80 000e 0134 adds r4, r4, #1
|
|
|
81 .LVL5:
|
|
|
82 0010 2E78 ldrb r6, [r5]
|
|
|
83 0012 02AD add r5, sp, #8
|
|
|
84 0014 2E55 strb r6, [r5, r4]
|
|
|
85 .LVL6:
|
|
|
86 .L3:
|
|
|
124:./Src/voc_sensor.c **** for (int i = 0; i < len; i++) {
|
|
|
87 .loc 1 124 0 discriminator 1
|
|
|
88 0016 A342 cmp r3, r4
|
|
|
89 0018 F8DC bgt .L4
|
|
|
90 .LBE2:
|
|
|
126:./Src/voc_sensor.c **** }
|
|
|
127:./Src/voc_sensor.c **** HAL_I2C_Master_Transmit(&hi2c1, dev_id<<1, &data[0], (uint16_t) (len + 1), 100);
|
|
|
91 .loc 1 127 0
|
|
|
92 001a 0133 adds r3, r3, #1
|
|
|
93 .LVL7:
|
|
|
94 001c 9BB2 uxth r3, r3
|
|
|
95 001e 4100 lsls r1, r0, #1
|
|
|
96 .LVL8:
|
|
|
97 0020 6422 movs r2, #100
|
|
|
98 .LVL9:
|
|
|
99 0022 0092 str r2, [sp]
|
|
|
100 0024 02AA add r2, sp, #8
|
|
|
101 0026 0348 ldr r0, .L5
|
|
|
102 .LVL10:
|
|
|
103 0028 FFF7FEFF bl HAL_I2C_Master_Transmit
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 5
|
|
|
|
|
|
|
|
|
104 .LVL11:
|
|
|
128:./Src/voc_sensor.c ****
|
|
|
129:./Src/voc_sensor.c **** return BME680_OK;
|
|
|
130:./Src/voc_sensor.c **** }
|
|
|
105 .loc 1 130 0
|
|
|
106 002c 0020 movs r0, #0
|
|
|
107 002e 12B0 add sp, sp, #72
|
|
|
108 @ sp needed
|
|
|
109 .LVL12:
|
|
|
110 0030 70BD pop {r4, r5, r6, pc}
|
|
|
111 .L6:
|
|
|
112 0032 C046 .align 2
|
|
|
113 .L5:
|
|
|
114 0034 00000000 .word hi2c1
|
|
|
115 .cfi_endproc
|
|
|
116 .LFE98:
|
|
|
118 .section .text.user_i2c_read,"ax",%progbits
|
|
|
119 .align 1
|
|
|
120 .syntax unified
|
|
|
121 .code 16
|
|
|
122 .thumb_func
|
|
|
123 .fpu softvfp
|
|
|
125 user_i2c_read:
|
|
|
126 .LFB97:
|
|
|
75:./Src/voc_sensor.c **** int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */
|
|
|
127 .loc 1 75 0
|
|
|
128 .cfi_startproc
|
|
|
129 @ args = 0, pretend = 0, frame = 8
|
|
|
130 @ frame_needed = 0, uses_anonymous_args = 0
|
|
|
131 .LVL13:
|
|
|
132 0000 F0B5 push {r4, r5, r6, r7, lr}
|
|
|
133 .LCFI3:
|
|
|
134 .cfi_def_cfa_offset 20
|
|
|
135 .cfi_offset 4, -20
|
|
|
136 .cfi_offset 5, -16
|
|
|
137 .cfi_offset 6, -12
|
|
|
138 .cfi_offset 7, -8
|
|
|
139 .cfi_offset 14, -4
|
|
|
140 0002 85B0 sub sp, sp, #20
|
|
|
141 .LCFI4:
|
|
|
142 .cfi_def_cfa_offset 40
|
|
|
143 0004 0292 str r2, [sp, #8]
|
|
|
144 0006 1F00 movs r7, r3
|
|
|
145 0008 0F23 movs r3, #15
|
|
|
146 .LVL14:
|
|
|
147 000a 6B44 add r3, r3, sp
|
|
|
148 000c 1A00 movs r2, r3
|
|
|
149 .LVL15:
|
|
|
150 000e 1970 strb r1, [r3]
|
|
|
151 .LVL16:
|
|
|
97:./Src/voc_sensor.c **** HAL_I2C_Master_Receive(&hi2c1, dev_id<<1, reg_data, len, 100);
|
|
|
152 .loc 1 97 0
|
|
|
153 0010 4400 lsls r4, r0, #1
|
|
|
154 0012 094D ldr r5, .L8
|
|
|
155 0014 6426 movs r6, #100
|
|
|
156 0016 0096 str r6, [sp]
|
|
|
157 0018 0123 movs r3, #1
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 6
|
|
|
|
|
|
|
|
|
158 001a 2100 movs r1, r4
|
|
|
159 .LVL17:
|
|
|
160 001c 2800 movs r0, r5
|
|
|
161 .LVL18:
|
|
|
162 001e FFF7FEFF bl HAL_I2C_Master_Transmit
|
|
|
163 .LVL19:
|
|
|
98:./Src/voc_sensor.c ****
|
|
|
164 .loc 1 98 0
|
|
|
165 0022 0096 str r6, [sp]
|
|
|
166 0024 3B00 movs r3, r7
|
|
|
167 0026 029A ldr r2, [sp, #8]
|
|
|
168 0028 2100 movs r1, r4
|
|
|
169 002a 2800 movs r0, r5
|
|
|
170 002c FFF7FEFF bl HAL_I2C_Master_Receive
|
|
|
171 .LVL20:
|
|
|
101:./Src/voc_sensor.c ****
|
|
|
172 .loc 1 101 0
|
|
|
173 0030 0020 movs r0, #0
|
|
|
174 0032 05B0 add sp, sp, #20
|
|
|
175 @ sp needed
|
|
|
176 0034 F0BD pop {r4, r5, r6, r7, pc}
|
|
|
177 .L9:
|
|
|
178 0036 C046 .align 2
|
|
|
179 .L8:
|
|
|
180 0038 00000000 .word hi2c1
|
|
|
181 .cfi_endproc
|
|
|
182 .LFE97:
|
|
|
184 .section .text.voc_init,"ax",%progbits
|
|
|
185 .align 1
|
|
|
186 .global voc_init
|
|
|
187 .syntax unified
|
|
|
188 .code 16
|
|
|
189 .thumb_func
|
|
|
190 .fpu softvfp
|
|
|
192 voc_init:
|
|
|
193 .LFB99:
|
|
|
131:./Src/voc_sensor.c ****
|
|
|
132:./Src/voc_sensor.c ****
|
|
|
133:./Src/voc_sensor.c **** void voc_init(void)
|
|
|
134:./Src/voc_sensor.c **** {
|
|
|
194 .loc 1 134 0
|
|
|
195 .cfi_startproc
|
|
|
196 @ args = 0, pretend = 0, frame = 0
|
|
|
197 @ frame_needed = 0, uses_anonymous_args = 0
|
|
|
198 0000 70B5 push {r4, r5, r6, lr}
|
|
|
199 .LCFI5:
|
|
|
200 .cfi_def_cfa_offset 16
|
|
|
201 .cfi_offset 4, -16
|
|
|
202 .cfi_offset 5, -12
|
|
|
203 .cfi_offset 6, -8
|
|
|
204 .cfi_offset 14, -4
|
|
|
135:./Src/voc_sensor.c **** int8_t rslt;
|
|
|
136:./Src/voc_sensor.c **** gas_sensor.dev_id = BME680_I2C_ADDR_PRIMARY;
|
|
|
205 .loc 1 136 0
|
|
|
206 0002 174C ldr r4, .L11
|
|
|
207 0004 7623 movs r3, #118
|
|
|
208 0006 6370 strb r3, [r4, #1]
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 7
|
|
|
|
|
|
|
|
|
137:./Src/voc_sensor.c **** gas_sensor.intf = BME680_I2C_INTF;
|
|
|
209 .loc 1 137 0
|
|
|
210 0008 0125 movs r5, #1
|
|
|
211 000a A570 strb r5, [r4, #2]
|
|
|
138:./Src/voc_sensor.c **** gas_sensor.read = user_i2c_read;
|
|
|
212 .loc 1 138 0
|
|
|
213 000c 154B ldr r3, .L11+4
|
|
|
214 000e A364 str r3, [r4, #72]
|
|
|
139:./Src/voc_sensor.c **** gas_sensor.write = user_i2c_write;
|
|
|
215 .loc 1 139 0
|
|
|
216 0010 154B ldr r3, .L11+8
|
|
|
217 0012 E364 str r3, [r4, #76]
|
|
|
140:./Src/voc_sensor.c **** gas_sensor.delay_ms = user_delay_ms;
|
|
|
218 .loc 1 140 0
|
|
|
219 0014 154B ldr r3, .L11+12
|
|
|
220 0016 2365 str r3, [r4, #80]
|
|
|
141:./Src/voc_sensor.c ****
|
|
|
142:./Src/voc_sensor.c **** PRINTF("BME680 initializing...\r\n");
|
|
|
221 .loc 1 142 0
|
|
|
222 0018 1548 ldr r0, .L11+16
|
|
|
223 001a FFF7FEFF bl vcom_Send
|
|
|
224 .LVL21:
|
|
|
143:./Src/voc_sensor.c **** rslt = bme680_init(&gas_sensor);
|
|
|
225 .loc 1 143 0
|
|
|
226 001e 2000 movs r0, r4
|
|
|
227 0020 FFF7FEFF bl bme680_init
|
|
|
228 .LVL22:
|
|
|
144:./Src/voc_sensor.c **** assert_param(rslt == BME680_OK);
|
|
|
145:./Src/voc_sensor.c ****
|
|
|
146:./Src/voc_sensor.c ****
|
|
|
147:./Src/voc_sensor.c **** PRINTF("BME680 configuring...\r\n");
|
|
|
229 .loc 1 147 0
|
|
|
230 0024 1348 ldr r0, .L11+20
|
|
|
231 0026 FFF7FEFF bl vcom_Send
|
|
|
232 .LVL23:
|
|
|
148:./Src/voc_sensor.c **** /* Set the temperature, pressure and humidity settings */
|
|
|
149:./Src/voc_sensor.c **** gas_sensor.tph_sett.os_hum = BME680_OS_2X;
|
|
|
233 .loc 1 149 0
|
|
|
234 002a 0223 movs r3, #2
|
|
|
235 002c 3822 movs r2, #56
|
|
|
236 002e A354 strb r3, [r4, r2]
|
|
|
150:./Src/voc_sensor.c **** gas_sensor.tph_sett.os_pres = BME680_OS_4X;
|
|
|
237 .loc 1 150 0
|
|
|
238 0030 0232 adds r2, r2, #2
|
|
|
239 0032 0321 movs r1, #3
|
|
|
240 0034 A154 strb r1, [r4, r2]
|
|
|
151:./Src/voc_sensor.c **** gas_sensor.tph_sett.os_temp = BME680_OS_8X;
|
|
|
241 .loc 1 151 0
|
|
|
242 0036 013A subs r2, r2, #1
|
|
|
243 0038 0131 adds r1, r1, #1
|
|
|
244 003a A154 strb r1, [r4, r2]
|
|
|
152:./Src/voc_sensor.c **** gas_sensor.tph_sett.filter = BME680_FILTER_SIZE_3;
|
|
|
245 .loc 1 152 0
|
|
|
246 003c 0232 adds r2, r2, #2
|
|
|
247 003e A354 strb r3, [r4, r2]
|
|
|
153:./Src/voc_sensor.c ****
|
|
|
154:./Src/voc_sensor.c **** /* Set the remaining gas sensor settings and link the heating profile */
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 8
|
|
|
|
|
|
|
|
|
155:./Src/voc_sensor.c **** gas_sensor.gas_sett.run_gas = BME680_ENABLE_GAS_MEAS;
|
|
|
248 .loc 1 155 0
|
|
|
249 0040 3C33 adds r3, r3, #60
|
|
|
250 0042 E554 strb r5, [r4, r3]
|
|
|
156:./Src/voc_sensor.c **** /* Create a ramp heat waveform in 3 steps */
|
|
|
157:./Src/voc_sensor.c **** gas_sensor.gas_sett.heatr_temp = 320; /* degree Celsius */
|
|
|
251 .loc 1 157 0
|
|
|
252 0044 0233 adds r3, r3, #2
|
|
|
253 0046 0632 adds r2, r2, #6
|
|
|
254 0048 FF32 adds r2, r2, #255
|
|
|
255 004a E252 strh r2, [r4, r3]
|
|
|
158:./Src/voc_sensor.c **** gas_sensor.gas_sett.heatr_dur = 150; /* milliseconds */
|
|
|
256 .loc 1 158 0
|
|
|
257 004c 0233 adds r3, r3, #2
|
|
|
258 004e AA3A subs r2, r2, #170
|
|
|
259 0050 E252 strh r2, [r4, r3]
|
|
|
159:./Src/voc_sensor.c ****
|
|
|
160:./Src/voc_sensor.c **** /* Select the power mode */
|
|
|
161:./Src/voc_sensor.c **** /* Must be set before writing the sensor configuration */
|
|
|
162:./Src/voc_sensor.c **** gas_sensor.power_mode = BME680_FORCED_MODE;
|
|
|
260 .loc 1 162 0
|
|
|
261 0052 0233 adds r3, r3, #2
|
|
|
262 0054 E554 strb r5, [r4, r3]
|
|
|
263 .LVL24:
|
|
|
163:./Src/voc_sensor.c ****
|
|
|
164:./Src/voc_sensor.c **** /* Set the required sensor settings needed */
|
|
|
165:./Src/voc_sensor.c **** uint8_t set_required_settings = BME680_OST_SEL | BME680_OSP_SEL | BME680_OSH_SEL | BME680_FILTER_S
|
|
|
166:./Src/voc_sensor.c ****
|
|
|
167:./Src/voc_sensor.c **** /* Set the desired sensor configuration */
|
|
|
168:./Src/voc_sensor.c **** rslt = bme680_set_sensor_settings(set_required_settings,&gas_sensor);
|
|
|
264 .loc 1 168 0
|
|
|
265 0056 2100 movs r1, r4
|
|
|
266 0058 DF20 movs r0, #223
|
|
|
267 005a FFF7FEFF bl bme680_set_sensor_settings
|
|
|
268 .LVL25:
|
|
|
169:./Src/voc_sensor.c **** assert_param(rslt == BME680_OK);
|
|
|
170:./Src/voc_sensor.c **** }
|
|
|
269 .loc 1 170 0
|
|
|
270 @ sp needed
|
|
|
271 005e 70BD pop {r4, r5, r6, pc}
|
|
|
272 .L12:
|
|
|
273 .align 2
|
|
|
274 .L11:
|
|
|
275 0060 00000000 .word .LANCHOR0
|
|
|
276 0064 00000000 .word user_i2c_read
|
|
|
277 0068 00000000 .word user_i2c_write
|
|
|
278 006c 00000000 .word user_delay_ms
|
|
|
279 0070 00000000 .word .LC6
|
|
|
280 0074 1C000000 .word .LC8
|
|
|
281 .cfi_endproc
|
|
|
282 .LFE99:
|
|
|
284 .global __aeabi_i2f
|
|
|
285 .global __aeabi_fdiv
|
|
|
286 .global __aeabi_ui2f
|
|
|
287 .global __aeabi_f2d
|
|
|
288 .section .text.voc_measure,"ax",%progbits
|
|
|
289 .align 1
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 9
|
|
|
|
|
|
|
|
|
290 .global voc_measure
|
|
|
291 .syntax unified
|
|
|
292 .code 16
|
|
|
293 .thumb_func
|
|
|
294 .fpu softvfp
|
|
|
296 voc_measure:
|
|
|
297 .LFB100:
|
|
|
171:./Src/voc_sensor.c ****
|
|
|
172:./Src/voc_sensor.c **** void voc_measure(void)
|
|
|
173:./Src/voc_sensor.c **** {
|
|
|
298 .loc 1 173 0
|
|
|
299 .cfi_startproc
|
|
|
300 @ args = 0, pretend = 0, frame = 32
|
|
|
301 @ frame_needed = 0, uses_anonymous_args = 0
|
|
|
302 0000 F0B5 push {r4, r5, r6, r7, lr}
|
|
|
303 .LCFI6:
|
|
|
304 .cfi_def_cfa_offset 20
|
|
|
305 .cfi_offset 4, -20
|
|
|
306 .cfi_offset 5, -16
|
|
|
307 .cfi_offset 6, -12
|
|
|
308 .cfi_offset 7, -8
|
|
|
309 .cfi_offset 14, -4
|
|
|
310 0002 8DB0 sub sp, sp, #52
|
|
|
311 .LCFI7:
|
|
|
312 .cfi_def_cfa_offset 72
|
|
|
174:./Src/voc_sensor.c **** /* Set the power mode */
|
|
|
175:./Src/voc_sensor.c **** int8_t rslt;
|
|
|
176:./Src/voc_sensor.c ****
|
|
|
177:./Src/voc_sensor.c **** rslt = bme680_set_sensor_mode(&gas_sensor);
|
|
|
313 .loc 1 177 0
|
|
|
314 0004 254D ldr r5, .L16
|
|
|
315 0006 2800 movs r0, r5
|
|
|
316 0008 FFF7FEFF bl bme680_set_sensor_mode
|
|
|
317 .LVL26:
|
|
|
178:./Src/voc_sensor.c **** assert_param(rslt == BME680_OK);
|
|
|
179:./Src/voc_sensor.c ****
|
|
|
180:./Src/voc_sensor.c **** /* Get the total measurement duration so as to sleep or wait till the
|
|
|
181:./Src/voc_sensor.c **** * measurement is complete */
|
|
|
182:./Src/voc_sensor.c **** uint16_t meas_period;
|
|
|
183:./Src/voc_sensor.c **** bme680_get_profile_dur(&meas_period, &gas_sensor);
|
|
|
318 .loc 1 183 0
|
|
|
319 000c 2624 movs r4, #38
|
|
|
320 000e 02AB add r3, sp, #8
|
|
|
321 0010 9C46 mov ip, r3
|
|
|
322 0012 6444 add r4, r4, ip
|
|
|
323 0014 2900 movs r1, r5
|
|
|
324 0016 2000 movs r0, r4
|
|
|
325 0018 FFF7FEFF bl bme680_get_profile_dur
|
|
|
326 .LVL27:
|
|
|
184:./Src/voc_sensor.c **** HAL_Delay(meas_period); /* Delay till the measurement is ready */
|
|
|
327 .loc 1 184 0
|
|
|
328 001c 2088 ldrh r0, [r4]
|
|
|
329 001e FFF7FEFF bl HAL_Delay
|
|
|
330 .LVL28:
|
|
|
185:./Src/voc_sensor.c **** struct bme680_field_data data;
|
|
|
186:./Src/voc_sensor.c ****
|
|
|
187:./Src/voc_sensor.c **** rslt = bme680_get_sensor_data(&data, &gas_sensor);
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 10
|
|
|
|
|
|
|
|
|
331 .loc 1 187 0
|
|
|
332 0022 06AC add r4, sp, #24
|
|
|
333 0024 2900 movs r1, r5
|
|
|
334 0026 2000 movs r0, r4
|
|
|
335 0028 FFF7FEFF bl bme680_get_sensor_data
|
|
|
336 .LVL29:
|
|
|
188:./Src/voc_sensor.c **** assert_param(rslt == BME680_OK);
|
|
|
189:./Src/voc_sensor.c ****
|
|
|
190:./Src/voc_sensor.c **** PRINTF("T: %.2f degC, P: %.2f hPa, H %.2f %%rH ", data.temperature / 100.0f,
|
|
|
337 .loc 1 190 0
|
|
|
338 002c 0423 movs r3, #4
|
|
|
339 002e E05E ldrsh r0, [r4, r3]
|
|
|
340 0030 FFF7FEFF bl __aeabi_i2f
|
|
|
341 .LVL30:
|
|
|
342 0034 1A49 ldr r1, .L16+4
|
|
|
343 0036 FFF7FEFF bl __aeabi_fdiv
|
|
|
344 .LVL31:
|
|
|
345 003a 071C adds r7, r0, #0
|
|
|
346 003c A068 ldr r0, [r4, #8]
|
|
|
347 003e FFF7FEFF bl __aeabi_ui2f
|
|
|
348 .LVL32:
|
|
|
349 0042 1749 ldr r1, .L16+4
|
|
|
350 0044 FFF7FEFF bl __aeabi_fdiv
|
|
|
351 .LVL33:
|
|
|
352 0048 051C adds r5, r0, #0
|
|
|
353 004a E068 ldr r0, [r4, #12]
|
|
|
354 004c FFF7FEFF bl __aeabi_ui2f
|
|
|
355 .LVL34:
|
|
|
356 0050 1449 ldr r1, .L16+8
|
|
|
357 0052 FFF7FEFF bl __aeabi_fdiv
|
|
|
358 .LVL35:
|
|
|
359 0056 061C adds r6, r0, #0
|
|
|
360 0058 381C adds r0, r7, #0
|
|
|
361 005a FFF7FEFF bl __aeabi_f2d
|
|
|
362 .LVL36:
|
|
|
363 005e 0490 str r0, [sp, #16]
|
|
|
364 0060 0591 str r1, [sp, #20]
|
|
|
365 0062 301C adds r0, r6, #0
|
|
|
366 0064 FFF7FEFF bl __aeabi_f2d
|
|
|
367 .LVL37:
|
|
|
368 0068 0290 str r0, [sp, #8]
|
|
|
369 006a 0391 str r1, [sp, #12]
|
|
|
370 006c 281C adds r0, r5, #0
|
|
|
371 006e FFF7FEFF bl __aeabi_f2d
|
|
|
372 .LVL38:
|
|
|
373 0072 0090 str r0, [sp]
|
|
|
374 0074 0191 str r1, [sp, #4]
|
|
|
375 0076 049A ldr r2, [sp, #16]
|
|
|
376 0078 059B ldr r3, [sp, #20]
|
|
|
377 007a 0B48 ldr r0, .L16+12
|
|
|
378 007c FFF7FEFF bl vcom_Send
|
|
|
379 .LVL39:
|
|
|
191:./Src/voc_sensor.c **** data.pressure / 100.0f, data.humidity / 1000.0f );
|
|
|
192:./Src/voc_sensor.c **** /* Avoid using measurements from an unstable heating setup */
|
|
|
193:./Src/voc_sensor.c **** if(data.status & BME680_GASM_VALID_MSK)
|
|
|
380 .loc 1 193 0
|
|
|
381 0080 2378 ldrb r3, [r4]
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 11
|
|
|
|
|
|
|
|
|
382 0082 9B06 lsls r3, r3, #26
|
|
|
383 0084 04D4 bmi .L15
|
|
|
384 .L14:
|
|
|
194:./Src/voc_sensor.c **** PRINTF(", G: %d ohms", data.gas_resistance);
|
|
|
195:./Src/voc_sensor.c ****
|
|
|
196:./Src/voc_sensor.c **** PRINTF("\r\n");
|
|
|
385 .loc 1 196 0
|
|
|
386 0086 0948 ldr r0, .L16+16
|
|
|
387 0088 FFF7FEFF bl vcom_Send
|
|
|
388 .LVL40:
|
|
|
197:./Src/voc_sensor.c **** }
|
|
|
389 .loc 1 197 0
|
|
|
390 008c 0DB0 add sp, sp, #52
|
|
|
391 @ sp needed
|
|
|
392 008e F0BD pop {r4, r5, r6, r7, pc}
|
|
|
393 .L15:
|
|
|
194:./Src/voc_sensor.c **** PRINTF(", G: %d ohms", data.gas_resistance);
|
|
|
394 .loc 1 194 0
|
|
|
395 0090 0A99 ldr r1, [sp, #40]
|
|
|
396 0092 0748 ldr r0, .L16+20
|
|
|
397 0094 FFF7FEFF bl vcom_Send
|
|
|
398 .LVL41:
|
|
|
399 0098 F5E7 b .L14
|
|
|
400 .L17:
|
|
|
401 009a C046 .align 2
|
|
|
402 .L16:
|
|
|
403 009c 00000000 .word .LANCHOR0
|
|
|
404 00a0 0000C842 .word 1120403456
|
|
|
405 00a4 00007A44 .word 1148846080
|
|
|
406 00a8 00000000 .word .LC11
|
|
|
407 00ac 38000000 .word .LC15
|
|
|
408 00b0 28000000 .word .LC13
|
|
|
409 .cfi_endproc
|
|
|
410 .LFE100:
|
|
|
412 .global gas_sensor
|
|
|
413 .section .bss.gas_sensor,"aw",%nobits
|
|
|
414 .align 2
|
|
|
415 .set .LANCHOR0,. + 0
|
|
|
418 gas_sensor:
|
|
|
419 0000 00000000 .space 88
|
|
|
419 00000000
|
|
|
419 00000000
|
|
|
419 00000000
|
|
|
419 00000000
|
|
|
420 .section .rodata.voc_init.str1.4,"aMS",%progbits,1
|
|
|
421 .align 2
|
|
|
422 .LC6:
|
|
|
423 0000 424D4536 .ascii "BME680 initializing...\015\012\000"
|
|
|
423 38302069
|
|
|
423 6E697469
|
|
|
423 616C697A
|
|
|
423 696E672E
|
|
|
424 0019 000000 .space 3
|
|
|
425 .LC8:
|
|
|
426 001c 424D4536 .ascii "BME680 configuring...\015\012\000"
|
|
|
426 38302063
|
|
|
426 6F6E6669
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 12
|
|
|
|
|
|
|
|
|
426 67757269
|
|
|
426 6E672E2E
|
|
|
427 .section .rodata.voc_measure.str1.4,"aMS",%progbits,1
|
|
|
428 .align 2
|
|
|
429 .LC11:
|
|
|
430 0000 543A2025 .ascii "T: %.2f degC, P: %.2f hPa, H %.2f %%rH \000"
|
|
|
430 2E326620
|
|
|
430 64656743
|
|
|
430 2C20503A
|
|
|
430 20252E32
|
|
|
431 .LC13:
|
|
|
432 0028 2C20473A .ascii ", G: %d ohms\000"
|
|
|
432 20256420
|
|
|
432 6F686D73
|
|
|
432 00
|
|
|
433 0035 000000 .space 3
|
|
|
434 .LC15:
|
|
|
435 0038 0D0A00 .ascii "\015\012\000"
|
|
|
436 .text
|
|
|
437 .Letext0:
|
|
|
438 .file 2 "/usr/arm-none-eabi/include/machine/_default_types.h"
|
|
|
439 .file 3 "/usr/arm-none-eabi/include/sys/lock.h"
|
|
|
440 .file 4 "/usr/arm-none-eabi/include/sys/_types.h"
|
|
|
441 .file 5 "/usr/lib/gcc/arm-none-eabi/7.2.0/include/stddef.h"
|
|
|
442 .file 6 "/usr/arm-none-eabi/include/sys/reent.h"
|
|
|
443 .file 7 "/usr/arm-none-eabi/include/math.h"
|
|
|
444 .file 8 "/usr/arm-none-eabi/include/sys/_stdint.h"
|
|
|
445 .file 9 "Drivers/CMSIS/Device/ST/STM32L0xx/Include/system_stm32l0xx.h"
|
|
|
446 .file 10 "Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l073xx.h"
|
|
|
447 .file 11 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h"
|
|
|
448 .file 12 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dma.h"
|
|
|
449 .file 13 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c.h"
|
|
|
450 .file 14 "Inc/hw_i2c.h"
|
|
|
451 .file 15 "./Src/../Drivers/BME680/bme680_defs.h"
|
|
|
452 .file 16 "./Src/voc_sensor.h"
|
|
|
453 .file 17 "./Src/../Drivers/BME680/bme680.h"
|
|
|
454 .file 18 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h"
|
|
|
455 .file 19 "Inc/vcom.h"
|
|
|
ARM GAS /tmp/ccnIeFZt.s page 13
|
|
|
|
|
|
|
|
|
DEFINED SYMBOLS
|
|
|
*ABS*:0000000000000000 voc_sensor.c
|
|
|
/tmp/ccnIeFZt.s:16 .text.user_delay_ms:0000000000000000 $t
|
|
|
/tmp/ccnIeFZt.s:22 .text.user_delay_ms:0000000000000000 user_delay_ms
|
|
|
/tmp/ccnIeFZt.s:45 .text.user_i2c_write:0000000000000000 $t
|
|
|
/tmp/ccnIeFZt.s:51 .text.user_i2c_write:0000000000000000 user_i2c_write
|
|
|
/tmp/ccnIeFZt.s:114 .text.user_i2c_write:0000000000000034 $d
|
|
|
/tmp/ccnIeFZt.s:119 .text.user_i2c_read:0000000000000000 $t
|
|
|
/tmp/ccnIeFZt.s:125 .text.user_i2c_read:0000000000000000 user_i2c_read
|
|
|
/tmp/ccnIeFZt.s:180 .text.user_i2c_read:0000000000000038 $d
|
|
|
/tmp/ccnIeFZt.s:185 .text.voc_init:0000000000000000 $t
|
|
|
/tmp/ccnIeFZt.s:192 .text.voc_init:0000000000000000 voc_init
|
|
|
/tmp/ccnIeFZt.s:275 .text.voc_init:0000000000000060 $d
|
|
|
/tmp/ccnIeFZt.s:289 .text.voc_measure:0000000000000000 $t
|
|
|
/tmp/ccnIeFZt.s:296 .text.voc_measure:0000000000000000 voc_measure
|
|
|
/tmp/ccnIeFZt.s:403 .text.voc_measure:000000000000009c $d
|
|
|
/tmp/ccnIeFZt.s:418 .bss.gas_sensor:0000000000000000 gas_sensor
|
|
|
/tmp/ccnIeFZt.s:414 .bss.gas_sensor:0000000000000000 $d
|
|
|
/tmp/ccnIeFZt.s:421 .rodata.voc_init.str1.4:0000000000000000 $d
|
|
|
/tmp/ccnIeFZt.s:428 .rodata.voc_measure.str1.4:0000000000000000 $d
|
|
|
.debug_frame:0000000000000010 $d
|
|
|
|
|
|
UNDEFINED SYMBOLS
|
|
|
HAL_Delay
|
|
|
HAL_I2C_Master_Transmit
|
|
|
hi2c1
|
|
|
HAL_I2C_Master_Receive
|
|
|
vcom_Send
|
|
|
bme680_init
|
|
|
bme680_set_sensor_settings
|
|
|
__aeabi_i2f
|
|
|
__aeabi_fdiv
|
|
|
__aeabi_ui2f
|
|
|
__aeabi_f2d
|
|
|
bme680_set_sensor_mode
|
|
|
bme680_get_profile_dur
|
|
|
bme680_get_sensor_data
|
|
|
|