Commit 0e81d4b0 authored by 李俭双's avatar 李俭双

🐞 fix:合并提交

parent 52b40f13
...@@ -26,10 +26,11 @@ typedef struct ...@@ -26,10 +26,11 @@ typedef struct
extern void UDS_Service_Response(uint8_t si, uint8_t RspType, uint16_t A_TA_type, uint16_t A_Length, uint8_t *A_Data); extern void UDS_Service_Response(uint8_t si, uint8_t RspType, uint16_t A_TA_type, uint16_t A_Length, uint8_t *A_Data);
/*诊断使用, 判断App一致性, 禁止修改(内部版本号除外)*/ /*诊断使用, 判断App一致性, 禁止修改(内部版本号除外)*/
#if(IC_Current == TY200_080000b)
extern const ProjectInfoStruct ProjectInfo __attribute__((section(".ARM.__at_0x00007800"))) = extern const ProjectInfoStruct ProjectInfo __attribute__((section(".ARM.__at_0x00007800"))) =
{ {
"TianYing100", // 天鹰100 "TianYing100", // 天鹰100
"TY200.080000b", "TY200.080000b", //零件号
"BAT32G139GK64FB", // 中微芯片 "BAT32G139GK64FB", // 中微芯片
{ {
"CAN_STD", "CAN_STD",
...@@ -38,7 +39,20 @@ extern const ProjectInfoStruct ProjectInfo __attribute__((section(".ARM.__at_0x0 ...@@ -38,7 +39,20 @@ extern const ProjectInfoStruct ProjectInfo __attribute__((section(".ARM.__at_0x0
{DIAG_ID_Tx, DIAG_ID_Rx_PHY, DIAG_ID_Rx_FUN} {DIAG_ID_Tx, DIAG_ID_Rx_PHY, DIAG_ID_Rx_FUN}
} }
}; };
#else
extern const ProjectInfoStruct ProjectInfo __attribute__((section(".ARM.__at_0x00007800"))) =
{
"TianYing100", // 天鹰100
"TY200.080000b_ty", //零件号
"BAT32G139GK64FB", // 中微芯片
{
"CAN_STD",
"CAN_CH_0",
"CAN_500Kbps",
{DIAG_ID_Tx, DIAG_ID_Rx_PHY, DIAG_ID_Rx_FUN}
}
};
#endif
DiagSendDataNeg NegRes; DiagSendDataNeg NegRes;
uint8_t UDS_ISO14229_Transfer[250]; uint8_t UDS_ISO14229_Transfer[250];
...@@ -85,6 +99,7 @@ extern uint16_t DataESpeedDisp; ...@@ -85,6 +99,7 @@ extern uint16_t DataESpeedDisp;
ECU received the diagnostic request on; ECU received the diagnostic request on;
******************************************************************************/ ******************************************************************************/
#if(IC_Current == TY200_080000b)
//软件版本号 F195 //软件版本号 F195
uint8_t MCU_SWversion[6] = {'S', 'V', (uint8_t)((SWV >> 8u) & 0x0Fu) + 0x30u, '.', (uint8_t)((SWV >> 4u) & 0x0Fu) + 0x30u, (uint8_t)(SWV & 0x0Fu) + 0x30u}; uint8_t MCU_SWversion[6] = {'S', 'V', (uint8_t)((SWV >> 8u) & 0x0Fu) + 0x30u, '.', (uint8_t)((SWV >> 4u) & 0x0Fu) + 0x30u, (uint8_t)(SWV & 0x0Fu) + 0x30u};
...@@ -96,17 +111,32 @@ uint8_t MCU_FBLversion[6] = {'B', 'V', (uint8_t)((BTV >> 8u) & 0x0Fu) + 0x30u, ' ...@@ -96,17 +111,32 @@ uint8_t MCU_FBLversion[6] = {'B', 'V', (uint8_t)((BTV >> 8u) & 0x0Fu) + 0x30u, '
//零件号信息 F187 //零件号信息 F187
uint8_t MCU_PartNumber[13] = {'T', 'Y', '2', '0', '0', '.', '0', '8', '0', '0', '0', '0', 'b'}; uint8_t MCU_PartNumber[13] = {'T', 'Y', '2', '0', '0', '.', '0', '8', '0', '0', '0', '0', 'b'};
#else
//软件版本号 F195
uint8_t MCU_SWversion[6] = {'S', 'V', (uint8_t)((SWV >> 8u) & 0x0Fu) + 0x30u, '.', (uint8_t)((SWV >> 4u) & 0x0Fu) + 0x30u, (uint8_t)(SWV & 0x0Fu) + 0x30u};
//硬件版本号 F193
uint8_t MCU_HWversion[6] = {'H', 'V', (uint8_t)((HWV >> 8u) & 0x0Fu) + 0x30u, '.', (uint8_t)((HWV >> 4u) & 0x0Fu) + 0x30u, (uint8_t)(HWV & 0x0Fu) + 0x30u};
//引导程序版本信息 F180
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[17] = {'T', 'Y', '2', '0', '0', '.', '0', '8', '0', '0', '0', '0', 'b', '(', 't', 'y', ')'};
#endif
void Data_Set_DiagPara(void) void Data_Set_DiagPara(void)
{ {
uint8_t i; uint8_t i;
uint8_t length = 0;
//获取DID的值,等待写入DFlash //获取DID的值,等待写入DFlash
for(i = 0; i < 6; i++) for(i = 0; i < 6; i++)
{ {
DiagDataForDFlash.DID_F180[i] = MCU_FBLversion[i]; DiagDataForDFlash.DID_F180[i] = MCU_FBLversion[i];
} }
for(i = 0; i < 13; i++) length = (IC_Current == TY200_080000b) ? 13 : 17;
for( i = 0; i < length; i++)
{ {
DiagDataForDFlash.DID_F187[i] = MCU_PartNumber[i]; DiagDataForDFlash.DID_F187[i] = MCU_PartNumber[i];
} }
...@@ -702,6 +732,7 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A ...@@ -702,6 +732,7 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
uint16_t DID; uint16_t DID;
uint16_t Service22DiagDataLength = A_Length; uint16_t Service22DiagDataLength = A_Length;
uint16_t FunorPhy = A_TA_type; uint16_t FunorPhy = A_TA_type;
uint8_t length = 0;
for (i = 0; i < Service22DiagDataLength; ++i) for (i = 0; i < Service22DiagDataLength; ++i)
{ {
...@@ -790,11 +821,13 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A ...@@ -790,11 +821,13 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
break; break;
case 0xF187: // 读零件号 case 0xF187: // 读零件号
for (i = 0; i < 13; i++) length = (IC_Current == TY200_080000b) ? 13 : 17;
for (uint8_t i = 0; i < length; i++)
{ {
UDS_ISO14229_Transfer[i + 2] = MCU_PartNumber[i]; UDS_ISO14229_Transfer[i + 2] = MCU_PartNumber[i];
} }
UDS_Service_Response(si, POSITIVE_RSP, DIAG_ID_Tx, 2 + 13, UDS_ISO14229_Transfer); UDS_Service_Response(si, POSITIVE_RSP, DIAG_ID_Tx, 2 + length, UDS_ISO14229_Transfer);
break; break;
case 0x1024: // 读内部版本号 case 0x1024: // 读内部版本号
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#define _UDS_ISO14229_SERVICES_H_ #define _UDS_ISO14229_SERVICES_H_
#include "UDS_ISO14229_Server_Config.h" #include "UDS_ISO14229_Server_Config.h"
#include "CommonInterface\CommonInterface.h"
/** /**
*DFlash *DFlash
...@@ -337,15 +338,16 @@ typedef struct ...@@ -337,15 +338,16 @@ typedef struct
uint8_t RequestSeedIICnt; uint8_t RequestSeedIICnt;
} Ser27_FlowCtrlCntUnion; } Ser27_FlowCtrlCntUnion;
#define DID_F187_SIZE ((IC_Current == TY200_080000b) ? 13 : 17)
typedef struct typedef struct
{ {
uint32_t Flag; uint32_t Flag;
uint8_t DID_F180[6]; uint8_t DID_F180[6];
uint8_t DID_F187[13]; uint8_t DID_F187[DID_F187_SIZE];
uint8_t DID_F193[6]; uint8_t DID_F193[6];
uint8_t DID_F195[6]; uint8_t DID_F195[6];
uint8_t Filldata[1]; uint8_t Filldata[1];
}DiagDFlashData; } DiagDFlashData;
extern DiagDFlashData DiagDataForDFlash; extern DiagDFlashData DiagDataForDFlash;
typedef struct typedef struct
......
----2024/06/7----
BOOT文件V1.0
文件名:TY_TY200.080000b(ty)_Boot_B1.00_240607.hex
变更内容:BOOT文件出版提交
\ No newline at end of file
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