Prechádzať zdrojové kódy

解决高电平开机后,ACC松开1s内再次闭合时无法关机的问题。

dd 3 mesiacov pred
rodič
commit
90c33649c7

+ 3 - 3
.cproject

@@ -14,7 +14,7 @@
 				</extensions>
 			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-				<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.548884294" name="Debug" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug">
+				<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.548884294" name="Debug" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug" postbuildStep="&quot;${CCS_INSTALL_DIR}\\tools\\compiler\\ti-cgt-armllvm_3.2.2.LTS\\bin\\tiarmobjcopy&quot; -O binary ${BuildArtifactFileBaseName}.out ${BuildArtifactFileBaseName}.bin" prebuildStep="${CCS_PROJECT_DIR}\gen_fingerprint.bat">
 					<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.548884294." name="/" resourcePath="">
 						<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.DebugToolchain.1395929452" name="TI Build Tools" secondaryOutputs="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN.1545974140" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.linkerDebug.733768350">
 							<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.332824210" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
@@ -92,10 +92,10 @@
 							</tool>
 							<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.1685046052" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex">
 								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE.684407035" name="Enable tool" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE" value="true" valueType="boolean"/>
-								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.1256947924" name="Output format" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.BINARY" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.1256947924" name="Output format" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
 								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.MEMWIDTH.2122652707" name="Specify memory width (--memwidth, -memwidth)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.MEMWIDTH" value="8" valueType="string"/>
 								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.ROMWIDTH.2107250342" name="Specify rom width (--romwidth, -romwidth)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.ROMWIDTH" value="8" valueType="string"/>
-								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FILE.1521576636" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FILE" value="${BuildArtifactFileBaseName}.bin" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FILE.1521576636" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FILE" value="${BuildArtifactFileBaseName}.hex" valueType="string"/>
 								<outputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN.1545974140" name="Binary File" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN"/>
 							</tool>
 							<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.objcopy.1858022340" name="Arm Objcopy Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.objcopy"/>

+ 3 - 1
3.BasicFunction/Source/power.c

@@ -263,7 +263,9 @@ void power_voPowerManagement( _Bool ParaSaveEEFlg, _Bool PowerSleepFlg)
                 power_stPowStateOut.blPowerShutdownFlg = TRUE;
                 power_stPowStateOut.uwPowerShutdnCnt = 0;
                 Reset_POWER_LOCK_PORT();
-                Power_KeyChangeHandle();
+                DL_WWDT_disablePower(WWDT0_INST);
+                NVIC_SystemReset();
+                //Power_KeyChangeHandle();
             }
         }
         else

+ 1 - 1
4.BasicHardwSoftwLayer/2.BasicSoftwLayer/Include/syspar.h

@@ -42,7 +42,7 @@ Update Time
 
 #define IPM_VOLTAGE_36V         0x0
 #define IPM_VOLTAGE_48V         0x1
-#define IPM_VOLTAGE_SEL         IPM_VOLTAGE_48V
+#define IPM_VOLTAGE_SEL         IPM_VOLTAGE_36V
 
 #define BIKE_TYPE_R219          0x0
 #define BIKE_TYPE_R168          0x01

+ 9 - 9
4.BasicHardwSoftwLayer/2.BasicSoftwLayer/Include/user.h

@@ -48,7 +48,7 @@ Update Time
 /*======================================================================*
     三力距标志
 *=======================================================================*/
-#define TORSENSOR3NUM  //三力矩标识
+//#define TORSENSOR3NUM  //三力矩标识
 
 /*======================================================================*
    Motor Number Selection
@@ -644,10 +644,10 @@ Update Time
 
 #if (MOTOR_ID_SEL == MOTOR_PEGASI_NEW)
 #define M_POLE_PAIRS        8              // unit:Null,Pole pairs
-#define M_RS_OHM            870            // unit: 0.1mOhm, Phase resistance
+#define M_RS_OHM            890            // unit: 0.1mOhm, Phase resistance
 #define M_MATERIAL          Al             // unit:Null
-#define M_LD_NOLOAD_MH      28000           // unit: 0.01uH, D axis inductance
-#define M_LQ_NOLOAD_MH      33600           // unit: 0.01uH, Q axis inductance
+#define M_LD_NOLOAD_MH      23000           // unit: 0.01uH, D axis inductance
+#define M_LQ_NOLOAD_MH      30600           // unit: 0.01uH, Q axis inductance
 #define M_LD_TURN1_ID_AP    200            // unit: 0.01A,
 #define M_LD_TURN1_LD_MH    M_LD_NOLOAD_MH // unit: 0.01uH,D axis inductance
 #define M_LD_TURN2_ID_AP    700            // unit: 0.01A,
@@ -660,7 +660,7 @@ Update Time
 #define M_LQ_MIN_MH         M_LQ_NOLOAD_MH // unit: 0.01uH,Q axis inductance
 #define M_JD                1000           // unit: 10-7Kg*m2, Rotational inertia
 #define M_MAGNETIC_MATERIAL Ferrite        // unit:Null
-#define M_FLUX_WB           24369          // unit: 0.001mWb, Flux linkage
+#define M_FLUX_WB           21590          // unit: 0.001mWb, Flux linkage
 #define M_ID_MAX_AP         0              // unit: 0.01A, Max d axis current
 #define M_ID_MIN_AP         -157           // unit: 0.01A, Min d axis current
 #define M_IS_PEAK_MAX_AP    4250           // unit: 0.01A, Max phase current(below base speed)
@@ -712,10 +712,10 @@ Update Time
 
 #if (MOTOR_ID_SEL == MOTOR_PEGASI_PLUS_NEW)
 #define M_POLE_PAIRS        8              // unit:Null,Pole pairs
-#define M_RS_OHM            870            // unit: 0.1mOhm, Phase resistance
+#define M_RS_OHM            960            // unit: 0.1mOhm, Phase resistance
 #define M_MATERIAL          Al             // unit:Null
-#define M_LD_NOLOAD_MH      28000           // unit: 0.01uH, D axis inductance
-#define M_LQ_NOLOAD_MH      33600           // unit: 0.01uH, Q axis inductance
+#define M_LD_NOLOAD_MH      26000           // unit: 0.01uH, D axis inductance
+#define M_LQ_NOLOAD_MH      33900           // unit: 0.01uH, Q axis inductance
 #define M_LD_TURN1_ID_AP    200            // unit: 0.01A,
 #define M_LD_TURN1_LD_MH    M_LD_NOLOAD_MH // unit: 0.01uH,D axis inductance
 #define M_LD_TURN2_ID_AP    700            // unit: 0.01A,
@@ -728,7 +728,7 @@ Update Time
 #define M_LQ_MIN_MH         M_LQ_NOLOAD_MH // unit: 0.01uH,Q axis inductance
 #define M_JD                1000           // unit: 10-7Kg*m2, Rotational inertia
 #define M_MAGNETIC_MATERIAL Ferrite        // unit:Null
-#define M_FLUX_WB           24369          // unit: 0.001mWb, Flux linkage
+#define M_FLUX_WB           23557          // unit: 0.001mWb, Flux linkage
 #define M_ID_MAX_AP         0              // unit: 0.01A, Max d axis current
 #define M_ID_MIN_AP         -157           // unit: 0.01A, Min d axis current
 #define M_IS_PEAK_MAX_AP    4250           // unit: 0.01A, Max phase current(below base speed)