Commit 1cbdb82c authored by 高士达's avatar 高士达

Merge branch 'CJL' into 'dev'

Cjl

See merge request ty/tianying_ty100!105
parents 28e3e310 cf824626
SET PATH=C:\Keil_v5\ARM\ARMCC\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\tyw05\AppData\Local\Microsoft\WindowsApps;
SET ARMCC5_ASMOPT=--diag_suppress=9931
SET ARMCC5_CCOPT=--diag_suppress=9931
SET ARMCC5_LINKOPT=--diag_suppress=9931
SET CPU_TYPE=BAT32G139GK64FB
SET CPU_VENDOR=Cmsemicon
SET UV2_TARGET=TianYing200
......
......@@ -2,7 +2,7 @@
#include "Components.h"
#include "Application.h"
uint16_t CAN_TX_Count = 0;
//uint16_t CAN_TX_Count = 0;
uint16_t AliveCountTimer = 0;
uint8_t Power_KL30_Init_flag = 0;
uint8_t AliveCount_KL30_ResettingFlag = 0;
......@@ -19,7 +19,8 @@ void CAN_TX_Flag_Init(void)
void CAN_TX_Count_Init(void)
{
CAN_TX_Count = 0;
//CAN_TX_Count = 0;
CAN_Send_Cound = 0;
if(AliveCount_KL30_ResettingFlag > 0)
{
AliveCount_KL30_ResettingFlag = 0;
......
......@@ -9,6 +9,7 @@ __align(4)
uint32_t pRXBuff[CAN_RX_MSG_Block * CAN_CH0_ID_TOTAL_MAX];
uint32_t pTXBuff[CAN_TX_MSG_Block * CAN_CH0_ID_SEND_TOTAL];
static RSCAN0BusoffMonitorStruct RSCAN0Busoff;
uint8_t CAN_Send_Cound = 0;
void Can_Init(void)
{
......@@ -396,9 +397,8 @@ uint8_t Get_Busoff_Status(void)
{
return get_can_busoff(CAN_CH_0);
}
//extern uint8_t Can_341_Flg;
//extern uint8_t Can_580Send_flag;
uint8_t CAN_Send_Cound = 0;
extern uint8_t Tpms_TX_Flag;
uint8_t COM_APP_Process(st_CAN_Msg *Msg)
......
......@@ -41,5 +41,5 @@ extern void Can_Rx_Cak(CanTxRxMsg *Msg);
extern void Busoff(void);
extern uint8_t COM_APP_Process(st_CAN_Msg *Msg);
extern void Can_Write(st_CAN_Msg *Msg);
extern uint8_t CAN_Send_Cound;
#endif
......@@ -66,7 +66,7 @@ typedef struct __attribute__((aligned(4)))
extern uint32_t Get_Current_FaultCode(void);
//extern uint8_t Get_FaultCode_Valid(void);
extern void FaultCode_Init(void);
uint8_t List_Init(FaultCodeList_t *CodeList, uint32_t Arr[], uint8_t Len);
void FaultCode_Servers(void);
......
......@@ -4,6 +4,7 @@
#include "Components.h"
__align(4)
#define CLEAR_EE_LEN 16
#define BACK_MENU_TIME 1500
_Menu_Infor MenuInfor;
_Menu_Data MenuData;
......@@ -513,8 +514,8 @@ void MenuData_TCS_Init(void)
uint8_t ClearODO_Flag = 0;
void TYW_RESET_ODO(void)
{
uint8_t Clear_EE[4] = {0xff, 0xff, 0xff, 0xff};
uint8_t Clear_EE_8[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
uint8_t Clear_EE[CLEAR_EE_LEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
//uint8_t Clear_EE_8[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
if(Common_Get_IG_Sts( ) == COMMON_POWER_ON)
{
if(ClearODO_Flag < 1)
......@@ -524,16 +525,16 @@ void TYW_RESET_ODO(void)
ClearODO_Flag = 1;
Data_Mileage_Clear();
Service_Interval_First_Reset( ); /*保养*/
eeprom_WriteRecord(EEPROM_BLOCK_00, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_01, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_02, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_03, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_04, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_05, ( uint8_t * )&Clear_EE_8, 8);
eeprom_WriteRecord(EEPROM_BLOCK_06, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_07, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_08, ( uint8_t * )&Clear_EE, 4);
eeprom_WriteRecord(EEPROM_BLOCK_09, ( uint8_t * )&Clear_EE, 4);
//eeprom_WriteRecord(EEPROM_BLOCK_00, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
//eeprom_WriteRecord(EEPROM_BLOCK_01, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
//eeprom_WriteRecord(EEPROM_BLOCK_02, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
//eeprom_WriteRecord(EEPROM_BLOCK_03, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
//eeprom_WriteRecord(EEPROM_BLOCK_04, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
//eeprom_WriteRecord(EEPROM_BLOCK_05, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
eeprom_WriteRecord(EEPROM_BLOCK_06, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
eeprom_WriteRecord(EEPROM_BLOCK_07, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
eeprom_WriteRecord(EEPROM_BLOCK_08, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
eeprom_WriteRecord(EEPROM_BLOCK_09, ( uint8_t * )&Clear_EE, CLEAR_EE_LEN);
}
}
}
......
......@@ -37,9 +37,9 @@ Platform_16Bit
typedef enum
{
EM_TRIP_A,
EM_TRIP_B,
EM_TRIP_C,
EM_TRIP_D,
//EM_TRIP_B,
//EM_TRIP_C,
//EM_TRIP_D,
EM_TRIP_MAX,
} DataTripEnum_t;
......
......@@ -6,12 +6,12 @@ uint8_t DataODOBuf[Data_MEM_Block_ODO];
uint8_t DataTripBuf[Data_MEM_Block_Trip * EM_TRIP_MAX];
Mileage_t g_WriteMileage;
Mileage_t g_ReadMileage;
uint8_t odo_writeState;
uint8_t odoclr_writeState;
uint8_t trip_writeState;
uint8_t trip_readState;
uint8_t odo_readState;
uint8_t odo_readState;
uint16_t odo_writeState;
uint16_t odoclr_writeState;
uint16_t trip_writeState;
uint16_t trip_readState;
uint16_t odo_readState;
//uint8_t odo_readState;
uint32_t Milleage_InitFlag = 0U;
/******************************************************************************
Function:Data_ODO_KL30Init
......@@ -67,7 +67,7 @@ void Data_User_Mileage_KL30Init(void)
ODOInit.MaxValue = 1999990;
Data_ODO_KL30_Init(DataODOBuf, &ODOInit, Func.EEPromWrite_Cbk);
(void)Data_User_EEPROM_Read(EM_TRIP_BLOCK, TempBuf + 3, 4);
(void)Data_User_EEPROM_Read(EM_TRIP_BLOCK, TempBuf + 3, 1);
if (TempBuf[3] == 0XFFFFFFFF)
{
TripInit[EM_TRIP_A].Stamp = 0;
......@@ -88,17 +88,17 @@ void Data_User_Mileage_KL30Init(void)
TripInit[EM_TRIP_A].MaxValue = 9999; /* 最大999.9km 进行复位 */
TripInit[EM_TRIP_A].IsRestart = 1u;
TripInit[EM_TRIP_B].Stamp = 0xFFFFFFFFu;
TripInit[EM_TRIP_B].MaxValue = 99999;
TripInit[EM_TRIP_B].IsRestart = 1u;
TripInit[EM_TRIP_C].Stamp = 0xFFFFFFFFu;
TripInit[EM_TRIP_C].MaxValue = 99999;
TripInit[EM_TRIP_C].IsRestart = 1u;
TripInit[EM_TRIP_D].Stamp = 0xFFFFFFFFu;
TripInit[EM_TRIP_D].MaxValue = 99999;
TripInit[EM_TRIP_D].IsRestart = 1u;
//TripInit[EM_TRIP_B].Stamp = 0xFFFFFFFFu;
//TripInit[EM_TRIP_B].MaxValue = 99999;
//TripInit[EM_TRIP_B].IsRestart = 1u;
//
//TripInit[EM_TRIP_C].Stamp = 0xFFFFFFFFu;
//TripInit[EM_TRIP_C].MaxValue = 99999;
//TripInit[EM_TRIP_C].IsRestart = 1u;
//
//TripInit[EM_TRIP_D].Stamp = 0xFFFFFFFFu;
//TripInit[EM_TRIP_D].MaxValue = 99999;
//TripInit[EM_TRIP_D].IsRestart = 1u;
Data_Trip_KL30_Init(DataTripBuf, TripInit, EM_TRIP_MAX, Func.EEPromWrite_Cbk);
//Data_User_EEPROM_Read(EM_MenuData_Tcs_Val, TempBuf, 1u);
......@@ -261,16 +261,16 @@ uint32_t Data_User_EEPROM_Read(uint16_t u16BlockID, uint32_t u32Data[], uint16_t
while(trip_writeState != WRITE_COMPLETE)
{
//eeprom_comm_DelayUs(5000);
trip_writeState = eeprom_WriteRecord(EEPROM_BLOCK_03, (uint8_t *)u32Data, u16Len * 4);
timeout++;
if(trip_writeState == WRITE_COMPLETE)
{
trip_writeState = eeprom_WriteRecord(EEPROM_BLOCK_03, (uint8_t *)u32Data, u16Len * 4);
timeout++;
if(trip_writeState == WRITE_COMPLETE)
{
break;
}
}
if(timeout >= 3)
{
{
return;
}
}
}
break;
......
......@@ -3,6 +3,7 @@
#include "isr.h"
#include "rte_can.h"
extern void Can_Rx_Cak(CanTxRxMsg *Msg);
CANBuffList_t CanBufList = {0};
CANMSG_Type* CANMSG;
CanTxRxMsg CAN_RecvMsg;
......
......@@ -312,13 +312,13 @@
#define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID
#define SWV 0x124 // 0x100 = 1.00 software version 软件版本号
#define SWV 0x125 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x103 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x124 // 0x100 = 1.00 internal version 内部版本号
#define INTLV 0x125 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x24 // 0x24 = 2024年, program year
#define PROG_M 0x09 // 0x03 = 3月, program month
#define PROG_D 0x21 // 0x19 = 19日, program day
#define PROG_M 0x10 // 0x03 = 3月, program month
#define PROG_D 0x08 // 0x19 = 19日, program day
/******************************************************************************
Bootloader Variable
......
This diff is collapsed.
#new Option
#Wed Aug 21 15:17:41 CST 2024
#Tue Oct 08 13:59:37 CST 2024
IsSort=true
MergeFlashIsCompression=false
ChangeAppFilePath=
......@@ -7,7 +7,7 @@ MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath=
DBFFilePath=
MergeCrcTtpe=21
MergeBootFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\Boot_Release\\TY200.080000b(ty)\\TY_TY200.080000b(ty)_Boot_B1.04_240820.hex
MergeBootFilePath=D\:\\git\\temp\\tianying_ty100\\Firmware\\utility\\Boot_Release\\TY200.080000b(ty)\\TY_TY200.080000b(ty)_Boot_B1.06_240920.hex
IsMergeChangeAddress=false
MergeFlashOutPutFilePath=
GPIOOutPutPath=
......@@ -30,7 +30,7 @@ AppUpdateFilePath=
FUNID=7DF
IsMergeCreateBin=false
IsOverWrite=false
DllFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\\u89E3\u9501\u6587\u4EF6\\TY100 x64.dll
DllFilePath=
MergeAudioOutPutPath=
MergeCanOutPutPath=
ChangeOutPutFilePath=
......@@ -56,8 +56,8 @@ IsHexDisplay=true
MergeLineInXLSPath=
MergeFlashInPutFilePath=
MergeFlashIsInternal=false
MergeOutPutFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\20240821
MergeAppFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\20240821\\TianYing.hex
MergeOutPutFilePath=D\:\\git\\temp\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E
MergeAppFilePath=D\:\\git\\temp\\tianying_ty100\\Firmware\\Project\\Cmsemicon\\BAT32A239\\MDK_ARM\\Objects\\TianYing.hex
MergeTelltalesXLSPath=
FillingByte=-86
ImageVersion=0
......
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