Commit f142601f authored by 高士达's avatar 高士达

Merge branch 'shihao' into 'dev'

Shihao

See merge request !10
parents 7c8b0454 d16c267a
/le19源码/IAR_EWARM/Application/settings
@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM --download_only Downloads a code image without starting a debug
@REM session afterwards.
@REM --silent Omits the sign-on message.
@REM --timeout Limits the maximum allowed execution time.
@REM
@echo off
if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.general.xcl" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.driver.xcl"
@echo off
goto end
:debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.general.xcl" "--debug_file=%~1" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.driver.xcl"
@echo off
:end
\ No newline at end of file
@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM --download_only Downloads a code image without starting a debug
@REM session afterwards.
@REM --silent Omits the sign-on message.
@REM --timeout Limits the maximum allowed execution time.
@REM
@echo off
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"
@echo off
goto end
: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" "--debug_file=%~1" --backend -f "D:\le19基于lg02y的变更单号0059的基础上改\le19源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off
:end
\ No newline at end of file
param([String]$debugfile = "");
# This powershell file has been generated by the IAR Embedded Workbench
# C - SPY Debugger, as an aid to preparing a command line for running
# the cspybat command line utility using the appropriate settings.
#
# Note that this file is generated every time a new debug session
# is initialized, so you may want to move or rename the file before
# making changes.
#
# You can launch cspybat by typing Powershell.exe -File followed by the name of this batch file, followed
# by the name of the debug file (usually an ELF / DWARF or UBROF file).
#
# Read about available command line parameters in the C - SPY Debugging
# Guide. Hints about additional command line parameters that may be
# useful in specific cases :
# --download_only Downloads a code image without starting a debug
# session afterwards.
# --silent Omits the sign - on message.
# --timeout Limits the maximum allowed execution time.
#
if ($debugfile -eq "")
{
& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\common\bin\cspybat" -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
}
else
{
& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\common\bin\cspybat" -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --debug_file=$debugfile --backend -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
}
@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM --download_only Downloads a code image without starting a debug
@REM session afterwards.
@REM --silent Omits the sign-on message.
@REM --timeout Limits the maximum allowed execution time.
@REM
@echo off
if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.general.xcl" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.driver.xcl"
@echo off
goto end
:debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.general.xcl" "--debug_file=%~1" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.driver.xcl"
@echo off
:end
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<crun>
<version>1</version>
<filter_entries>
<filter index="0" type="default">
<type>*</type>
<start_file>*</start_file>
<end_file>*</end_file>
<action_debugger>0</action_debugger>
<action_log>1</action_log>
</filter>
</filter_entries>
</crun>
<?xml version="1.0"?>
<settings>
<Stack>
<FillEnabled>0</FillEnabled>
<OverflowWarningsEnabled>1</OverflowWarningsEnabled>
<WarningThreshold>90</WarningThreshold>
<SpWarningsEnabled>1</SpWarningsEnabled>
<WarnLogOnly>1</WarnLogOnly>
<UseTrigger>1</UseTrigger>
<TriggerName>main</TriggerName>
<LimitSize>0</LimitSize>
<ByteLimit>50</ByteLimit>
</Stack>
<JLinkDriver>
<WatchCond>_ 0</WatchCond>
<Watch0>_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0</Watch0>
<Watch1>_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0</Watch1>
<CStepIntDis>_ 0</CStepIntDis>
<LeaveTargetRunning>_ 0</LeaveTargetRunning>
</JLinkDriver>
<DebugChecksum>
<Checksum>503555919</Checksum>
</DebugChecksum>
<Exceptions>
<StopOnUncaught>_ 0</StopOnUncaught>
<StopOnThrow>_ 0</StopOnThrow>
</Exceptions>
<CallStack>
<ShowArgs>0</ShowArgs>
</CallStack>
<Disassembly>
<MixedMode>1</MixedMode>
</Disassembly>
<CallStackLog>
<Enabled>0</Enabled>
</CallStackLog>
<CallStackStripe>
<ShowTiming>1</ShowTiming>
</CallStackStripe>
<TermIOLog>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
</TermIOLog>
<Log_file>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
<Category>_ 0</Category>
</Log_file>
<Disassemble_mode>
<mode>0</mode>
</Disassemble_mode>
<DisassembleMode>
<mode>0</mode>
</DisassembleMode>
<Breakpoints2>
<Count>0</Count>
</Breakpoints2>
<Aliases>
<Count>0</Count>
<SuppressDialog>0</SuppressDialog>
</Aliases>
</settings>
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
[CFI]
CFISize = 0x00
CFIAddr = 0x00
[CPU]
MonModeVTableAddr = 0xFFFFFFFF
MonModeDebug = 0
MaxNumAPs = 0
LowPowerHandlingMode = 0
OverrideMemMap = 0
AllowSimulation = 1
ScriptFile="..\..\debugger_scripts\Default.JLinkScript"
[FLASH]
CacheExcludeSize = 0x00
CacheExcludeAddr = 0x00
MinNumBytesFlashDL = 0
SkipProgOnCRCMatch = 1
VerifyDownload = 1
AllowCaching = 1
EnableFlashDL = 2
Override = 1
Device="Cortex-R5"
[GENERAL]
WorkRAMSize = 0x00
WorkRAMAddr = 0x00
RAMUsageLimit = 0x00
[SWO]
SWOLogFile=""
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF
......@@ -23,9 +23,9 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/* 雷达2hz */{ 12u, POPUP_Radar_2HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_2HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 雷达4hz */{ 12u, POPUP_Radar_4HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_4HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 倒车雷达系统故障 */{ 12u, POPUP_RADAR_SYSTEM_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_2S, POPUP_MODE_SINGLE, 30u, 10u, },
/* 倒车雷达传感器故障 */{ 12u, POPUP_RADAR_SENSOR_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_2S, POPUP_MODE_SINGLE, 30u, 10u, },
/* 倒车雷达传感器故障 */{ 12u, POPUP_RADAR_SENSOR_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_2S, POPUP_MODE_SINGLE, 20u, 10u, },
/* 雷达开关故障 */{ 0u, POPUP_RADAR_SWITCH_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_0S, POPUP_MODE_SINGLE, 30u, 10u, },
/* 雷达开关故障 */{ 0u, POPUP_RADAR_CHECK_OK, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_OK0S, POPUP_MODE_SINGLE, 30u, 10u, },
/* 雷达自检ok长鸣0.5s */{ 12u, POPUP_RADAR_CHECK_OK, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_OK0S, POPUP_MODE_SINGLE, 5u, 5u, },
/* 制动液位低 */{ 2u, POPUP_EPB_Status, NULL, 1u, POPUP_MODE_LONG_HINT, SND_EPB_Status, POPUP_MODE_SINGLE, 11u, 10u, },
/* 安全带未系 1HZ */{ 3u, POPUP_SEATBELT_DR_1HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_SEATBELT_DR_1HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 安全带未系 2HZ */{ 3u, POPUP_SEATBELT_DR_2HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_SEATBELT_DR_2HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
......@@ -61,7 +61,7 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/* OTA 报警4 */{ 22u, POPUP_OTA_4, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_4, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警5 */{ 22u, POPUP_OTA_5, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_5, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警5 */{ 22u, POPUP_ESC, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_ESC, POPUP_MODE_SINGLE, 11u, 10u, },
/* 超速报警 */{ 13u, POPUP_Over_Speed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Over_Speed, POPUP_MODE_MULTI, 11u, 10u, },
/* 超速报警 */{ 13u, POPUP_Over_Speed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Over_Speed, POPUP_MODE_SINGLE, 11u, 10u, },
/*==========================================================================================================================================================================================================================================*/
};
......
......@@ -78,10 +78,10 @@ const SndAttributeStruct SndAttributeTable [ SND_SRC_TOTAL_NUM ] = {
{ /* 雷达 1HZ */ 0x03, 12u, SND_CYCLE_NONSTOP, SND_MODE_SINGLE, 1000u, },
{ /* 雷达 2HZ */ 0x03, 12u, SND_CYCLE_NONSTOP, SND_MODE_SINGLE, 500u, },
{ /* 雷达 4HZ */ 0x04, 12u, SND_CYCLE_NONSTOP, SND_MODE_SINGLE, 250u, },
{ /* 雷达 2S */ 0x02, 3u, 1u, SND_MODE_SINGLE, 2000u, },
{ /* 雷达 2S */ 0x02, 12u, 1u, SND_MODE_LOOP, 2000u, },
{ /* 雷达 4S */ 0x02, 3u, 1u, SND_MODE_SINGLE, 4000u, },
{ /* 雷达 0.5S */ 0x02, 3u, 1u, SND_MODE_SINGLE, 500u, },
{ /* 雷达 0.5S */ 0x02, 3u, 1u, SND_MODE_SINGLE, 500u, },
{ /* 雷达 0.5S */ 0x02, 12u, 1u, SND_MODE_SINGLE, 500u, },
{ /* 制动液位低 */ 0x07, 2u, 1u, SND_MODE_SINGLE, 1000u, },
{ /* 安全带未系 1HZ */ 0x03, 3u, SND_CYCLE_NONSTOP, SND_MODE_SINGLE, 1000u, },
{ /* 安全带未系 2HZ */ 0x03, 3u, SND_CYCLE_NONSTOP, SND_MODE_SINGLE, 500u, },
......
......@@ -357,7 +357,7 @@ const st_CANMsgAttribute CAN_MSG_CONST_ARRAY[ID_TOTAL_MAX] =
5000ul,
0x18FEE69Ful,
(( void * )0),
(( void * )0),
Can_Receive,
(( void * )0),
},
{
......
......@@ -286,5 +286,5 @@ void Can_Set_Buff_18FF6F17(canlib_uint8_t *CopyData);
//void Can_Set_Buff_18FF4117(canlib_uint8_t *CopyData);
void Can_Set_Buff_18FEDA17(canlib_uint8_t *CopyData);
void Can_Set_Buff_18FEE017(canlib_uint8_t *CopyData);
void Can_Receive(uint8_t val []);
#endif
......@@ -70,7 +70,7 @@ void SERVICE_Time_Calibration_Service(void)
if (Time_calibration >= 3u)/*86104-12*/
{
/*時間同步完成,記錄同步狀態 IOTimeCalEnable=1代表已經同步過*/
IOTimeCalEnable = 1u;
IOTimeCalEnable = 0u;
/*時間顯示是完整的所以同步時間*/
Year_FLAG += 1985u;/*86104-6*/
......
......@@ -12,6 +12,7 @@
#include "Common_Interface.h"
#include "Telltales_user.h"
extern uint8_t Over_Speed_Status;
RTC_Time_st_t RTCTimeCurrent;
extern uint32_t Factory_ClearOdo_Display_Flag;
BattCurr_st_t BattCurr;
......@@ -76,6 +77,7 @@ uint16_t PowerOn_Scan_Timing = 0;
uint16_t PowerOn_Scan_Flag = 1;
//uint16_t Gauge_VSpeed_Display_Flag = 0;
uint16_t Gauge_VSpeed_Display_Flag = 0;
uint16_t Over_Speed_Config = 0;
/**************************************************************************
* \brief ���ٱ���ʾ����
* \attention �÷��������뱻ʵʱ����
......@@ -85,6 +87,7 @@ void Gauge_VSpeed_Display(void)
{
uint16_t VSpeedDisplayValue = 0;
// static uint16_t refresh_timer=0;
Over_Speed_Config = Get_Over_Speed_Config(Val_EOL_F102_MaximumSpeedLimit());
if ( SYS_OPR_STAT_IGN_ON )
{
if ( Common_Get_Disp_V_Speed_Valid( ) == 1u )
......@@ -93,7 +96,7 @@ void Gauge_VSpeed_Display(void)
VSpeedDisplayValue = Common_Get_Disp_V_Speed( );
if(Factory_ClearOdo_Display_Flag == 0)
{
if(Common_Get_Disp_V_Speed( ) >= 810)
if(Common_Get_Disp_V_Speed( ) > Over_Speed_Config)
{
SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 1;
......@@ -102,14 +105,14 @@ void Gauge_VSpeed_Display(void)
{
if(Gauge_VSpeed_Display_Flag == 1)
{
if(Common_Get_Disp_V_Speed( ) < 780)
if(Over_Speed_Status == 1)
{
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 0;
SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10);
}
else
{
SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10);
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 0;
}
}
else
......@@ -137,6 +140,50 @@ void Gauge_VSpeed_Display(void)
}
}
uint16_t Get_Over_Speed_Config(uint8_t Para0)
{
uint16_t Ret = 0U;
switch ( Para0 )
{
case 0x00:
Ret = 0xffff;
break;
case 0x01:
Ret = 607;
break;
case 0x02:
Ret = 659;
break;
case 0x03:
Ret = 700;
break;
case 0x04:
Ret = 751;
break;
case 0x05:
Ret = 803;
break;
case 0x06:
Ret = 854;
break;
case 0x07:
Ret = 906;
break;
case 0x08:
Ret = 957;
break;
case 0x09:
Ret = 1009;
break;
default:
Ret = 0xffff;
break;
}
return Ret;
}
/**************************************************************************
* \brief ���ʱ���ʾ����
* \attention �÷��������뱻ʵʱ����
......@@ -225,9 +272,9 @@ void Gauge_Power_Display(void)
SEG_SET_PowerDial(1u, 0u, 0u, 255u);
}
}
else//-
else//PTModeInd = 1
{
if (Batt_Curr < 0xFB00)
if (Batt_Curr < 0xFB00)//0.05 -1600
{
BattCurr.Valid = 1;
Batt_Curr = (Batt_Curr * 5);
......@@ -241,7 +288,12 @@ void Gauge_Power_Display(void)
Batt_Curr = 160000 - Batt_Curr;
BattCurr.Symbol = 1;
}
BattCurr.Value = Batt_Curr/100;
BattCurr.Value = Batt_Curr; //100倍
BattCurr.Value *= 100;//乘100%
BattCurr.Value /= 200;//除200
BattCurr.Value += 90;//大于等于10进1 0.1*100=10
BattCurr.Value /= 100;//1倍,留整数
}
else
{
......@@ -255,29 +307,23 @@ void Gauge_Power_Display(void)
//0格和0%
SEG_SET_PowerDial(1u, 0u, 0u, 0u);
}
else
else//PTModeInd = 1,且有效时
{
if(BattCurr.Symbol == 1)
if(BattCurr.Value == 0)
{
if((BattCurr.Value <= 100)&&(BattCurr.Value > 0))
{
//-1格和-50%
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
}
else if(BattCurr.Value > 100)
{
//-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u);
}
SEG_SET_PowerDial(1u, 0u, 0u, 255u);
}
else
{
if(BattCurr.Value >= 0)
//-1格和-50%
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
if(BattCurr.Value > 50)
{
//0格和0%
SEG_SET_PowerDial(1u, 0u, 0u, 0u);
//-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u);
}
}
}
}
}
}
......@@ -374,6 +420,7 @@ void Gauge_Battery_Display(void)
* \attention �÷��������뱻ʵʱ����
* \retval ��
******************************************************************************/
extern uint8_t Can18fee69f_receive;
void Gauge_Clock_Display(void)
{
if ( SYS_OPR_STAT_IGN_ON )
......@@ -385,7 +432,15 @@ void Gauge_Clock_Display(void)
//ʱ����ʾ
if(Factory_ClearOdo_Display_Flag == 0)
{
SEG_SET_Clock(RTCTimeCurrent.Hour, RTCTimeCurrent.Minute, FLASH_SYNC_1Hz, 1, 1);
if((CAN_MSG_Status(ID_can0x18FEE69F_Msg_Count) != 0u)||(Can18fee69f_receive != 1))
{
Can18fee69f_receive = 0;
SEG_SET_Clock(0, 0, 0, 0, 0);
}
else
{
SEG_SET_Clock(RTCTimeCurrent.Hour, RTCTimeCurrent.Minute, FLASH_SYNC_1Hz, 1, 1);
}
}
}
......
......@@ -52,7 +52,7 @@ void Gauge_Service(void);
void Temp_Calc_Init(void);
void Temp_Calc_Send(void);
uint32_t Get_Temp_Calc(void);
uint16_t Get_Over_Speed_Config(uint8_t Para0);
#endif
......@@ -73,8 +73,12 @@ uint32_t TestBackupRam;
uint16_t CANModeInitFlag = 0U;
extern uint32_t Factory_ClearOdo_Display_Flag;
uint8_t Can18fee69f_receive = 0;
void Can_Receive(uint8_t val [])
{
Can18fee69f_receive = 1;
}
uint16_t SleepTime_Timing;
......@@ -349,6 +353,7 @@ void Power_KL30_Init(void)
Temp_Calc_Init();
Maintenance_Init_Example();
EnergyRecovery_KL30_Init();
Can18fee69f_receive = 0;
}
/**********************************************************************************************************
*@Function: Power_Wakeup_Init
......@@ -383,6 +388,7 @@ void Power_Wakeup_Init(void)
Temp_Calc_Init();
LED_Driver_Init_Wakeup(u8LEDDriverRamData, &led_dr);
Maintenance_Init_Example();
Can18fee69f_receive = 0;
}
/**********************************************************************************************************
*@Function: Power_Management_Init
......
......@@ -173,7 +173,7 @@ void Sys_Run_Mode_100ms_Tasks_Group0(void)
SERVICE_Time_Calibration_Service(); //时钟更新服务
RTE_RTC_Services_100Ms_Cbk(); //时钟服务函数
//RTE_RTC_Services_100Ms_Cbk(); //时钟服务函数
Services_ODO_100MS_Cbk();
// Services_ODO_100MS_Cbk1();/*程序内部使用,里程备份增加专用里程,非显示里程*/
Services_TripA_100MS_Cbk();
......
......@@ -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] = 0x50;
}
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
......@@ -28,7 +28,7 @@ Ser2EToDFlashInfoUnion Ser2EToDFlashInfo;
DTCToDFlashInfoUnion DTCToDFlashInfo;
const uint8_t DID_F180[16]= {'1','0','3',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const uint8_t DID_F187[21]={'9','9','0','0','1','6','2','7','4','4',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const uint8_t DID_F189[16]={'0','0','1','.','0','0','2',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};//主机厂定义的软件版本编号
const uint8_t DID_F189[16]={'0','0','1','.','0','0','3',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};//主机厂定义的软件版本编号
const uint8_t DID_F191[16]={'0','0','1','.','0','0','1',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};//主机厂定义的硬件版本编号
const uint8_t DID_F193[16]={'H','V','0','0','1','.','0','0','1',0x20,0x20,0x20,0x20,0x20,0x20,0x20};//供应商定义的硬件版本编号
const uint8_t DID_F199[4]={0x20u,0x23u,0x02u,0x24u};
......@@ -39,7 +39,7 @@ DTCToDFlashInfoUnion DTCToDFlashInfo;
const uint8_t Ser22_DID_F18A[6] = {'4', '5', '1', '0', '0', '3'};
const uint8_t Ser22_DID_F18B[4] = {0x20, 0x23, 0x02, 0x24};
const uint8_t Ser22_DID_F18C[24] = "0000";
const uint8_t Ser22_DID_F195[16] = "SV001.002 ";//供应商定义的软件版本编号
const uint8_t Ser22_DID_F195[16] = "SV001.003 ";//供应商定义的软件版本编号
const uint8_t Ser22_DID_F1A2[4] ={0x20,0x23,0x02,0x24};
/*const uint8_t Ser22_DID_F1AA[8];
const uint8_t Ser22_DID_F1AE[] = "";
......@@ -777,7 +777,7 @@ void ReadAllDFlashData(void)
}
EOL_SetF101(Ser2EToDFlashInfo.DID_F101, 16u);
EOL_SetF110(Ser2EToDFlashInfo.DID_F110, 8u);
EOL_SetF102(Ser2EToDFlashInfo.DID_F102, 24u);
DTCConfigurationInit();
}
......@@ -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);
......
......@@ -8,7 +8,7 @@
#define WFLASH_BLOCK_01_SIZE (24U)
#define WFLASH_BLOCK_02_SIZE (20U)
#define WFLASH_BLOCK_03_SIZE (116u)
#define WFLASH_BLOCK_04_SIZE (356U)
#define WFLASH_BLOCK_04_SIZE (400U)
#define WFLASH_BLOCK_05_SIZE (400+4)
#define WFLASH_BLOCK_06_SIZE (20U)
......
......@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by GPIO configuration tool.
* Date : 2023-03-31 11:03:04
* Date : 2024/1/28 10:25:53
* Cfg Tool Ver : 1.0.0
* (c) Heilongjiang TYW electronics co., LTD
*
......@@ -20,7 +20,7 @@ const GPIO_Dir_Def_Cfg_t GPIODirDefCfg[GPIO_VALID_PORT_NUM] =
/* RunModeDir RunModeDef SleepModeDir SleepModeDef */
{ 0x240310FFUL, 0x26001020UL, 0x240310FFUL, 0x26000040UL,},
{ 0xFFF59B70UL, 0x00000000UL, 0xC0019B63UL, 0x00000360UL,},
{ 0x18FFFFFAUL, 0x0AC7C80AUL, 0x3AFFFFFAUL, 0x00400000UL,},
{ 0x18FFFFFAUL, 0x0847C80AUL, 0x38FFFFFAUL, 0x00400000UL,},
{ 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,},
};
......@@ -114,9 +114,9 @@ const GPIO_Pin_Cfg_t GPIOPinCfg[GPIO_VALID_PIN_NUM] =
{ 0x0054, 0x00E0, 0x0020,},
{ 0x0055, 0x00E0, 0x0020,},
{ 0x0056, 0x00E0, 0x0020,},
{ 0x0057, 0x00C1, 0x0020,},
{ 0x0057, 0x00E1, 0x0020,},
{ 0x0058, 0x10E0, 0x1020,},
{ 0x0059, 0x10C0, 0x0020,},
{ 0x0059, 0x10C0, 0x1020,},
{ 0x005A, 0x10E0, 0x0020,},
{ 0x005B, 0x00E0, 0x0020,},
{ 0x005C, 0x00E0, 0x0020,},
......
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