синхронизация сигналов PWM после изменения частоты с учётом PWM11 по которому запускается преобразование тока
This commit is contained in:
parent
c47a4bdf9b
commit
a4da680dff
@ -62,7 +62,7 @@
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C2000_22.6.compilerID.DEFINE.2084039298" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C2000_22.6.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_C2000WARE_SOFTWARE_PACKAGE_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="FREEMASTER"/>
|
||||
<listOptionValue builtIn="false" value="REF0"/>
|
||||
<listOptionValue builtIn="false" value="REF1"/>
|
||||
<listOptionValue builtIn="false" value="NRS485"/>
|
||||
<listOptionValue builtIn="false" value="USE_25MHZ_XTAL"/>
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
|
||||
@ -157,7 +157,6 @@ void GpioInit(void)
|
||||
GpioCtrlRegs.GPADIR.bit.GPIO14 = 1;
|
||||
GpioDataRegs.GPADAT.bit.GPIO14 = 0;
|
||||
GpioCtrlRegs.GPACSEL2.bit.GPIO14 = 2;
|
||||
|
||||
#endif
|
||||
EDIS;
|
||||
}
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
|
||||
<configuration XML_version="1.2" id="Texas Instruments XDS2xx USB Debug Probe_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS2xx USB Debug Probe_0" href="connections/TIXDS2XXUSB_Connection.xml" id="Texas Instruments XDS2xx USB Debug Probe_0" xml="TIXDS2XXUSB_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS2xx USB Debug Probe_0">
|
||||
<instance XML_version="1.2" href="drivers/tixds560icepick_c.xml" id="drivers" xml="tixds560icepick_c.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds560c28x.xml" id="drivers" xml="tixds560c28x.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds560cla2.xml" id="drivers" xml="tixds560cla2.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds560cs_child.xml" id="drivers" xml="tixds560cs_child.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds560cortexM.xml" id="drivers" xml="tixds560cortexM.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds560ajsm.xml" id="drivers" xml="tixds560ajsm.xml" xmlpath="drivers"/>
|
||||
<configuration XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS100v2 USB Debug Probe_0" href="connections/TIXDS100v2_Connection.xml" id="Texas Instruments XDS100v2 USB Debug Probe_0" xml="TIXDS100v2_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2c28x.xml" id="drivers" xml="tixds100v2c28x.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2cla2.xml" id="drivers" xml="tixds100v2cla2.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2cs_child.xml" id="drivers" xml="tixds100v2cs_child.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds510ajsm.xml" id="drivers" xml="tixds510ajsm.xml" xmlpath="drivers"/>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="TMS320F28388D_0" href="devices/f28388d.xml" id="TMS320F28388D_0" xml="f28388d.xml" xmlpath="devices"/>
|
||||
<device HW_revision="1" XML_version="1.2" description="" id="TMS320F28388D_0" partnum="TMS320F28388D">
|
||||
|
||||
@ -66,15 +66,15 @@ void pwm_set_volt_3F(float phaseA, float phaseB, float phaseC, float Udc, uint16
|
||||
if(PeriodPWM[0] > PERIOD_MAX) PeriodPWM[0]=PERIOD_MAX;
|
||||
PeriodPWM[1] = PeriodPWM[0];
|
||||
vectorRegKoeffRecalc(PeriodPWM[0]/PERIOD_MOTOR);
|
||||
PeriodPWM_2 = PeriodPWM[0]/2;
|
||||
PWM_SDFM_delay = 2*PeriodPWM[0] - 5000;
|
||||
EPwm11Regs.CMPA.bit.CMPA = PWM_SDFM_delay;
|
||||
EALLOW;
|
||||
CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 0;//
|
||||
EPwmRegs[11]->TBPRD = PeriodPWM[0]*2-1;
|
||||
EPwmRegs[PWM_A]->TBPRD = EPwmRegs[PWM_B]->TBPRD = EPwmRegs[PWM_C]->TBPRD = PeriodPWM[0];
|
||||
CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 1;// синхронный запуск таймеров
|
||||
EDIS;
|
||||
PeriodPWM_2 = PeriodPWM[0]/2;
|
||||
EPwmRegs[11]->TBPRD = PeriodPWM[0]*2-1;
|
||||
PWM_SDFM_delay = 2*PeriodPWM[0] - 5000;
|
||||
EPwm11Regs.CMPA.bit.CMPA = PWM_SDFM_delay;
|
||||
}
|
||||
else PeriodPWM[0] == PeriodPWM[1];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user