Commit a957bea1 authored by 张明扬's avatar 张明扬 🇨🇳

feat:修改项目校验信息,修改零件号长度

parent 992552cd
......@@ -27,9 +27,9 @@ extern void UDS_Service_Response(uint8_t si, uint8_t RspType, uint16_t A_TA_type
/*诊断使用, 判断App一致性, 禁止修改(内部版本号除外)*/
extern const ProjectInfoStruct ProjectInfo __attribute__((section(".ARM.__at_0x00007800"))) =
{
"HaoJin232", // 豪进232
"HJYB-5",
"BAT32A239KK64FB", // 中微芯片
"TianYing100", // 天鹰100
"TY200.080000b",
"BAT32G139GK64FB", // 中微芯片
{
"CAN_STD",
"CAN_CH_0",
......@@ -93,7 +93,7 @@ uint8_t MCU_HWversion[6] = {'H', 'V', (uint8_t)((HWV >> 8u) & 0x0Fu) + 0x30u, '.
uint8_t MCU_FBLversion[6] = {'B', 'V', (uint8_t)((BTV >> 8u) & 0x0Fu) + 0x30u, '.', (uint8_t)((BTV >> 4u) & 0x0Fu) + 0x30u, (uint8_t)(BTV & 0x0Fu) + 0x30u};
//零件号信息 F187
uint8_t MCU_PartNumber[6] = {'H', 'J', 'Y', 'B', '-', '5'};
uint8_t MCU_PartNumber[13] = {'T', 'Y', '2', '0', '0', '.', '0', '8', '0', '0', '0', '0', 'b'};
void Data_Set_DiagPara(void)
{
......@@ -104,7 +104,7 @@ void Data_Set_DiagPara(void)
{
DiagDataForDFlash.DID_F180[i] = MCU_FBLversion[i];
}
for(i = 0; i < 6; i++)
for(i = 0; i < 13; i++)
{
DiagDataForDFlash.DID_F187[i] = MCU_PartNumber[i];
}
......@@ -141,7 +141,7 @@ void DFlash_init(void)
if( (ReadDiagDataForDFlash->Flag != 0x5AA5A77Au)||
(0!=memcmp(ReadDiagDataForDFlash->DID_F180 , MCU_FBLversion,sizeof(MCU_FBLversion)))||
(0!=memcmp(ReadDiagDataForDFlash->DID_F187 , MCU_PartNumber,sizeof(MCU_FBLversion)))||
(0!=memcmp(ReadDiagDataForDFlash->DID_F187 , MCU_PartNumber,sizeof(MCU_PartNumber)))||
(0!=memcmp(ReadDiagDataForDFlash->DID_F193 , MCU_HWversion ,sizeof(MCU_HWversion )))||
(0!=memcmp(ReadDiagDataForDFlash->DID_F195 , MCU_SWversion ,sizeof(MCU_SWversion )))
)
......@@ -774,11 +774,11 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
break;
case 0xF187: // 读零件号
for (i = 0; i < 6; i++)
for (i = 0; i < 13; i++)
{
UDS_ISO14229_Transfer[i + 2] = MCU_PartNumber[i];
}
UDS_Service_Response(si, POSITIVE_RSP, DIAG_ID_Tx, 2 + 6, UDS_ISO14229_Transfer);
UDS_Service_Response(si, POSITIVE_RSP, DIAG_ID_Tx, 2 + 13, UDS_ISO14229_Transfer);
break;
case 0x1024: // 读内部版本号
......
......@@ -341,10 +341,10 @@ typedef struct
{
uint32_t Flag;
uint8_t DID_F180[6];
uint8_t DID_F187[6];
uint8_t DID_F187[13];
uint8_t DID_F193[6];
uint8_t DID_F195[6];
uint8_t Filldata[4];
uint8_t Filldata[1];
}DiagDFlashData;
extern DiagDFlashData DiagDataForDFlash;
typedef struct
......
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