Эх сурвалжийг харах

2020-06-15 /Edward Lien

Actions:
1.add check CCS CpSetPWMDuty not 5% before set CP state E before enter BS mode charging.

Files:
1. As follow commit history

Image version: D0.17.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
Edward Lien 4 жил өмнө
parent
commit
bebf9eea91

+ 2 - 2
EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c

@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
 	
 	sprintf((char*)SysConfig.SystemId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
 	sprintf((char*)SysConfig.SystemDateTime, "%d-%d-%d %d:%d:%d", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
-	SysConfig.AuthorisationMode = 0;	// 0:PH card	1: OCPP backend		2: PH backend	3: Free Mode
+	SysConfig.AuthorisationMode = 0;	// 0: enable, 1: disable
 	SysConfig.DefaultLanguage  = 0;		// 0:English	1:Big5				2: GB			3: JN		4: Français 	5: Italiano		6: Español		7: Deutsch		8: Nederland	9: Norsk	10: Suomalainen		11: Svenska		12: Pусский		13: ไทย
 	SysConfig.RfidCardNumEndian = 0;	// 0: Little endian		1: Big endian
 
@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
 
 	// Backend configuration
 	SysConfig.BackendConnTimeout=300; 		// 300 seconds
-	SysConfig.OfflinePolicy = 2;			// 0: Local list	1: PH RFID		2: Free		3: Deny
+	SysConfig.OfflinePolicy = 2;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
 	SysConfig.OfflineMaxChargeEnergy = 0;	// 0: Same as MaxChargeEnergy	Other: 1~65535KWH
 	SysConfig.OfflineMaxChargeDuration = 0; // 0: Same as MaxChargeDuration Other: 1~65535 minutes
 	strcpy((char*)SysConfig.OcppServerURL, "");

+ 10 - 5
EVSE/Projects/AW-CCS/Apps/main.c

@@ -1186,7 +1186,7 @@ void get_firmware_version(unsigned char gun_index)
 	strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
 
 	// Get CSU root file system version
-	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.16.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.17.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -2558,13 +2558,18 @@ int main(void)
 								//CCS handshake timeout
 								if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_BS_HLC_HANDSHAKE]) > TIMEOUT_SPEC_BS_HLC_HANDSHAKE)
 								{
-									
+									ShmCharger->gun_info[gun_index].acCcsInfo.ChargingPermission = OFF;	
+									DEBUG_INFO("BS/HLC 2 secs handshake timeout.\r\n");
+								}
+								
+								if((ShmCharger->gun_info[gun_index].acCcsInfo.ChargingPermission == OFF) && (ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty != CCS_PWM_DUTY_5))
+								{
+									DEBUG_INFO("Wait CCS give up negotiagting.\r\n");
 									ShmCharger->gun_info[gun_index].primaryMcuCp_Pwn_Duty.max_current = CCS_PWM_DUTY_CP_STAT_E;
 									ShmCharger->gun_info[gun_index].mcuFlag.isSetCpPwmDuty = ON;						
 									ShmCharger->gun_info[gun_index].ccsHandshakeState = HANDSHAKE_CP_STATE_E;
 									ShmCharger->gun_info[gun_index].chargingMode = CHARGING_MODE_BS;
-									DEBUG_INFO("BS/HLC 2 secs handshake timeout.\r\n");
-								}	
+								}									
 								
 #ifdef	CCS_SIMULATION_DATA				
 								ShmCharger->gun_info[gun_index].acCcsInfo.PresentMsgFlowStatus = 1;						
@@ -2601,7 +2606,7 @@ int main(void)
 									
 									//restore normal CP PWM duty
 									// Determine max charging current to MCU
-									DEBUG_INFO("Determine max charging current to MCU.\r\n");
+									DEBUG_INFO("Determine max charging current to MCU.\r\n");										
 									if(ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent == 0)
 									{
 										ShmCharger->gun_info[gun_index].targetCurrent = ((ShmCharger->gun_info[gun_index].targetCurrent > ShmCharger->gun_info[gun_index].primaryMcuState.rating_current)?ShmCharger->gun_info[gun_index].primaryMcuState.rating_current:ShmCharger->gun_info[gun_index].targetCurrent);

BIN
EVSE/Projects/AW-CCS/Images/FactoryDefaultConfig.bin


BIN
EVSE/Projects/AW-CCS/Images/ramdisk.gz