From 13ac8950fc302b3e43848e600a637085e9abce22 Mon Sep 17 00:00:00 2001 From: Razvalyaev Date: Tue, 25 Feb 2025 10:14:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BD=D0=B5=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=20=D1=81=D1=87=D0=B8=D1=82=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B1=D0=B0=D1=81?= =?UTF-8?q?=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BA=20=D0=B8=20?= =?UTF-8?q?=D0=BE=D0=BA=D0=BE=D0=BD=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BC=D0=B8=D0=BA=D1=80=D0=BE=D1=81=D0=B5=D0=BA=D1=83?= =?UTF-8?q?=D0=BD=D0=B4=D0=BD=D1=8F=D0=B0=20=D0=B7=D0=B0=D0=B4=D0=B5=D1=80?= =?UTF-8?q?=D0=B6=D0=BA=D0=B8=20=D0=BF=D1=80=D0=B8=20=D0=BF=D1=80=D1=8F?= =?UTF-8?q?=D0=BC=D0=BE=D0=BC=20=D1=82=D0=B5=D1=81=D1=82=D0=B5=20=D0=B4?= =?UTF-8?q?=D0=B8=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- diode_tester/Core/Tester_main/tester_func.c | 23 ++++++++++++++------- diode_tester/Core/Tester_main/tester_main.c | 8 +++---- diode_tester/MDK-ARM/diode_tester.uvoptx | 19 ++++++++++++++++- 3 files changed, 37 insertions(+), 13 deletions(-) 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