rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
config
boards
kinetis
efifeatures.h
Go to the documentation of this file.
1
/**
2
* @file efifeatures.h
3
*
4
* @brief In this header we can configure which firmware modules are used.
5
*
6
* @date Aug 29, 2013
7
* @author Andrey Belomutskiy, (c) 2012-2020
8
*/
9
10
#pragma once
11
12
#define EFI_GPIO_HARDWARE TRUE
13
14
#define EFI_BOOST_CONTROL FALSE
15
16
#define EFI_LAUNCH_CONTROL FALSE
17
18
#define EFI_MC33816 FALSE
19
20
#define EFI_CDM_INTEGRATION FALSE
21
22
#define EFI_TOOTH_LOGGER FALSE
23
24
#define EFI_PWM_TESTER FALSE
25
26
#define EFI_HPFP FALSE
27
28
#define ATOFF_BUFFER_SIZE 4
29
30
#define ATOFF_BUFFER_SIZE 4
31
32
/**
33
* if you have a 60-2 trigger, or if you just want better performance, you
34
* probably want EFI_ENABLE_ASSERTS to be FALSE. Also you would probably want to FALSE
35
* CH_DBG_ENABLE_CHECKS
36
* CH_DBG_ENABLE_ASSERTS
37
* in chconf.h
38
*
39
*/
40
#if !defined(EFI_ENABLE_ASSERTS) || defined(__DOXYGEN__)
41
#define EFI_ENABLE_ASSERTS FALSE
42
#endif
/* EFI_ENABLE_ASSERTS */
43
44
#define EFI_TEXT_LOGGING FALSE
45
46
//#define EFI_UART_ECHO_TEST_MODE FALSE
47
48
/**
49
* Build-in logic analyzer support. Logic analyzer viewer is one of the java console panes.
50
*/
51
#ifndef EFI_LOGIC_ANALYZER
52
#define EFI_LOGIC_ANALYZER FALSE
53
#endif
54
55
/**
56
* TunerStudio support.
57
*/
58
#define EFI_TUNER_STUDIO FALSE
59
60
/**
61
* Bluetooth UART setup support.
62
*/
63
#define EFI_BLUETOOTH_SETUP FALSE
64
65
/**
66
* TunerStudio debug output
67
*/
68
#define EFI_TUNER_STUDIO_VERBOSE FALSE
69
70
#define EFI_DETAILED_LOGGING FALSE
71
72
/**
73
* Dev console support.
74
*/
75
#define EFI_CLI_SUPPORT FALSE
76
77
#define EFI_RTC FALSE
78
79
#define EFI_ALTERNATOR_CONTROL FALSE
80
81
#define EFI_VVT_PID FALSE
82
83
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE
84
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
85
86
#define FUEL_MATH_EXTREME_LOGGING FALSE
87
88
#define SPARK_EXTREME_LOGGING FALSE
89
90
#define TRIGGER_EXTREME_LOGGING FALSE
91
92
#define EFI_STORAGE_INT_FLASH TRUE
93
94
/**
95
* Usually you need shaft position input, but maybe you do not need it?
96
*/
97
#ifndef EFI_SHAFT_POSITION_INPUT
98
#define EFI_SHAFT_POSITION_INPUT TRUE
99
#endif
100
101
/**
102
* Maybe we are just sniffing what's going on?
103
*/
104
#define EFI_ENGINE_CONTROL TRUE
105
106
/**
107
* MCP42010 digital potentiometer support. This could be useful if you are stimulating some
108
* stock ECU
109
*/
110
//#define EFI_POTENTIOMETER FALSE
111
#define EFI_POTENTIOMETER FALSE
112
113
#define EFI_ANALOG_SENSORS TRUE
114
115
#ifndef EFI_MAX_31855
116
#define EFI_MAX_31855 FALSE
117
#endif
118
119
#define EFI_MCP_3208 FALSE
120
121
#if !defined(EFI_ONBOARD_MEMS) || defined(__DOXYGEN__)
122
#define EFI_ONBOARD_MEMS FALSE
123
#endif
124
125
#ifndef EFI_INTERNAL_ADC
126
#define EFI_INTERNAL_ADC TRUE
127
#endif
128
129
#define EFI_USE_FAST_ADC TRUE
130
131
#define EFI_NARROW_EGO_AVERAGING FALSE
132
133
#ifndef EFI_CAN_SUPPORT
134
#define EFI_CAN_SUPPORT FALSE
135
#endif
136
137
#ifndef EFI_IDLE_CONTROL
138
#define EFI_IDLE_CONTROL FALSE
139
#endif
140
141
#define EFI_IDLE_PID_CIC FALSE
142
143
/**
144
* Control the main power relay based on measured ignition voltage (Vbatt)
145
*/
146
#define EFI_MAIN_RELAY_CONTROL FALSE
147
148
#ifndef EFI_VEHICLE_SPEED
149
#define EFI_VEHICLE_SPEED FALSE
150
#endif
151
152
#ifndef EFI_TCU
153
#define EFI_TCU FALSE
154
#endif
155
156
#ifndef EFI_ENGINE_EMULATOR
157
#define EFI_ENGINE_EMULATOR FALSE
158
#endif
159
160
#ifndef EFI_EMULATE_POSITION_SENSORS
161
#define EFI_EMULATE_POSITION_SENSORS FALSE
162
#endif
163
164
/**
165
* Do we need file logging (like SD card) logic?
166
*/
167
#ifndef EFI_FILE_LOGGING
168
#define EFI_FILE_LOGGING FALSE
169
#endif
170
171
#ifndef EFI_USB_SERIAL
172
#define EFI_USB_SERIAL FALSE
173
#endif
174
175
#ifndef EFI_ENGINE_SNIFFER
176
#define EFI_ENGINE_SNIFFER FALSE
177
#endif
178
179
#define EFI_HISTOGRAMS FALSE
180
181
#define EFI_PERF_METRICS FALSE
182
183
/**
184
* Do we need GPS logic?
185
*/
186
#define EFI_UART_GPS FALSE
187
188
#define EFI_ELECTRONIC_THROTTLE_BODY FALSE
189
//#define EFI_ELECTRONIC_THROTTLE_BODY FALSE
190
191
#define EFI_HAS_RESET FALSE
192
193
/**
194
* Do we need Malfunction Indicator blinking logic?
195
*/
196
#define EFI_MALFUNCTION_INDICATOR FALSE
197
//#define EFI_MALFUNCTION_INDICATOR FALSE
198
199
#define CONSOLE_MAX_ACTIONS 1
200
#define EFI_DISABLE_CONSOLE_ACTIONS FALSE
201
202
#define EFI_MAP_AVERAGING FALSE
203
//#define EFI_MAP_AVERAGING FALSE
204
205
// todo: most of this should become configurable
206
207
// todo: switch to continues ADC conversion for fast ADC?
208
#define EFI_INTERNAL_FAST_ADC_GPT &GPTD2
209
210
// todo: why 64 SPLL prescaler doesn't work?
211
// 168000000/64/128/1025 = ~20Hz
212
// 168000000/64/16/16 = ~10.25kHz
213
214
// todo: warning! these numbers are "tricky"! need to investigate further!
215
//168000000/128/131 = ~10kHz
216
#define GPT_FREQ_FAST 20507
/*164062*/
/* PWM clock frequency. */
217
#define GPT_PERIOD_FAST 131
/* PWM period (in PWM ticks). */
218
219
#define EFI_SPI1_AF 3
220
221
#define EFI_SPI2_AF 3
222
223
/**
224
* This section is for right-side center SPI
225
*/
226
227
#define EFI_SPI3_AF 3
228
229
/**
230
* Patched version of ChibiOS/RT support extra details in the system error messages
231
*/
232
#define EFI_CUSTOM_PANIC_METHOD FALSE
233
234
#define ADC_CHANNEL_VREF ADC_CHANNEL_IN14
235
236
/**
237
* Use 'HAL_USE_UART' DMA-mode driver instead of 'HAL_USE_SERIAL'
238
*
239
* See also
240
* STM32_SERIAL_USE_USARTx
241
* STM32_UART_USE_USARTx
242
* in mcuconf.h
243
*/
244
#define EFI_USE_UART_DMA FALSE
245
246
#define TS_PRIMARY_UxART_PORT UARTD2
247
248
#define EFI_CONSOLE_TX_BRAIN_PIN Gpio::A10
249
#define EFI_CONSOLE_RX_BRAIN_PIN Gpio::A11
250
#define EFI_CONSOLE_AF 3
251
252
#define TS_SERIAL_AF 2
253
254
#undef SERIAL_SPEED
255
#define SERIAL_SPEED 115200
256
257
//#define SR5_WRITE_TIMEOUT TIME_MS2I(3000)
258
//#define SR5_READ_TIMEOUT TIME_MS2I(3000)
259
260
#define EFI_COMP_PRIMARY_DEVICE (&COMPD3)
261
#define EFI_COMP_TRIGGER_CHANNEL 6
// =E7
262
//#define EFI_TRIGGER_DEBUG_BLINK TRUE
263
//#define EFI_TRIGGER_COMP_ADAPTIVE_HYSTERESIS TRUE
264
265
#define LED_WARNING_BRAIN_PIN Gpio::D13
266
267
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14
268
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
269
270
#define EFI_WARNING_LED FALSE
271
272
/**
273
* This is the size of the MemoryStream used by chvprintf
274
*/
275
#define LOGIC_ANALYZER_BUFFER_SIZE 10
/*1800*/
276
#define DL_OUTPUT_BUFFER 10
/*6500*/
277
278
#define UTILITY_THREAD_STACK_SIZE 20
/*400*/
279
280
//#define CONSOLE_THREAD_STACK_SIZE UTILITY_THREAD_STACK_SIZE
281
282
#define BOARD_TLE6240_COUNT 0
283
#define BOARD_MC33972_COUNT 0
284
#define BOARD_TLE8888_COUNT 0
285
#define BOARD_DRV8860_COUNT 0
286
#define BOARD_MC33810_COUNT 0
287
#define BOARD_L9779_COUNT 0
288
289
#define TLE6240_SS_PORT GPIOB
290
#define TLE6240_SS_PAD 0U
291
#define TLE6240_RESET_PORT NULL
292
#define TLE6240_RESET_PAD 0
293
#define TLE6240_DIRECT_IO \
294
/* IN1..4 grounded */
\
295
[0] = {.port = NULL, .pad = 0}, \
296
[1] = {.port = NULL, .pad = 0}, \
297
[2] = {.port = NULL, .pad = 0}, \
298
[3] = {.port = NULL, .pad = 0}, \
299
/* IN9..12 */
\
300
[4] = {.port = NULL, .pad = 0}, \
301
[5] = {.port = NULL, .pad = 0}, \
302
[6] = {.port = NULL, .pad = 0}, \
303
[7] = {.port = NULL, .pad = 0},
304
305
#define EFI_BOSCH_YAW FALSE
306
307
#define EFI_BOARD_TEST FALSE
308
#define EFI_JOYSTICK FALSE
309
#define EFI_ENGINE_AUDI_AAN FALSE
310
#define EFI_ENGINE_SNOW_BLOWER FALSE
311
#define DEBUG_FUEL FALSE
312
#define EFI_UART_ECHO_TEST_MODE FALSE
313
#define EXTREME_TERM_LOGGING FALSE
314
#define EFI_PRINTF_FUEL_DETAILS FALSE
315
#define ENABLE_PERF_TRACE FALSE
316
317
#define EFI_BACKUP_SRAM FALSE
318
319
#undef EFI_ACTIVE_CONFIGURATION_IN_FLASH
320
#define EFI_ACTIVE_CONFIGURATION_IN_FLASH TRUE
321
322
//!!!!!!!!!!!!!!!!!!!!!!
323
#define debugLog(fmt,...) { \
324
extern int __debugEnabled; \
325
if (__debugEnabled) { \
326
extern char __debugBuffer[80]; \
327
chsnprintf(__debugBuffer, sizeof(__debugBuffer), fmt, ##__VA_ARGS__); \
328
uart_lld_blocking_send(TS_PRIMARY_UxART_PORT, strlen(__debugBuffer), (void *)__debugBuffer); \
329
} \
330
}
Generated on Sat Sep 27 2025 00:10:04 for rusEFI by
1.9.8