diff --git a/diode_tester/Core/Tester_main/tester_func.c b/diode_tester/Core/Tester_main/tester_func.c index b8529fd..fabd753 100644 --- a/diode_tester/Core/Tester_main/tester_func.c +++ b/diode_tester/Core/Tester_main/tester_func.c @@ -38,15 +38,22 @@ void TESTER_TestDiode_Forward(TESTER_TestHandleTypeDef *htest) TESTER_Connect_Phase(&htest->SwPhaseForward); /* Прямое включение на определенное время */ - uint32_t tickstart = HAL_GetTick(); - HAL_StatusTypeDef res; - while(1) + if(htest->SwTimings.ticks_for_forward.msdelay) { - /* Считывание АЦП пока таймаут истечет */ - res = ADC_ReadContinuous(htest->adc, htest->continuous_buff_size, tickstart, htest->SwTimings.ticks_for_forward.ticks); - - if(res != HAL_OK) - break; + uint32_t tickstart = HAL_GetTick(); + HAL_StatusTypeDef res; + while(1) + { + /* Считывание АЦП пока таймаут истечет */ + res = ADC_ReadContinuous(htest->adc, htest->continuous_buff_size, tickstart, htest->SwTimings.ticks_for_forward.ticks); + + if(res != HAL_OK) + break; + } + } + else + { + TESTER_Delay(&htest->SwTimings.ticks_for_forward, &hmcstim); } /* Отключение питания от диода */ diff --git a/diode_tester/Core/Tester_main/tester_main.c b/diode_tester/Core/Tester_main/tester_main.c index 34a1269..89cb720 100644 --- a/diode_tester/Core/Tester_main/tester_main.c +++ b/diode_tester/Core/Tester_main/tester_main.c @@ -162,17 +162,17 @@ void TESTER_InterfaceHandle(TESTER_ProjectTypeDef *tester) */ void TESTER_UpdateSettings(TESTER_TestHandleTypeDef *htest, MB_DataStructureTypeDef *mbdata) { + htest->SwTimings.ticks_for_forward.ticks = mbdata->HoldRegs.TimeForForward; htest->SwTimings.ticks_for_reverse.ticks = mbdata->HoldRegs.TimeForReverse; + htest->SwTimings.ticks_before_test.ticks = mbdata->HoldRegs.TimeBeforeTest; htest->SwTimings.ticks_deadtime.ticks = mbdata->HoldRegs.TimeDeadtime; htest->SwTimings.ticks_before_expected_peak.ticks = mbdata->HoldRegs.TimeBeforePeak; - htest->SwTimings.ticks_before_test.ticks = mbdata->HoldRegs.TimeBeforeTest; - htest->SwTimings.ticks_for_forward.ticks = mbdata->HoldRegs.TimeForForward; + htest->SwTimings.ticks_for_forward.msdelay = mbdata->Coils.msTimeForForward_enable; htest->SwTimings.ticks_for_reverse.msdelay = mbdata->Coils.msTimeForReverse_enable; + htest->SwTimings.ticks_before_test.msdelay = mbdata->Coils.msTimeBeforeTest_enable; htest->SwTimings.ticks_deadtime.msdelay = mbdata->Coils.msTimeDeadtime_enable; htest->SwTimings.ticks_before_expected_peak.msdelay = mbdata->Coils.msTimeBeforePeak_enable; - htest->SwTimings.ticks_before_test.msdelay = mbdata->Coils.msTimeBeforeTest_enable; - htest->SwTimings.ticks_before_test.msdelay = mbdata->Coils.msTimeForForward_enable; TESTER_ADC_UpdateSettings(htest->adc, mbdata); } diff --git a/diode_tester/MDK-ARM/diode_tester.uvoptx b/diode_tester/MDK-ARM/diode_tester.uvoptx index 3347148..b975ebc 100644 --- a/diode_tester/MDK-ARM/diode_tester.uvoptx +++ b/diode_tester/MDK-ARM/diode_tester.uvoptx @@ -148,7 +148,24 @@ -U005600373433510237363934 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(1BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL08000 -FP0($$Device:STM32F103C6$Flash\STM32F10x_128.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2 - + + + 0 + 0 + 87 + 1 +
134244302
+ 0 + 0 + 0 + 0 + 0 + 1 + ..\Core\Tester_main\tester_main.c + + \\diode_tester\../Core/Tester_main/tester_main.c\87 +
+
0