Commit 1cc2bf0b authored by 张金硕's avatar 张金硕

Merge branch 'jinshuo' into 'dev'

Jinshuo

See merge request !94
parents bbf1d175 1aa1c506
......@@ -738,6 +738,16 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\BlueTooth.h</FilePath>
</File>
<File>
<FileName>Hysteresis.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\Hysteresis.h</FilePath>
</File>
<File>
<FileName>Hysteresis_V10_239.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Application\Hysteresis_V10_239.lib</FilePath>
</File>
</Files>
</Group>
<Group>
......@@ -978,16 +988,6 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\PicBin.h</FilePath>
</File>
<File>
<FileName>kei_S1.0.6_20240827.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\kei_S1.0.6_20240827.lib</FilePath>
</File>
<File>
<FileName>UartProtocol.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\UartProtocol.h</FilePath>
</File>
<File>
<FileName>AMT630H_Datas.c</FileName>
<FileType>1</FileType>
......@@ -1018,6 +1018,16 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath>
</File>
<File>
<FileName>keil_S1.0.8_20240924.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\keil_S1.0.8_20240924.lib</FilePath>
</File>
<File>
<FileName>UartProtocol.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\UartProtocol.h</FilePath>
</File>
</Files>
</Group>
<Group>
......
......@@ -11,8 +11,9 @@ uint16_t LastPhoneBookTotalCount = 0;
_PICID_Struct PicObj;
_QRCODE_RECT QRCode_Rect;
const uint8_t HJBlueToothName[9]= {"HJ750"};
uint8_t UUIDConfigBuf[22] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00};
//"600032023120100000995"
uint8_t UUIDConfigBuf[21] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
//007502024092400000002
//0x30,0x30,0x37,0x35,0x30,0x32,0x30,0x32,0x34,0x30,0x39,0x32,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31
uint8_t SetBluetoothCloseCount = 0;
uint8_t OSVersionASCLLList[20] =
{
......@@ -97,7 +98,11 @@ void BlueToothService(void)
}
}
SetUUIDData((char *)UUIDConfigBuf, 22);
for (uint8_t i = 0; i < 21; i++)
{
UUIDConfigBuf[i] = Diag_Write_Data.DID_5000[i];
}
SetUUIDData((char *)UUIDConfigBuf, 21);
if (OTA_Update_Flag == 1)
{
QRCode_Rect.x = 650;
......@@ -135,7 +140,7 @@ void BlueToothService(void)
}
OTA_Update_Count_Open=0;
}
SetTaskbarHeight(150);
SetTaskbarHeight(130);
SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
TextService();
}
......@@ -157,7 +162,7 @@ TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
{TEXT_NUM_PHONE_NUMBER_TOTAL, 0x4011, 0},
{TEXT_NUM_INFORMATION_MCUVER, 0x4012, 0},
{TEXT_NUM_INFORMATION_SWVERSION, 0x4013, 0},
{TEXT_NUM_INFORMATION_HW, 0x4014, 0}, //23F 23E
{TEXT_NUM_INFORMATION_UUID, 0x4014, 0},
{TEXT_NUM_INFORMATION_OS, 0x4015, 0},
{TEXT_NUM_INFORMATION_MCU, 0x4016, 0},
{TEXT_NUM_FAUULT_CODE, 0x4022, 0},
......@@ -174,6 +179,8 @@ uint8_t PhoneNumberTotal[20];
uint8_t InformationOSVersion[20];
uint8_t InformationMCUVersion[26];
uint8_t TextFaultCodeNum[10];
uint8_t UUIDDisplay[42];
uint8_t LastUUIDDisplay[21];
void TextService(void)
{
......@@ -217,6 +224,8 @@ void TextService(void)
memset(LastBlueToothName, 0, sizeof(LastBlueToothName));
memset(PhoneNumberTotal, 0, sizeof(PhoneNumberTotal));
memset(TextFaultCodeNum, 0, sizeof(TextFaultCodeNum));
memset(LastUUIDDisplay, 0, sizeof(LastUUIDDisplay));
memset(UUIDDisplay, 0, sizeof(UUIDDisplay));
for (uint8_t i = 0; i < sizeof(OSVersionASCLLList); i++)
{
......@@ -342,7 +351,16 @@ void TextService(void)
}
TextPara[TEXT_NUM_FAUULT_CODE].Vaild = 0x01;
}
if (((memcmp(LastUUIDDisplay, UUIDConfigBuf, sizeof(LastUUIDDisplay))) != 0))
{
for (uint8_t i = 0; i < (sizeof(UUIDConfigBuf)); i++)
{
UUIDDisplay[i * 2] = UUIDConfigBuf[i];
UUIDDisplay[(i * 2) + 1] = 0x00;
}
memcpy(LastUUIDDisplay, UUIDConfigBuf, sizeof(LastUUIDDisplay));
TextPara[TEXT_NUM_INFORMATION_UUID].Vaild = 0X01;
}
}
......@@ -10,7 +10,7 @@ typedef enum {
TEXT_NUM_PHONE_NUMBER_TOTAL,
TEXT_NUM_INFORMATION_MCUVER,
TEXT_NUM_INFORMATION_SWVERSION,
TEXT_NUM_INFORMATION_HW,
TEXT_NUM_INFORMATION_UUID,
TEXT_NUM_INFORMATION_OS,
TEXT_NUM_INFORMATION_MCU,
TEXT_NUM_FAUULT_CODE,
......@@ -48,6 +48,7 @@ extern uint8_t PhoneNumberTotal[20];
extern uint8_t InformationOSVersion[20];
extern uint8_t InformationMCUVersion[26];
extern uint8_t TextFaultCodeNum[10];
extern uint8_t UUIDDisplay[42];
extern TEXT_STRUCT TextPara[];
#endif
\ No newline at end of file
......@@ -188,7 +188,7 @@ void COM_CAN_Init(void)
// CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
}
uint8_t u8BusoffRecoverFlag = 0U;
/**
* @brief Buff恢复函数
* @param deltaTime 调用时间 单位ms 10MS调用
......@@ -197,6 +197,7 @@ void Can_BusOff_Recover(uint8_t deltaTime)
{
if (get_can_busoff(CAN_CH_0) == 2)
{
u8BusoffRecoverFlag = 1U;
if (RSCAN0Busoff.Status == RSCAN0_BUS_STABLE)
{
RSCAN0Busoff.Status = RSCAN0_BUS_OFF_LV1;
......@@ -236,6 +237,11 @@ void Can_BusOff_Recover(uint8_t deltaTime)
}
else /* 总线正常,没有Bus-off发生*/
{
if(u8BusoffRecoverFlag == 1U)//从bussoff恢复后,只调用一次Can_RX_Apply_Buff
{
u8BusoffRecoverFlag = 0U;
Can_RX_Apply_Buff();
}
}
}
......
This diff is collapsed.
#ifndef DATA_COOLANT_H
#define DATA_COOLANT_H
#include "stdint.h"
typedef enum{
CoolantSensorNormal = 0,
CoolantSensorShortCircuit,
CoolantSensorOpenCircuit,
}CoolantSensorSts_t;
extern void Coolant_KL15_Init(void);
extern void Coolant_KL30_Init(void);
extern void Coolant_Cal_Sevice(uint8_t deltaTime);
extern uint8_t Get_CurCoolantSetp(void);
extern CoolantSensorSts_t Get_Coolant_Sensor_State(void);
void Coolant_R_Cal(uint8_t deltaTime);
#include "Components.h"
#define Coolant_LEN 17
typedef unsigned int INT16U;
/*** 控制结构 ***/
typedef struct
{
uint8_t u8_DestSeg;
uint8_t u8_CurSeg;
}DataCoolantTempDisStruct;
extern DataCoolantTempDisStruct DataCoolantTemp_Dis;
typedef struct
{
uint16_t Temp_Value;
uint8_t Symbol;
uint16_t u16Can_Actual;
uint8_t u8Can_Valid;
uint16_t u16Res_Actual;
uint16_t u16Res_ADValue;
uint8_t u8Res_Valid;
uint8_t u8Res_ADValid;
uint8_t u8Res_Flashtimer ;
uint8_t TEMPSetp;
uint8_t TEMPMode;
uint16_t TEMP_Fastime ;
uint8_t u8_ResStatus //
}DataCoolantTempStruct; //水温数据结构
typedef struct
{
uint32_t Buffer[5];
uint8_t Cnt;
uint8_t time;
uint16_t ResOpen_ActTimer;
uint16_t ResOpen_InActTimer;
}DataCoolantTempSamplerStruct;
void Common_SelfCheckTime_Init(void);
void Common_SelfCheckTime(void);
void Data_Coolant_Temp_Processing_Service(void);
uint16_t Get_Coolant_Res_To_Temp(uint16_t Temp_Res);
void Get_Coolant_Temp_Seg(uint16_t Temp_Value);
void Data_Coolant_Temp_Display ( void );
extern uint16_t GET_DataCollantTempSegValid(void);
extern uint16_t GET_DataCollantTempSegStatus(void);
extern void TEMP_KL30_Init ( void );
extern void TEMP_KL15_Init ( void );
extern uint8_t GET_DataCoolantTempSegDisp(void);
void TEMP_Gauges_Cal(void);
uint16_t Get_Res_To_Temp(uint16_t *ResBoard, uint16_t *TempBoard, uint8_t Len, uint16_t input);
extern DataCoolantTempStruct DataCoolantTemp ;
#endif
......@@ -25,7 +25,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN02, GpioOut_Low); //TXD-ESP-IN-MCU
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN03, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN04, RTE_GPIO_DIR_IN); //SCL-IIC---
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN05, GpioOut_High); //SDA-IIC---
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN05, GpioOut_Low); //SDA-IIC---
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN06, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT01_PIN07, RTE_GPIO_DIR_IN);
......@@ -53,8 +53,8 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN05, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT06_PIN00, GpioOut_Low); //存储SCL
RTE_GPIO_Config(RTE_GPIO_PORT06_PIN01, GpioOut_Low); //存储SDA
RTE_GPIO_Config(RTE_GPIO_PORT06_PIN00, RTE_GPIO_DIR_IN); //存储SCL
RTE_GPIO_Config(RTE_GPIO_PORT06_PIN01, RTE_GPIO_DIR_IN); //存储SDA
RTE_GPIO_Config(RTE_GPIO_PORT06_PIN02, GpioOut_Low); //SCL_MCU
RTE_GPIO_Config(RTE_GPIO_PORT06_PIN03, GpioOut_Low); //SDA_MCU
......
#ifndef HYSTERESIS_H__
#define HYSTERESIS_H__
// #define HYS_PLATFORM_16BIT
#ifdef HYS_PLATFORM_16BIT
typedef unsigned char Hys_uint8_t;
typedef unsigned int Hys_uint16_t;
typedef unsigned long Hys_uint32_t;
#else
typedef unsigned char Hys_uint8_t;
typedef unsigned short Hys_uint16_t;
typedef unsigned int Hys_uint32_t;
typedef unsigned long long Hys_uint64_t;
#endif
/*所有需要处理的物理量枚举*/
typedef enum
{
HYS_TEMP = 0U, /*水温*/
HYS_PWM, /*..*/
HYS_NUM_MAX,
} HYS_Num_en_t;
/***************************Do not modify the following*********************************/
/***************************Do not modify the following*********************************/
/***************************Do not modify the following*********************************/
/*当前文件版本号*/
#define HYS_VERSION_NUM 0X10U
#define HYS_RAM_DATA_LEN (HYS_NUM_MAX * 2U)
/*操作函数返回状态*/
typedef enum
{
HYS_OPERATE_SUCCESS = 0UL, /*函数操作成功*/
HYS_OPERATE_FAIL, /*函数操作失败*/
} HYS_Operate_Type_en_t;
typedef struct
{
/*该段的下限值*/
Hys_uint16_t u16HYSSegLow;
/*该段的上限值*/
Hys_uint16_t u16HYSSegHigh;
} HYS_Seg_Table_st_t;
typedef struct
{
/*参数分段属性表*/
const HYS_Seg_Table_st_t *pstHYSSegTable;
/*默认填0U即可*/
Hys_uint16_t u16HYSReserved;
/*分段属性表长度*/
Hys_uint8_t u8HYSSegTableLen;
/*1U:正序 0U:降序*/
Hys_uint8_t u8HYSSortBy;
} HYS_Attribute_st_t;
typedef struct
{
/*物理量数量,也就是 HYS_NUM_MAX */
Hys_uint8_t u8HYSNum;
} HYS_Init_st_t;
/************************************************************************/
/*30初始化,所有状态重新开始计算*/
void HYS_KL30_Init(Hys_uint8_t *pu8HYSRamData, const HYS_Attribute_st_t *pstHYSAttribute, HYS_Init_st_t *pstHYSInit);
/*唤醒初始化,会保持休眠唤醒前的状态*/
void HYS_Wakeup_Init(Hys_uint8_t *pu8HYSRamData, const HYS_Attribute_st_t *pstHYSAttribute, HYS_Init_st_t *pstHYSInit);
/*输入对应索引的物理量参数*/
HYS_Operate_Type_en_t HYS_Physical_Quantity_Input(HYS_Num_en_t enHYSIndex, Hys_uint16_t u16HYSPhysValue);
/*获取分段结果,返回0xFF表示无效*/
Hys_uint8_t HYS_Get_Seg(HYS_Num_en_t enHYSIndex);
/*复位某个物理量,重新判断计算*/
HYS_Operate_Type_en_t HYS_Reset_Physical_Quantity(HYS_Num_en_t enHYSIndex);
/*读取版本号*/
Hys_uint8_t HYS_Version_Read(void);
#endif
\ No newline at end of file
......@@ -254,12 +254,12 @@ void AMT630H_RstCtrl(void)
RTE_GPIO_Set_Level(VCC1V2_AMT_EN, 1);
Delay_Time_Ctrl(15);
RTE_GPIO_Set_Level(VCC_33_EN_MCU, 1);
Delay_Time_Ctrl(30);
RTE_GPIO_Set_Level(x1530_EN_MCU, 1);//1530
Delay_Time_Ctrl(10);
Delay_Time_Ctrl(45);
RTE_GPIO_Set_Level(MCU_RSTB_LCD, 1);
Delay_Time_Ctrl(15);
RTE_GPIO_Set_Level(STBYB_LCD_MCU, 1);
Delay_Time_Ctrl(10);
RTE_GPIO_Set_Level(x1530_EN_MCU, 1);//1530
}
void Amt630hInit(void)
......
......@@ -119,7 +119,7 @@ static const uint16_t PicIndexData[] = {
Pic_0898, 14, 637, 293, Pic_0897, 15, 637, 292, Pic_0919, 11, 640, 293, Pic_0920, 12, 639, 293, Pic_0921, 14, 638, 293, Pic_0922, 14, 638, 292, Pic_0923, 14, 638, 293, Pic_0924, 15, 637, 293, Pic_0925, 221, 501, 160, Pic_0926, 50, 619, 240,
Pic_0926, 50, 619, 175, Pic_0927, 50, 619, 240, Pic_0927, 50, 619, 175, Pic_0928, 75, 894, 310, Pic_0929, 75, 894, 310, Pic_0930, 64, 612, 240, Pic_0930, 64, 612, 175, Pic_0931, 64, 612, 240, Pic_0931, 64, 612, 175, Pic_0932, 777, 124, 85,
Pic_0933, 317, 101, 210, Pic_0934, 209, 102, 260, Pic_0935, 461, 36, 367, Pic_0936, 350, 92, 367, Pic_0937, 323, 564, 521, Pic_0938, 41, 62, 399, Pic_0939, 41, 62, 401, Pic_0940, 155, 53, 498, Pic_0941, 1521, 0, 470, Pic_0942, 46, 634, 551,
Pic_0943, 28, 751, 555,
Pic_0943, 28, 751, 555, Pic_0944, 124, 53, 462, Pic_0945, 1024, 0, 0, Pic_0946, 52, 632, 551, Pic_0947, 12, 709, 533, Pic_0948, 12, 967, 533, Pic_0949, 133, 786, 561, Pic_0950, 228, 485, 251, Pic_0951, 78, 761, 50,
};
#define PicIndexData_LEN 14888
//uint32_t PicIndexDataLEN = 0;
......
#ifndef PICBIN_H
#define PICBIN_H
/* Flash Bin Version:20240924 2024-09-24 11:37:38 Compression ratio:70.00% */
/* Flash Bin Version:20241010 2024-10-10 11:52:18 Compression ratio:70.00% */
#define Pic_0001 1
#define Pic_0002 2
#define Pic_0003 3
......@@ -945,6 +945,14 @@
#define Pic_0941 941
#define Pic_0942 942
#define Pic_0943 943
#define Pic_0944 944
#define Pic_0945 945
#define Pic_0946 946
#define Pic_0947 947
#define Pic_0948 948
#define Pic_0949 949
#define Pic_0950 950
#define Pic_0951 951
enum {
Pic_0001_0_0 = 0,
......@@ -2133,10 +2141,18 @@ enum {
Pic_0941_0_470,
Pic_0942_634_551,
Pic_0943_751_555,
Pic_0944_53_462,
Pic_0945_0_0,
Pic_0946_632_551,
Pic_0947_709_533,
Pic_0948_967_533,
Pic_0949_786_561,
Pic_0950_485_251,
Pic_0951_761_50,
};
#define PIC_INDEX_DATA_CRC 0x8509F1BE
#define PIC_INDEX_DATA_CRC 0x982ED1B9
extern void User_PicIndexDataInit(void);
#endif
......@@ -458,7 +458,7 @@ typedef struct
uint8_t BlueToothPhoneName[100];
char PhoneNumber[20];
uint16_t PhoneBookTotalCount;
char BlueToothName[20];
char BlueToothName[30];
}_BlueToothPhoneData;
typedef struct
......@@ -517,9 +517,9 @@ extern uint8_t GetPhoneMirrorst(void) ;
extern void PackedTransfer_EasyNavigation(uint8_t data);
extern void GerProgramVer(uint8_t * bufdata);
extern uint8_t GetErrorInfo();
extern uint8_t GetBACKUUIDSTATE();
extern uint8_t GetBlueToothPowerSTATE();
extern uint8_t GetErrorInfo(void);
extern uint8_t GetBACKUUIDSTATE(void);
extern uint8_t GetBlueToothPowerSTATE(void);
extern void SetBluetoothTurnXX(uint8_t data);
extern void SetScreenType(uint8_t ntype,_QRCODE_RECT rect_st);
......
......@@ -28,6 +28,7 @@
#include "Data_VSpeed.h"
#include "Data_Coolant.h"
#include "Data_Fuel.h"
#include "Hysteresis.h"
#include "Mileage\Services_Mileage_User.h"
#include "BackLight.h"
#include "RTC\RTE_RTC.h"
......@@ -37,6 +38,7 @@
#include "Telltales\Telltales_Lib.h"
#include "Application\BlueTooth.h"
#include "cgc.h"
#include "UDS\UDS_ISO14229_Services.h"
#endif
......@@ -352,7 +352,7 @@ void TYW_RESET_ODO(void)
{
if(ClearODO_Flag < 1)
{
if((Get_DispVechileSpeed() >= 1500)&&(Get_DispEngineSpeed() >= 12000))
if((Get_DispVechileSpeed() >= 1990)&&(Get_DispEngineSpeed() >= 12000))
{
ClearODO_Flag = 1;
Data_Mileage_Clear();
......
......@@ -7,12 +7,12 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Turn_Left, },/*P10*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Turn_Right, },/*P9*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 60U, 20U, Get_LINE_IN_High_Beam, },/*P18*/
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Efi_Fault, },/*P15*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_ABS, },/*P7*/
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Auto_Start_Stop, },/*P12*/
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Oil_Pressure_Alert, },/*P21*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Coolant_Temperature }, /*P11*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 40U, 20U, Get_LINE_IN_High_Beam, },/*P18*/
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 125U, 20U, Get_LINE_IN_Efi_Fault, },/*P15*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 125U, 0U, Get_LINE_IN_ABS, },/*P7*/
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 125U, 20U, Get_LINE_IN_Auto_Start_Stop, },/*P12*/
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 2000U, 20U, Get_LINE_IN_Oil_Pressure_Alert, },/*P21*/
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 125U, 20U, Get_LINE_IN_Coolant_Temperature }, /*P11*/
};
Linelib_uint8_t Get_LINE_IN_Turn_Left(void)
{
......
......@@ -72,6 +72,7 @@ static void Power_KL30_Init(void)
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
FaultCode_Init();
TEMP_KL30_Init();
}
static void Power_Wakeup_Init(void)
......@@ -106,6 +107,7 @@ static void Power_Wakeup_Init(void)
Protocol_KL30_Wakeup_Init();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
FaultCode_Init();
TEMP_KL30_Init();
}
static void Power_LVP_Init(void)
......@@ -129,8 +131,10 @@ static void Power_IG_ON_Init(void)
Line_In_KL15_ON_Init();
Telltales_KL15_Init();
Fuel_KL15_Init();
TEMP_KL15_Init();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init();
mwAmt630hUartSendDatainit();
AMT630H_Animation_IGON();
// Amt630hInit();
AMT630H_GUI_SELFCHECK_STS_INIT();
......@@ -184,7 +188,7 @@ static Power_Status_em Power_Stay_OFF(void)
}
else
{
if ((Common_GetIgnOffTime() < 3000))
if ((Common_GetIgnOffTime() < 5000))
{
u8PowerSts = EM_IGN_OFF;
}
......
......@@ -34,7 +34,7 @@ static void can_recv_handler(void)
CAN_Receive_IT(CAN0, &CanBufList);
Read_RingBuff(&CAN_RecvMsg);
CAN_Receive(CAN0,&CAN_RecvMsg,100);
// CAN_Receive(CAN0,&CAN_RecvMsg,100);
if (can_rx_handler != NULL)
{
can_rx_handler(&CAN_RecvMsg);
......@@ -107,7 +107,7 @@ uint8_t rte_can_init(can_config_st_t *config)
// ISR_Register(CAN0TRX_IRQn, can_tx_handler);
ISR_Register(CAN0ERR_IRQn, can_error_handler);
// ISR_Register(CAN0ERR_IRQn, can_error_handler);/*进入bussoff后,不使用驱动给的错误中断*/
// ISR_DisRegister(CAN0REC_IRQn, can_recv_handler);
......
......@@ -321,6 +321,15 @@ void mwAmt630hUartSendIsr(void)
mwAmt630hSerialSendValid = 0;
}
}
void mwAmt630hUartSendDatainit(void)
{
memset(mwAmt630hSerialSendBuffer,00,sizeof(mwAmt630hSerialSendBuffer));
mwAmt630hSerialDataIndex = 0;
mwAmt630hSerialSendCnts = 0;
mwAmt630hSerialSendFillCnts = 0;
mwAmt630hSerialSendValid = 0;
}
/*
Data:要发送数据的指针,
请确认是全局变量的指针,且指向的数据在发送完成之前不会被改变。
......
......@@ -59,5 +59,6 @@ extern uint32_t RTE_UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st
extern void RTE_UART_Sleep_Init(UART_Channel_en_t enUARTCh);
extern void mwAmt630hUartSendData(uint8_t *data, uint32_t length);
extern void mwAmt630hUartSendIsr(void);
extern void mwAmt630hUartSendDatainit(void);
#endif
......@@ -20,7 +20,7 @@ void Sys_2ms_Tasks(void)
Sys_Status_Update_Service();
Analog_Signal_Conv_Service();
AMT630H_Main();
Check_MCU_Info_in_630H();
// Check_MCU_Info_in_630H();
DoCAN_Timer_Update(2000u);
//Can_Write_Fun(&CAN_CH0_CanMsgTxOp, 2000u);无外发
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp, 2u);
......@@ -33,6 +33,7 @@ void Sys_5ms_Tasks(void)
void Sys_10ms_Tasks(void)
{
Can_BusOff_Recover(10);
FaultCode_Service(10u);
Line_In_Debounce_Service(10u);
My_Key_Service();
......@@ -40,7 +41,6 @@ void Sys_10ms_Tasks(void)
Key_Clear_Time();
Key_TimeOut_Service();
Fuel_R_Cal(10u);
Coolant_R_Cal(10u);
Data_Light_Res_service(10);
BackLight_Process();
}
......@@ -49,6 +49,7 @@ void Sys_20ms_Tasks(void)
{
Data_Vehicle_Speed_Processing_Service();
Data_Engine_Speed_Processing_Service();
Data_Coolant_Temp_Processing_Service();
}
void Sys_50ms_Tasks(void)
......@@ -82,7 +83,6 @@ void Sys_100ms_Tasks(void)
S3_ServerCNTT();
Get_DisTime_Service();
Fuel_Cal_Sevice(100u);
Coolant_Cal_Sevice(100u);
Services_Mileage_Callback();
// Data_Mileage_Clear();
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
......
......@@ -348,6 +348,7 @@ typedef struct
// uint8_t fill_data[17]; /* 用于保证该结构体长度是4的倍数 */
} Diag_Write_Data_t;
extern Diag_Write_Data_t Diag_Write_Data;
extern void UDS_Service_10_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A_Data);
extern void UDS_Service_11_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A_Data);
......
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