mirror of https://github.com/rusefi/rusefi-1.git
HW CI has failed 11 times since Oct 2 #1849
Revert "configure all sample times - fix MRE knock sampling (#1841)"
This reverts commit b3596f89
This commit is contained in:
parent
9273659d69
commit
7f6a831117
|
@ -7,6 +7,14 @@
|
|||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN3
|
||||
#define KNOCK_PIN_CH1 GPIOA_3
|
||||
|
||||
// knock 2 - pin PF5 NOT used! - not used for MRE
|
||||
#define KNOCK_ADC_CH2 ADC_CHANNEL_IN15
|
||||
#define KNOCK_PIN_CH2 GPIOF_5
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
#define KNOCK_SAMPLE_RATE (STM32_PCLK2 / (4 * (84 + 12)))
|
||||
|
||||
#ifndef MRE_SW_KNOCK_ADC
|
||||
#define MRE_SW_KNOCK_ADC
|
||||
#endif
|
||||
|
|
|
@ -38,33 +38,15 @@ static void completionCallback(ADCDriver* adcp, adcsample_t*, size_t) {
|
|||
static void errorCallback(ADCDriver*, adcerror_t err) {
|
||||
}
|
||||
|
||||
static const uint32_t smpr1 =
|
||||
ADC_SMPR1_SMP_AN10(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR1_SMP_AN11(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR1_SMP_AN12(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR1_SMP_AN13(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR1_SMP_AN14(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR1_SMP_AN15(KNOCK_SAMPLE_TIME);
|
||||
|
||||
static const uint32_t smpr2 =
|
||||
ADC_SMPR2_SMP_AN0(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN1(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN2(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN3(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN4(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN5(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN6(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN7(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN8(KNOCK_SAMPLE_TIME) |
|
||||
ADC_SMPR2_SMP_AN9(KNOCK_SAMPLE_TIME);
|
||||
|
||||
static const ADCConversionGroup adcConvGroupCh1 = { FALSE, 1, &completionCallback, &errorCallback,
|
||||
0,
|
||||
ADC_CR2_SWSTART,
|
||||
// sample times for channels 10...18
|
||||
smpr1,
|
||||
// sample times for channels 0...9
|
||||
smpr2,
|
||||
#ifdef MRE_SW_KNOCK_ADC
|
||||
ADC_SMPR2_SMP_AN3(KNOCK_SAMPLE_TIME), // sample times for channels 10...18
|
||||
#else
|
||||
ADC_SMPR1_SMP_AN14(KNOCK_SAMPLE_TIME), // sample times for channels 10...18
|
||||
#endif
|
||||
0,
|
||||
|
||||
0, // htr
|
||||
0, // ltr
|
||||
|
@ -79,10 +61,8 @@ static const ADCConversionGroup adcConvGroupCh1 = { FALSE, 1, &completionCallbac
|
|||
static const ADCConversionGroup adcConvGroupCh2 = { FALSE, 1, &completionCallback, &errorCallback,
|
||||
0,
|
||||
ADC_CR2_SWSTART,
|
||||
// sample times for channels 10...18
|
||||
smpr1,
|
||||
// sample times for channels 0...9
|
||||
smpr2,
|
||||
ADC_SMPR1_SMP_AN14(KNOCK_SAMPLE_TIME), // sample times for channels 10...18
|
||||
0,
|
||||
|
||||
0, // htr
|
||||
0, // ltr
|
||||
|
|
Loading…
Reference in New Issue