-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
301 lines (274 loc) · 7.48 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
GeekVape Aegis Legend
Microcontroller: NuvoTon NUC126LG4AE
Display: ST7735S, 80x160
Shunt: 25 mΩ
CONFIG0 = 0xF73FFB7E 0b1111_0111_0011_1111_1111_1011_0111_1110
CONFIG1 = 0x0003F800
CWDTEN 111 WDT hardware enable function is inactive
CWDTPDEN 1 WDT controller by LIRC on power-down mode
CFGXT1 0 PF[4:3] configured as GPIO (no HXT)
CFOSC 1 HCLK = 22.1184 MHz HIRC at reset
CBODEN 0 Brown-out detect Enabled after powered on
CBOV 01 Brown-out voltage is 2.7V
CBORST 1 Brown-out reset Disabled after powered on
ICELOCK 1 Enable ICE function
CIOINI 0 All GPIO set as input tri-state mode after powered on
CBS 01 Boot from LDROM without IAP mode
MERASE 1 ISP Flash Mass Erase command Disabled
LOCK 1 Flash memory content is not locked
DFEN 0 Data Flash Enabled
DFBA 0x3F800 Data Flash Base address
HCLK 71884800 Hz
PLL 143769600 Hz
MFP Settings
PA.1 MFP6 PWM1 channel 4 output/capture input
PA.2 MFP6 PWM1 channel 3 output/capture input
PA.3 MFP6 PWM1 channel 2 output/capture input
PB.0 MFP1 ADC0 channel 0 analog input
PB.3 MFP1 ADC0 channel 3 analog input
PB.4 MFP1 ADC0 channel 4 analog input
PB.5 MFP1 ADC0 channel 13 analog input
PB.6 MFP1 ADC0 channel 14 analog input
PB.7 MFP1 ADC0 channel 15 analog input
PC.0 MFP2 SPI0 serial clock pin
PC.3 MFP2 SPI0 MOSI (Master Out, Slave In) pin
PD.7 MFP6 PWM0 channel 5 output/capture input
Pinout
1 PB.5 ADC0 channel 13 analog input ( Battery charging current )
2 PB.6 ADC0 channel 14 analog input ( Coil current )
3 PB.7 ADC0 channel 15 analog input ( Coil voltage )
4 nRESET
5 PD.0 I/O Quasi (High) ( + Button )
6 AVSS GND
7 PD.1 I/O Out (Low) ( Unused )
8 PD.2 I/O Out ( Display VDD )
9 PD.3 I/O Out (Low) ( Unused )
10 VBAT
11 PF.0 I/O Out (Low) ( Unused )
12 PF.1 I/O Out (Low) ( Unused )
13 PF.2 I/O Out (Low) ( Unused )
14 PD.7 PWM0 channel 5 output ( Battery Charge Current Driver )
15 PF.3 I/O Out (Low) ( Unused )
16 PF.4 I/O Out ( ? Low When Battery Low )
17 LDO_CAP
18 VSS GND
19 PC.0 SPI0 serial clock pin (SCL) ( Display Serial Clock )
20 PC.1 I/O Out ( Display Data/Instruction Select )
21 PC.2 I/O Out ( Display Reset )
22 PC.3 SPI0 MOSI pin (SDA) ( Display Serial Data )
23 PC.4 I/O Out ( Display Chip Select )
24 PE.0 I/O In ( USB Sensing (Plugged:High) )
25 PE.6 I/O Out (Low) ( Unused )
26 PE.7 I/O Out (Low) ( Unused )
27 PE.10 I/O Quasi (High) ( Fire Button )
28 PE.11 I/O Out ( Buck/Boost Enable (High) )
29 PE.12 I/O Out ( Buck/Boost Enable (High) )
30 PE.13 I/O Quasi (High) ( - Button )
31 VDDIO 3.3V
32 USB_VBUS
33 USB_D-
34 USB_D+
35 USB_VDD33_CAP
36 PF.7 I/O Out (Low) ( Unused )
37 PA.3 PWM1 channel 2 output ( LCD Backlight LED Driver )
38 PA.2 PWM1 channel 3 output ( Boost Converter Driver )
39 PA.1 PWM1 channel 4 output ( Buck Converter Driver )
40 PA.0 I/O Out ( Cell 2 Charger Enable (Low) )
41 VDD 3.3V
42 AVDD 3.3V
43 VREF 3.3V
44 PB.0 ADC0 channel 0 analog input ( Cell 1+2 )
45 PB.1 I/O Out ( ? High When Sleeping )
46 PB.2 I/O Out ( Cell 1 Charger Enable (Low) )
47 PB.3 ADC0 channel 3 analog input ( Board Temperature Sensor )
48 PB.4 ADC0 channel 4 analog input ( Cell 1 )
ADC CLK = HIRC / 7 = 3.254 MHz, VREF = 3.3V
Cell 1+2 Voltage ( ( 3 * 3300 * CH0 ) >> 12 ) + 90 ( + 400 If PF4 Low ) Max 9900 mV
Cell 1 Voltage ( ( 3 * 3300 / 2 * CH4 ) >> 12 ) + 35 Max 4950 mV
Battery Charge Current ( 3300 * CH13 ) >> 12 Max 3300 mA
Coil Current 40 * ( ( 3300 * CH14 ) >> 12 ) Max 132 A
Coil Voltage ( 6 * 3300 * CH15 ) >> 12 Max 19800 mV
Board Temperature Sensor ( 10000 * CH3 ) / ( 4096 - CH3 )
Config = 0x55AA55AA + Config Data (52) + CRC32( config data )
0 4 Selectable Modes Bitfield (0x9FF)
1 4 Flags (Bitfield)
2 4 Puff Count
3 4
4 4 Registered Coil
5 2 TCR
6 2 TC Temperature °C
7 2 TC Temperature °F
8 2 Power
9 2 TCR Voltage (250)
10 2 VPC-P1
11 2 VPC-P2
12 2 VPC-P3
13 2 VPC-P4
14 2 VPC-P5
15 2 TC Power Limit
16 1 Mode (0:TCR,1:Power,2:TC,3:VPC,4:Bypass)
17 1 Mode Screen (0:Power,1:Ti,2:Ni,3:?(TCR/90),4:SS,5:?(TCR/92),6-8:TCR,9:?(Power),10:Bypass,11-13:VPC,14+:?(TC))
18 1 Screen Brightness (0..100)
19 1 Keys Locked
20 1
21 1
22 1
23 1 Coil Lock
24 1 Color Scheme (0..2)
25 1 (Align 4)
26 0 (End of Flash config)
27 1 1:Idle,2:Measure,3:Fire (?)
28 2 Puff Time
29 4 CoilResistance
30 4 Coil Current
31 4 Coil Voltage
32 4 Battery Cell 1 (Idle state)
33 4 Battery Cell 2 (Idle state)
34 4
35 4
36 4 Battery Total (Idle state)
37 1 Atomizer Status (0:Unk,1:Low,3:Ok,4:High,5:NoAto)
38 4 Coil Resistance (Average of #29)
39 4 Coil Current (Average of #30)
40 4 Coil Voltage (Average of #31)
41 4 Battery Cell 1 (Windowed Average of #32)
42 4 Battery Cell 2 (Windowed Average of #33)
43 4
44 4
45 1 USB Connection State
46 2
47 4 Battery Cell 1
48 4 Battery Cell 2
49 4
50 4
51 4 Battery Total
52 4 Battery Cell 1 (Average of #47)
53 4 Battery Cell 2 (Average of #48)
54 4
55 4
56 2 Coil Temperature
57 2 Coil Temperature (Average of #56)
58 2 Coil Power
59 1 Batt v1 < 3.0 || vtot < 6.0 (0x02) | v2 < 3.0 (0x04)
60 4 Coil Resistance
61 1 Box State
62 1 Current Screen ID
63 1 Board Temperature (0..100)
64 1
65 1 (Startup:1)
66 1 (Startup:2)
67 1
68 4 Fire Start Tick?
69 4 Fire Stop Tick?
70 4 New Coil Rez
71 4 Old Coil Rez
72 1 !(Batt v1 < 1.0 && vtot > 6.2)
73 1 ~PF4 Level (?)
74 1
75 1
76 1
77 1 Stealth Mode
78 1 Display On/Off (PD2)
Flags (#4)
0x04 0:°C,1:°F
Box State (#61)
0x_1 Startup
0x_2 On
0x_3 Off
0x_5 Battery Low
0x0_ Active
0x1_ Idle
0x2_ Locked
0x01 Startup
0x02 Active On
0x12 Idle On
0x13 Idle Off
0x23 Locked Off
0x05 Battery Low
Events
1 1 1 0 ---+++-+-+
1 2 1 0 10 x Fire
1 3 1 0 FF+
1 4 1 0 F-+F-+
1 5 1 0 FF-+FF-+
1 6 1 0 5 x Fire (On/Off)
1 7 1 0 4 x Fire
1 8 1 0 3 x Fire (Settings)
1 9 1 0 2 x Fire
1 10 H R PE10 (Fire)
1 11 H R PE13 (-)
1 12 H R PD0 (+)
1 13 H R PE10+PE13 (Brigthness+)
1 14 H R PD0+PE10 (Brightness-)
1 15 H R PD0+PE13 (Lock/Version)
1 16 H R PD0+PE13+PE10 (Stealth/Reset)
2 1 ? (Call Screen pfunc_5)
2 2 S Invoke Screen
2 3 D Close Dialog Screen
2 4 D Open Dialog Screen
2 5 Init Screen?
2 6 ? (Call Screen pfunc_4)
2 7 B% Set Screen Brightness
3 1 Start Fire 1 (Init)
3 2 Stop Fire
3 3 Start Fire 2 (Warmup)
3 4 Fire (Power)
3 6 Fire (TC)
3 7 Fire (Bypass)
3 8 Fire (TCR)
3 9 Fire (VPC) (Start)
3 10 Fire (VPC)
3 11 0/1 Choose Old/New Coil
3 12
3 13 Start Fire 3 (Test Coil)
3 14 Start Fire 4 (Still Testing Coil)
3 15 Test Atomizer
4 1 Overtemp (?)
4 2 Overtemp
4 3 Battery Low
4 4 Brown-Out
4 5 Cut-Off
4 6 No Liquid
5 1 Screen Change
5 3 Battery Low State Change
5 4 Coil Change (±2%)
5 5 USB (Dis)connect
5 6 NS OS Atomizer Status Change
5 7 NS OS Box State Change
6 1 Shutdown
6 2
6 3 Go To Sleep
6 4 NS Change Box State
6 5 Dimm Screen
6 6
6 7 Activity
9 1
9 2
Key Events Parameters
H 1 Key Down
2..4 Hold Time T1/T2/T3
5 Key Up
6 Hold/Repeat
R n Repeat Count
Screens Events Parameters
S 0 Idle (Blank)
1 ? (Blank)
2 Main Screen
3 Off (Blank)
4 Startup
5 Shutdown
6 New Coil
7 Battery Charger
8 Version
11 Stealth
D 0 Ato Short
1 Ato Short
2 Ohms High
3 No Coil
4 Overheat
5 Battery Low
6 Battery Weak
7 Brightness
8 Unlock
11 No Liquid
12 Cut-off