исправлено неправильно считывание модбас настроек и окончательно добавлена микросекундняа задержки при прямом тесте диода
This commit is contained in:
parent
b5f1bb72d7
commit
13ac8950fc
@ -38,15 +38,22 @@ void TESTER_TestDiode_Forward(TESTER_TestHandleTypeDef *htest)
|
|||||||
TESTER_Connect_Phase(&htest->SwPhaseForward);
|
TESTER_Connect_Phase(&htest->SwPhaseForward);
|
||||||
|
|
||||||
/* Прямое включение на определенное время */
|
/* Прямое включение на определенное время */
|
||||||
uint32_t tickstart = HAL_GetTick();
|
if(htest->SwTimings.ticks_for_forward.msdelay)
|
||||||
HAL_StatusTypeDef res;
|
|
||||||
while(1)
|
|
||||||
{
|
{
|
||||||
/* Считывание АЦП пока таймаут истечет */
|
uint32_t tickstart = HAL_GetTick();
|
||||||
res = ADC_ReadContinuous(htest->adc, htest->continuous_buff_size, tickstart, htest->SwTimings.ticks_for_forward.ticks);
|
HAL_StatusTypeDef res;
|
||||||
|
while(1)
|
||||||
if(res != HAL_OK)
|
{
|
||||||
break;
|
/* Считывание АЦП пока таймаут истечет */
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Отключение питания от диода */
|
/* Отключение питания от диода */
|
||||||
|
@ -162,17 +162,17 @@ void TESTER_InterfaceHandle(TESTER_ProjectTypeDef *tester)
|
|||||||
*/
|
*/
|
||||||
void TESTER_UpdateSettings(TESTER_TestHandleTypeDef *htest, MB_DataStructureTypeDef *mbdata)
|
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_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_deadtime.ticks = mbdata->HoldRegs.TimeDeadtime;
|
||||||
htest->SwTimings.ticks_before_expected_peak.ticks = mbdata->HoldRegs.TimeBeforePeak;
|
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_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_deadtime.msdelay = mbdata->Coils.msTimeDeadtime_enable;
|
||||||
htest->SwTimings.ticks_before_expected_peak.msdelay = mbdata->Coils.msTimeBeforePeak_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);
|
TESTER_ADC_UpdateSettings(htest->adc, mbdata);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,24 @@
|
|||||||
<Name>-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</Name>
|
<Name>-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</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint>
|
||||||
|
<Bp>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>87</LineNumber>
|
||||||
|
<EnabledFlag>1</EnabledFlag>
|
||||||
|
<Address>134244302</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
|
<Filename>..\Core\Tester_main\tester_main.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression>\\diode_tester\../Core/Tester_main/tester_main.c\87</Expression>
|
||||||
|
</Bp>
|
||||||
|
</Breakpoint>
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>0</count>
|
<count>0</count>
|
||||||
|
Loading…
Reference in New Issue
Block a user