auto-sync

This commit is contained in:
rusEfi 2014-12-06 20:03:11 -06:00
parent d9a674e3ec
commit 24f23ad943
1 changed files with 1 additions and 2 deletions

View File

@ -154,6 +154,7 @@ static void pwmpcb_slow(PWMDriver *pwmp) {
/* Starts an asynchronous ADC conversion operation, the conversion /* Starts an asynchronous ADC conversion operation, the conversion
will be executed in parallel to the current PWM cycle and will will be executed in parallel to the current PWM cycle and will
terminate before the next PWM cycle.*/ terminate before the next PWM cycle.*/
slowAdc.conversionCount++;
chSysLockFromIsr() chSysLockFromIsr()
; ;
if (ADC_SLOW_DEVICE.state != ADC_READY && if (ADC_SLOW_DEVICE.state != ADC_READY &&
@ -165,11 +166,9 @@ static void pwmpcb_slow(PWMDriver *pwmp) {
; ;
return; return;
} }
slowAdc.errorsCount++;
adcStartConversionI(&ADC_SLOW_DEVICE, &adcgrpcfgSlow, slowAdcState.samples, ADC_GRP1_BUF_DEPTH_SLOW); adcStartConversionI(&ADC_SLOW_DEVICE, &adcgrpcfgSlow, slowAdcState.samples, ADC_GRP1_BUF_DEPTH_SLOW);
chSysUnlockFromIsr() chSysUnlockFromIsr()
; ;
slowAdc.conversionCount++;
#endif #endif
} }