Commit 64ffbac1 authored by dell's avatar dell

fix:39850,39886,升级V1.04boot,根据开会内容修改Boot下读取DID(出差不方便,一起传禅道)

parent 803b3871
......@@ -302,6 +302,7 @@ typedef struct
INT32U Flag;
INT8U D_F184[7];
INT8U D_F183[10];
INT8U D_F191[8];
INT8U Fill[3];
} DIAG_Boot_DATA;
......
......@@ -619,7 +619,7 @@ uint8_t ReadDFlashData(uint32_t u8BlockNum, uint32_t u32Data[], uint16_t u16Len,
{
uint8_t enResult = 0;
enResult = DFLASH_Read_Word1(u8BlockNum, (uint8_t *)u32Data, u16Len);
if(DFLASH_Ser2EAddress == u8BlockNum)
if((DFLASH_Ser2EAddress == u8BlockNum) || (DFLASH_SerBOOTAddress == u8BlockNum))
{
if(enResult == 0)
{
......@@ -669,6 +669,41 @@ void Ser2EToDFlashInfoInit(void)
}
void BootToDFlashInfoInit(void)
{
DiagBootData.Flag = 0x7AA7A55Au;
DiagBootData.D_F183[0] = 'B';
DiagBootData.D_F183[1] = 'T';
DiagBootData.D_F183[2] = 'S';
DiagBootData.D_F183[3] = 'W';
DiagBootData.D_F183[4] = ':';
DiagBootData.D_F183[5] = '0';
DiagBootData.D_F183[6] = '.';
DiagBootData.D_F183[7] = '0';
DiagBootData.D_F183[8] = '.';
DiagBootData.D_F183[9] = '1';
DiagBootData.D_F184[0] = 0x00;
DiagBootData.D_F184[1] = 0x01;
DiagBootData.D_F184[2] = 0x01;
DiagBootData.D_F184[3] = 'a';
DiagBootData.D_F184[4] = 'a';
DiagBootData.D_F184[5] = 'a';
DiagBootData.D_F184[6] = 'a';
DiagBootData.D_F191[0] = 'H';
DiagBootData.D_F191[1] = 'W';
DiagBootData.D_F191[2] = ':';
DiagBootData.D_F191[3] = 'C';
DiagBootData.D_F191[4] = '.';
DiagBootData.D_F191[5] = '0';
DiagBootData.D_F191[6] = '.';
DiagBootData.D_F191[7] = '5';
}
INT8U DFLASH_Program ( INT32U address, INT16U *ptr, INT8U number_of_words )
{
unsigned int i;
......@@ -868,7 +903,7 @@ void Write_27_DATA_TO_FLASH ( void )
void ReadAllDflashData(void)
{
ReadDFlashData(DFLASH_Ser2EAddress,(uint32_t *)&Diag2eData.Flag, sizeof(Diag2eData), Ser2EToDFlashInfoInit);
ReadDFlashData(DFLASH_SerBOOTAddress,(uint32_t *)&DiagBootData.Flag, sizeof(DiagBootData), NULL);
ReadDFlashData(DFLASH_SerBOOTAddress,(uint32_t *)&DiagBootData.Flag, sizeof(DiagBootData), BootToDFlashInfoInit);
}
/******************************************************************************
......@@ -1075,9 +1110,9 @@ void UDS_Service_10_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
//会话不支持,返回7E负反馈
if( DefaultSession ==SessionType ){
if(FunorPhy == DIAG_ID_Rx_FUN )
return ;
if( DefaultSession ==SessionType ){
NegRes.code = serviceNotSupportedInActiveSession;
UDS_Service_Response ( 0x10, NEGATIVE_RSP, DIAG_ID_Tx, 1, ( uint8_t * ) ( &NegRes.code ) );
break;
......@@ -1596,14 +1631,16 @@ void UDS_Service_22_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
break;
case 0xF191:
//memcpy(UDS_ISO14229_Transfer+2,diag.F191,sizeof(diag.F191)); //???????
UDS_ISO14229_Transfer[ 2] = 'H';
/*UDS_ISO14229_Transfer[ 2] = 'H';
UDS_ISO14229_Transfer[ 3] = 'W';
UDS_ISO14229_Transfer[ 4] = ':';
UDS_ISO14229_Transfer[ 5] = 'C';
UDS_ISO14229_Transfer[ 6] = '.';
UDS_ISO14229_Transfer[ 7] = '0';
UDS_ISO14229_Transfer[ 8] = '.';
UDS_ISO14229_Transfer[ 9] = '5';
UDS_ISO14229_Transfer[ 9] = '5';*/
memcpy(UDS_ISO14229_Transfer+2,DiagBootData.D_F191,sizeof(DiagBootData.D_F191));
UDS_Service_Response ( 0x22, POSITIVE_RSP, DIAG_ID_Tx, 10, UDS_ISO14229_Transfer );
break;
case 0xF190:
......
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