Commit c03c402b authored by 李秉薇's avatar 李秉薇

变更添加F102DID

parent 0564a79d
......@@ -25,7 +25,7 @@ if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "D:\le19基于lg02y的变更单号0059的基础上改\le19源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "D:\le19基于lg02y的变更单号0059的基础上改\le19源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
"E:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "D:\A_Work\A_PROJECT\LE19\le19\le19Ô´Âë\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "D:\A_Work\A_PROJECT\LE19\le19\le19Ô´Âë\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off
goto end
......@@ -34,7 +34,7 @@ goto end
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "D:\le19基于lg02y的变更单号0059的基础上改\le19源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "D:\le19基于lg02y的变更单号0059的基础上改\le19源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
"E:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "D:\A_Work\A_PROJECT\LE19\le19\le19Ô´Âë\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "D:\A_Work\A_PROJECT\LE19\le19\le19Ô´Âë\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off
:end
\ No newline at end of file
......@@ -4,11 +4,13 @@
_EOL_F101 EOL_F101;
_EOL_F110 EOL_F110;
_EOL_F100 EOL_F100;
_EOL_F102 EOL_F102;
_EOL_7101 EOL_7101;
_EOL_7102 EOL_7102;
void EOL_InitVal(void)
{
uint8_t i;
EOL_F101.F101_Byte[0u] = 0xFFu;
EOL_F110.F110_Byte[0u] = 0xF7u;/*默认手动*/
......@@ -37,6 +39,13 @@ void EOL_InitVal(void)
EOL_F100.F100_Byte[14u] = 0xFFu;
EOL_F100.F100_Byte[15u] = 0xFFu;
for(i = 0;i < 24;i++)
{
EOL_F102.F102_Byte[i] = 0x00u;
}
EOL_F102.F102_Byte[21] = 0x60;
}
void EOL_SetF101(uint8_t EOL[], uint8_t len)
......@@ -52,6 +61,18 @@ void EOL_SetF101(uint8_t EOL[], uint8_t len)
}
}
void EOL_SetF102(uint8_t EOL[], uint8_t len)
{
uint8_t i;
if (len == 24u)
{
for (i = 0u; i < sizeof(EOL_F102); i++)
{
EOL_F102.F102_Byte[i] = EOL[i];
}
}
}
void EOL_SetF110(uint8_t EOL[], uint8_t len)
{
......@@ -105,20 +126,19 @@ _EOL_F101 EOL_GetF101(void)
return EOL_F101;
}
_EOL_F110 EOL_GetF110(void)
{
return EOL_F110;
}
_EOL_F100 EOL_GetF100(void)
{
return EOL_F100;
}
_EOL_F110 EOL_GetF110(void)
{
return EOL_F110;
}
_EOL_7101 EOL_Get7101(void)
_EOL_F102 EOL_GetF102(void)
{
return EOL_7101;
return EOL_F102;
}
_EOL_7102 EOL_Get7102(void)
......@@ -859,3 +879,20 @@ uint8_t Val_EOL_F110_BMSL(void)
Res = (uint8_t)((EOL_F110.F110_Byte[5u] >> 2u) & 0x01u);
return Res;
}
/****F102***/
/**byte21*/
uint8_t Val_EOL_F102_RadarType(void)
{
uint8_t Res=0u;
Res = (uint8_t)((EOL_F102.F102_Byte[21u] >> 0u) & 0x0Fu);
return Res;
}
uint8_t Val_EOL_F102_MaximumSpeedLimit (void)
{
uint8_t Res=0u;
Res = (uint8_t)((EOL_F102.F102_Byte[21u] >> 4u) & 0x0Fu);
return Res;
}
\ No newline at end of file
......@@ -19,6 +19,11 @@ typedef struct
uint8_t F100_Byte[16u];
} _EOL_F100;
typedef struct
{
uint8_t F102_Byte[24u];
} _EOL_F102;
typedef struct
{
uint8_t F7101_Byte[3u];
......@@ -171,15 +176,20 @@ void EOL_SetF101(uint8_t EOL[], uint8_t len);
void EOL_SetF110(uint8_t EOL[], uint8_t len);
/*设置网络拓扑配置F110*/
void EOL_SetF100(uint8_t EOL[], uint8_t len);
void EOL_SetF102(uint8_t EOL[], uint8_t len);
void EOL_Set7101(uint8_t EOL[], uint8_t len);
void EOL_Set7102(uint8_t EOL[], uint8_t len);
/*获取下线配置F101*/
_EOL_F101 EOL_GetF101(void);
/*获取下线配置F110*/
_EOL_F110 EOL_GetF110(void);
/*获取下线配置F112*/
_EOL_F102 EOL_GetF102(void);
/*获取网络拓扑*/
_EOL_F100 EOL_GetF100(void);
_EOL_7101 EOL_Get7101(void);
_EOL_7102 EOL_Get7102(void);
uint8_t Val_EOL_F102_RadarType(void);
uint8_t Val_EOL_F102_MaximumSpeedLimit (void);
#endif
\ No newline at end of file
......@@ -905,6 +905,7 @@ void Ser2EToDFlashInfoInit(void)
uint8_t i;
_EOL_F101 EOL_F101;
_EOL_F110 EOL_F110;
_EOL_F102 EOL_F102;
Ser2EToDFlashInfo.Flag = 0x7AA7A55Au;
memset(Ser2EToDFlashInfo.DID_DFEC, 0, 64u);
......@@ -931,6 +932,7 @@ void Ser2EToDFlashInfoInit(void)
EOL_InitVal();
EOL_F101 = EOL_GetF101();
EOL_F110 = EOL_GetF110();
EOL_F102 = EOL_GetF102();
for (i = 0u; i < 16u; ++i)
{
Ser2EToDFlashInfo.DID_F101[i] = EOL_F101.F101_Byte[i];
......@@ -939,7 +941,11 @@ void Ser2EToDFlashInfoInit(void)
{
Ser2EToDFlashInfo.DID_F110[i] = EOL_F110.F110_Byte[i];
}
for (i = 0u; i < 24u; ++i)
{
Ser2EToDFlashInfo.DID_F102[i] = EOL_F102.F102_Byte[i];
}
Ser2EToDFlashInfo.DID_7101[0] = 0x00u;
Ser2EToDFlashInfo.DID_7101[1] = 0x30u;
Ser2EToDFlashInfo.DID_7101[2] = 0x00u;
......@@ -992,6 +998,26 @@ void DTCToDFlashInfoInit(void)
*/
void DTCConfigurationInit(void)
{
if(Val_EOL_F102_RadarType() != 2)
{
DTCToDFlashInfo.DTC[cnU015987].DTCStatus = DTCNoTestLastClear | DTCNoTestThisCycle;
DTCToDFlashInfo.DTC[cnU015987].DTCAgeing = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].DTCCount = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].DTCPendingCount = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.ECUPowerVoltage = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.VehicleSpeed = 0x0000u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.OccurrenceCounter = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.FirstMalfunction = 0x00000000u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.LastMalfunction = 0x00000000u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.Time.min = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.Time.sec = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.Time.hour = 0x00u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.Time.month = 0x01u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.Time.day = 0x01u;
DTCToDFlashInfo.DTC[cnU015987].Snapshot.Time.year = 0x00u;
}
/*if(!Val_EOL_F110_EMS())
{
DTCToDFlashInfo.DTC[cnU010087].DTCStatus = DTCNoTestLastClear | DTCNoTestThisCycle;
......
......@@ -336,20 +336,19 @@ typedef struct
uint8_t DID_DFEF[64];
uint8_t DID_F101[16];
uint8_t DID_F110[8];
uint8_t DID_F100[16];
uint8_t DID_F102[24];
uint8_t DID_7101[3];
uint8_t DID_7102[3];
uint8_t DID_7103[1];
uint8_t Filling[1];
} Ser2EToDFlashInfoUnion;
typedef struct
{
uint16_t ECUPowerVoltage;
uint8_t OccurrenceCounter;
uint16_t VehicleSpeed;
uint32_t FirstMalfunction;
uint32_t LastMalfunction;
uint8_t OccurrenceCounter;
uint16_t VehicleSpeed;
uint32_t FirstMalfunction;
uint32_t LastMalfunction;
struct
{
uint8_t sec;
......
......@@ -429,7 +429,7 @@ void TestDTC_U015987(void)
{
if(DTCList[cnU015987][1u])
{
//if(Val_EOL_F110_AC())
if(Val_EOL_F102_RadarType() == 2)
{
if(Radra_Get_Warning() == 6u)
{
......
......@@ -5,7 +5,7 @@ const uint8_t S22DLC [] = {2u, 2u, 2u, 2u, 2u, 2u, 2u, 2u, 2u, 2u, 2u, 2u, 2u,
const uint16_t S22DID [] = {0xF199u, 0xF187u, 0xF18Au, 0xF190u, 0xF1A2u, 0xF191u, 0xF189u, 0xF193u,
0xF195u, 0xF180u, 0xF112u, 0xF198u, 0xF197u, 0xF113u, 0xF182u, 0xF186u,
0xF18Bu, 0xF18Cu, 0x0200u, 0x0201u, 0xDFECu, 0xDFEDu, 0xDFEEu, 0xDFEFu,
0xF110u, 0xF101u, 0xF100, 0x7101, 0x7102u, 0x7103u,0xF306u, 0xF307u};
0xF110u, 0xF101u, 0xF102, 0x7101, 0x7102u, 0x7103u,0xF306u, 0xF307u};
/**
*22服务是否支持功能寻址
......
......@@ -139,8 +139,8 @@ void UDS_22Service_DID(void)
case 0xF110:
UDS_22Service_DID_F110(); /*网络拓扑配置*/
break;
case 0xF100:
UDS_22Service_DID_F100(); /*网络拓扑配置*/
case 0xF102:
UDS_22Service_DID_F102(); /*网络拓扑配置*/
break;
case 0x7101:
UDS_22Service_DID_7101(); /*读取首保里程*/
......@@ -406,10 +406,10 @@ void UDS_22Service_DID_F1A2(void)
*22服务DIDF100
*网络拓扑配置
*/
void UDS_22Service_DID_F100(void)
void UDS_22Service_DID_F102(void)
{
memcpy(DiagMSG.msgData.DidDetail.Data, Ser2EToDFlashInfo.DID_F100, sizeof(Ser2EToDFlashInfo.DID_F100));
UDS_Service_Response(0x22u, POSITIVE_RSP, DIAG_ID_Tx, 2u + 16u, DiagMSG.msgData.Data);
memcpy(DiagMSG.msgData.DidDetail.Data, Ser2EToDFlashInfo.DID_F102, sizeof(Ser2EToDFlashInfo.DID_F102));
UDS_Service_Response(0x22u, POSITIVE_RSP, DIAG_ID_Tx, 2u + 24u, DiagMSG.msgData.Data);
}
/**
......
......@@ -31,7 +31,7 @@ void UDS_22Service_DID_F197(void);
void UDS_22Service_DID_F198(void);
void UDS_22Service_DID_F199(void);
void UDS_22Service_DID_F1A2(void);
void UDS_22Service_DID_F100(void);
void UDS_22Service_DID_F102(void);
void UDS_22Service_DID_F101(void);
void UDS_22Service_DID_F110(void);
void UDS_22Service_DID_7101(void);
......
#include "UDS_2EService_Filter.h"
const uint16_t S2EDLC[] = { 4u, 17u, 4u, 8u, 16u, 8u, 64u, 64u, 64u, 64u, 8u, 8u,/* 16u,*/ 3u, 3u, 1u};
const uint16_t S2EDID[] = {0xF199u, 0xF190u, 0xF1A2u, 0xF112u, 0xF198u, 0xF197u, 0xDFECu, 0xDFEDu, 0xDFEEu, 0xDFEFu, 0xF101u, 0xF110u,/*0xF100,*/0x7101,0x7102,0x7103};
const uint16_t S2EDLC[] = { 4u, 17u, 4u, 8u, 16u, 8u, 64u, 64u, 64u, 64u, 8u, 8u, 24u, 3u, 3u, 1u};
const uint16_t S2EDID[] = {0xF199u, 0xF190u, 0xF1A2u, 0xF112u, 0xF198u, 0xF197u, 0xDFECu, 0xDFEDu, 0xDFEEu, 0xDFEFu, 0xF101u, 0xF110u,0xF102,0x7101,0x7102,0x7103};
/**
*2E服务是否支持功能寻址
......
......@@ -93,9 +93,6 @@ void UDS_2EService_DID(void)
case 0xF110:
UDS_2EService_DID_F110( ); /*网络拓扑配置*/
break;
case 0xF100:
UDS_2EService_DID_F100( ); /*首保里程*/
break;
case 0x7101:
UDS_2EService_DID_7101( );
UDS_FLAG = 1; /*首保里程*/
......@@ -111,6 +108,9 @@ void UDS_2EService_DID(void)
case 0xF1A2:
UDS_2EService_DID_F1A2( );
break;
case 0xF102:
UDS_2EService_DID_F102( );
break;
default:
break;
}
......@@ -367,12 +367,15 @@ void UDS_2EService_DID_F101(void)
UDS_Service_Response(0x2Eu, NEGATIVE_RSP, DIAG_ID_Tx, 1u, ( uint8_t * )&enResult);
}
}
void UDS_2EService_DID_F100(void)
/**
*2E服务DIDF102
*功能配置字数据
*/
void UDS_2EService_DID_F102(void)
{
uint8_t enResult = WFLASH_RW_PASS;
EOL_SetF101(DiagMSG.msgData.DidDetail.Data, 16u);
memcpy(Ser2EToDFlashInfo.DID_F100, DiagMSG.msgData.DidDetail.Data, sizeof(Ser2EToDFlashInfo.DID_F100));
EOL_SetF102(DiagMSG.msgData.DidDetail.Data, 24u);
memcpy(Ser2EToDFlashInfo.DID_F102, DiagMSG.msgData.DidDetail.Data, sizeof(Ser2EToDFlashInfo.DID_F102));
enResult = write2EData(Write2EData);
if ( enResult == WFLASH_RW_PASS )
{
......@@ -384,6 +387,7 @@ void UDS_2EService_DID_F100(void)
UDS_Service_Response(0x2Eu, NEGATIVE_RSP, DIAG_ID_Tx, 1u, ( uint8_t * )&enResult);
}
}
void UDS_2EService_DID_7101(void)
{
uint8_t enResult = WFLASH_RW_PASS;
......
......@@ -19,7 +19,7 @@ void UDS_2EService_DID_F199(void);
void UDS_2EService_DID_F1A2(void);
void UDS_2EService_DID_F110(void);
void UDS_2EService_DID_F101(void);
void UDS_2EService_DID_F100(void);
void UDS_2EService_DID_F102(void);
void UDS_2EService_DID_7101(void);
void UDS_2EService_DID_7102(void);
void UDS_2EService_DID_7103(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment