Commit b12c3272 authored by 张明扬's avatar 张明扬 🇨🇳
parents 66769c81 795efd1c
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</OCR_RVCT3> </OCR_RVCT3>
<OCR_RVCT4> <OCR_RVCT4>
<Type>1</Type> <Type>1</Type>
<StartAddress>0x0</StartAddress> <StartAddress>0x8000</StartAddress>
<Size>0x40000</Size> <Size>0x40000</Size>
</OCR_RVCT4> </OCR_RVCT4>
<OCR_RVCT5> <OCR_RVCT5>
...@@ -823,11 +823,6 @@ ...@@ -823,11 +823,6 @@
<FileType>4</FileType> <FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\Eeprom\eepromManage_20240305.lib</FilePath> <FilePath>..\..\..\..\Source\Component\Eeprom\eepromManage_20240305.lib</FilePath>
</File> </File>
<File>
<FileName>CAN_Signal.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\CAN_Signal\CAN_Signal.lib</FilePath>
</File>
<File> <File>
<FileName>Telltales_user.c</FileName> <FileName>Telltales_user.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
...@@ -878,6 +873,11 @@ ...@@ -878,6 +873,11 @@
<FileType>5</FileType> <FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\Service_Interval\Service_Interval_User.h</FilePath> <FilePath>..\..\..\..\Source\Component\Service_Interval\Service_Interval_User.h</FilePath>
</File> </File>
<File>
<FileName>CAN_Signal.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\CAN_Signal\CAN_Signal.lib</FilePath>
</File>
</Files> </Files>
</Group> </Group>
<Group> <Group>
......
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 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_TYPE=BAT32G139GK64FB
SET CPU_VENDOR=Cmsemicon SET CPU_VENDOR=Cmsemicon
SET UV2_TARGET=TianYing200 SET UV2_TARGET=TianYing200
......
#include "BlueTooth.h" #include "BlueTooth.h"
#include "UDS_ISO14229_Services.h" #include "UDS_ISO14229_Services.h"
BlueTooth_t BlueTooth; BlueTooth_t BlueTooth;
uint8_t UUIDData[32] = {"tywtywtywtywtywtywtywtywtywtyw03"}; uint8_t UUIDData[32] = {"000000000000000000000"};
extern Ser2EDFlashData Ser2EDataForDFlash; extern Ser2EDFlashData Ser2EDataForDFlash;
void BlueTooth_KL30_KL15_Wakeup_Init(void) void BlueTooth_KL30_KL15_Wakeup_Init(void)
{ {
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#define UART_RX_MAX_DEPTH (2 * 1024UL) // 4K #define UART_RX_MAX_DEPTH (2 * 1024UL) // 4K
#define UART_DATA_BUF_LEN (2 * 1024UL) // 4K #define UART_DATA_BUF_LEN (2 * 1024UL) // 4K
uint32_t u32ActiveCount = 0;
uint32_t u32ActiveReset = 0;
typedef struct __attribute__((aligned(4))) typedef struct __attribute__((aligned(4)))
{ {
Protocol_uint32_t read_pos; Protocol_uint32_t read_pos;
...@@ -170,6 +172,8 @@ static Protocol_uint32_t Protocol_UartSend(const Protocol_uint8_t *pData, Protoc ...@@ -170,6 +172,8 @@ static Protocol_uint32_t Protocol_UartSend(const Protocol_uint8_t *pData, Protoc
static void Protocol_UartHandle(const Protocol_Data_t *pData) static void Protocol_UartHandle(const Protocol_Data_t *pData)
{ {
uint8_t ID04[1] = {0}; uint8_t ID04[1] = {0};
u32ActiveCount = 0;
if ( pData->CmdID == ESP32_MCU_0x10 ) if ( pData->CmdID == ESP32_MCU_0x10 )
{ {
BlueTooth.BlueTooth_St = pData->Data[0]; BlueTooth.BlueTooth_St = pData->Data[0];
...@@ -227,6 +231,37 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData) ...@@ -227,6 +231,37 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)
//非本协议数据,不处理 //非本协议数据,不处理
} }
} }
void Protocol_ESP32_Active_Service(void)
{
if (RTE_GPIO_Get_Level(L_BD433Ctrl_OUT) == 1)
{
if (u32ActiveCount >= 200)
{
u32ActiveReset = 0;
RTE_GPIO_Set_Level(L_BD433Ctrl_OUT, RTE_GPIO_LEVEL_LOW);
}
else
{
u32ActiveCount++;
}
}
else
{
if(u32ActiveReset <= 2)
{
u32ActiveReset++;
}
else
{
u32ActiveReset = 0;
u32ActiveCount = 0;
RTE_GPIO_Set_Level(L_BD433Ctrl_OUT, RTE_GPIO_LEVEL_HIGH);
}
}
}
void UART_Put(Protocol_uint16_t Data) void UART_Put(Protocol_uint16_t Data)
{ {
......
...@@ -9,5 +9,6 @@ ...@@ -9,5 +9,6 @@
void Protocol_KL30_Wakeup_Init(void); void Protocol_KL30_Wakeup_Init(void);
void Protocol_Send_Service(void); // 10ms任务调用 void Protocol_Send_Service(void); // 10ms任务调用
void UART_Put(Protocol_uint16_t Data); void UART_Put(Protocol_uint16_t Data);
void Protocol_ESP32_Active_Service(void);
#endif #endif
...@@ -236,11 +236,39 @@ void COM_CAN_Init(void) ...@@ -236,11 +236,39 @@ void COM_CAN_Init(void)
Can_RX_BuffInit(&CAN_CH0_CanMsgOp, CAN_CH0_CAN_MSG_CONST_ARRAY, CAN_CH0_ID_TOTAL_MAX); Can_RX_BuffInit(&CAN_CH0_CanMsgOp, CAN_CH0_CAN_MSG_CONST_ARRAY, CAN_CH0_ID_TOTAL_MAX);
CAN_RX_SetEnable(&CAN_CH0_CanMsgOp, CAN_N_RX_Enable); CAN_RX_SetEnable(&CAN_CH0_CanMsgOp, CAN_N_RX_Enable);
}
void CAN_TX_Init(void)
{
memset(pTXBuff, 0, sizeof(pTXBuff)); memset(pTXBuff, 0, sizeof(pTXBuff));
CAN_CH0_CanMsgTxOp.CanMsg = (st_CAN_SendOperation *)pTXBuff; CAN_CH0_CanMsgTxOp.CanMsg = (st_CAN_SendOperation *)pTXBuff;
Can_TX_BuffInit(&CAN_CH0_CanMsgTxOp, CAN_CH0_CANSendAttr, CAN_CH0_ID_SEND_TOTAL, COM_APP_Process); Can_TX_BuffInit(&CAN_CH0_CanMsgTxOp, CAN_CH0_CANSendAttr, CAN_CH0_ID_SEND_TOTAL, COM_APP_Process);
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable); CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
} }
void Can_QuickTimer_Init(void) void Can_QuickTimer_Init(void)
{ {
uint32_t i = 0u; uint32_t i = 0u;
......
...@@ -31,7 +31,7 @@ typedef struct ...@@ -31,7 +31,7 @@ typedef struct
} RSCAN0BusoffMonitorStruct; } RSCAN0BusoffMonitorStruct;
extern void CAN_TX_Init(void);
extern void Can_Tx_Apply_Buff(void); extern void Can_Tx_Apply_Buff(void);
extern void Can_RX_Apply_Buff(void); extern void Can_RX_Apply_Buff(void);
extern void Can_BusOff_Recover(uint8_t deltaTime); extern void Can_BusOff_Recover(uint8_t deltaTime);
......
...@@ -287,6 +287,8 @@ void Data_Coolant_Temp_Display ( void ) ...@@ -287,6 +287,8 @@ void Data_Coolant_Temp_Display ( void )
DataCoolantTemp_Dis.u8_CurSeg = 0; DataCoolantTemp_Dis.u8_CurSeg = 0;
DataCoolantTemp_Dis.u8_DestSeg = 0 ; DataCoolantTemp_Dis.u8_DestSeg = 0 ;
DataCoolantTemp_Dis.u8_Flg = 0; DataCoolantTemp_Dis.u8_Flg = 0;
u32ColCurNum = DataCoolantTemp.Value * 100 ;
DataCoolantTemp_Dis.u8_Holdtimer = CoolantFlashtimer;
} }
else else
{ {
...@@ -303,6 +305,8 @@ void Data_Coolant_Temp_Display ( void ) ...@@ -303,6 +305,8 @@ void Data_Coolant_Temp_Display ( void )
DataCoolantTemp_Dis.u8_CurSeg = DataCoolantTemp_Dis.u8_DestSeg; DataCoolantTemp_Dis.u8_CurSeg = DataCoolantTemp_Dis.u8_DestSeg;
DataCoolantTemp_Dis.u8_UpFlashtimer = DataCoolantTemp_Dis.u8_Uptimer; DataCoolantTemp_Dis.u8_UpFlashtimer = DataCoolantTemp_Dis.u8_Uptimer;
DataCoolantTemp_Dis.u8_DownFlashtimer = DataCoolantTemp_Dis.u8_Downtimer; DataCoolantTemp_Dis.u8_DownFlashtimer = DataCoolantTemp_Dis.u8_Downtimer;
u32ColCurNum = DataCoolantTemp.Value * 100;
DataCoolantTemp_Dis.u8_Holdtimer = CoolantFlashtimer;
} }
else else
{ {
...@@ -311,7 +315,8 @@ void Data_Coolant_Temp_Display ( void ) ...@@ -311,7 +315,8 @@ void Data_Coolant_Temp_Display ( void )
} }
} }
if (Common_GetIgnOnTime() >= 3030)
{
if(DataCoolantTemp_Dis.u8_CurSeg > DataCoolantTemp_Dis.u8_DestSeg ) if(DataCoolantTemp_Dis.u8_CurSeg > DataCoolantTemp_Dis.u8_DestSeg )
{ {
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 0, (DataCoolantTemp_Dis.u8_Downtimer - DataCoolantTemp_Dis.u8_DownFlashtimer), u32ColCurNum, DataCoolantTemp.Value*100); u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 0, (DataCoolantTemp_Dis.u8_Downtimer - DataCoolantTemp_Dis.u8_DownFlashtimer), u32ColCurNum, DataCoolantTemp.Value*100);
...@@ -347,8 +352,19 @@ void Data_Coolant_Temp_Display ( void ) ...@@ -347,8 +352,19 @@ void Data_Coolant_Temp_Display ( void )
} }
/*目标格和当前格一致时,数显如何处理*/ /*目标格和当前格一致时,数显如何处理*/
/*5S后更新为目标数值*/ /*5S后更新为目标数值*/
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 2, (CoolantFlashtimer-DataCoolantTemp_Dis.u8_Holdtimer ), u32ColCurNum, DataCoolantTemp.Value*100); u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 2, (CoolantFlashtimer-DataCoolantTemp_Dis.u8_Holdtimer ), u32ColCurNum, DataCoolantTemp.Value*100);
} }
}
else
{
u32ColCurNum = DataCoolantTemp.Value * 100;
}
// warning // warning
...@@ -368,7 +384,10 @@ void Data_Coolant_Temp_Display ( void ) ...@@ -368,7 +384,10 @@ void Data_Coolant_Temp_Display ( void )
} }
else else
{ {
; if(DataCoolantTemp_Dis.u8_Warnflg == 1)
{
DataCoolantTemp_Dis.u8_Warnflg = 0;
}
} }
} }
} }
......
...@@ -357,7 +357,7 @@ void Data_TPMS_Processing_Service ( void ) ...@@ -357,7 +357,7 @@ void Data_TPMS_Processing_Service ( void )
Front_TPMS = Get_CAN_CH0_ID_341_Sig_Front_Pressure(); Front_TPMS = Get_CAN_CH0_ID_341_Sig_Front_Pressure();
Rear_TPMS = Get_CAN_CH0_ID_341_Sig_Rear_Pressure(); Rear_TPMS = Get_CAN_CH0_ID_341_Sig_Rear_Pressure();
if ( Common_Get_IG_Sts() == COMMON_POWER_ON ) if ( 1 )
{ {
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) == CAN_SIG_LOST) if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) == CAN_SIG_LOST)
{ {
......
...@@ -104,7 +104,7 @@ void Gauge_Service(void) ...@@ -104,7 +104,7 @@ void Gauge_Service(void)
{ {
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON ) if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{ {
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
//for(i = 0; i < BU98R10_DDRAM_SIZE; i ++) //for(i = 0; i < BU98R10_DDRAM_SIZE; i ++)
//{ //{
......
...@@ -4574,6 +4574,8 @@ void Checkself_SEG_Display(void) ...@@ -4574,6 +4574,8 @@ void Checkself_SEG_Display(void)
// BU98R10Chip1DDRAM.Byte[i] = 1; // BU98R10Chip1DDRAM.Byte[i] = 1;
// } // }
#if (1) #if (1)
if (Common_GetIgnOnTime() >= 30)
{
if (Checkself_SEG_step_count < 60) if (Checkself_SEG_step_count < 60)
{ {
Checkself_SEG_step_count++; Checkself_SEG_step_count++;
...@@ -4598,6 +4600,8 @@ void Checkself_SEG_Display(void) ...@@ -4598,6 +4600,8 @@ void Checkself_SEG_Display(void)
Checkself_SEG_step--; Checkself_SEG_step--;
} }
} }
}
Mileage = ((Checkself_SEG_step / 3) * 111100); Mileage = ((Checkself_SEG_step / 3) * 111100);
Fuel = Checkself_SEG_step / 5u; Fuel = Checkself_SEG_step / 5u;
collant = 100 + ((Checkself_SEG_step / 3) * 11); collant = 100 + ((Checkself_SEG_step / 3) * 11);
......
#include "Components.h" #include "Components.h"
#include "BAT32A239.h"
#include <string.h>
#include <stdio.h>
#define BU98R10_CHIP0_SD RTE_GPIO_PORT00_PIN02 #define BU98R10_CHIP0_SD RTE_GPIO_PORT00_PIN02
#define BU98R10_CHIP0_CSB RTE_GPIO_PORT00_PIN03 #define BU98R10_CHIP0_CSB RTE_GPIO_PORT00_PIN03
...@@ -25,12 +29,16 @@ void BU98R10_CHIP0_SET_SD_LEVEL(uint8_t Level) ...@@ -25,12 +29,16 @@ void BU98R10_CHIP0_SET_SD_LEVEL(uint8_t Level)
if (Level) if (Level)
{ {
//RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH);
PORT->P0 |= (1<<2);
PORT->PM0 &= ~(1<<2);
} }
else else
{ {
//RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_LOW);
PORT->P0 &= ~(1<<2);//P02
PORT->PM0 &= ~(1<<2);
} }
} }
void BU98R10_CHIP1_SET_SD_LEVEL(uint8_t Level); void BU98R10_CHIP1_SET_SD_LEVEL(uint8_t Level);
...@@ -39,12 +47,16 @@ void BU98R10_CHIP1_SET_SD_LEVEL(uint8_t Level) ...@@ -39,12 +47,16 @@ void BU98R10_CHIP1_SET_SD_LEVEL(uint8_t Level)
if (Level) if (Level)
{ {
//RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH);
PORT->P7 |= (1<<2);
PORT->PM7 &= ~(1<<2);
} }
else else
{ {
//RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_LOW);
PORT->P7 &= ~(1<<2);//P72
PORT->PM7 &= ~(1<<2);
} }
} }
void BU98R10_CHIP0_SET_CSB_LEVEL(uint8_t Level); void BU98R10_CHIP0_SET_CSB_LEVEL(uint8_t Level);
...@@ -53,12 +65,16 @@ void BU98R10_CHIP0_SET_CSB_LEVEL(uint8_t Level) ...@@ -53,12 +65,16 @@ void BU98R10_CHIP0_SET_CSB_LEVEL(uint8_t Level)
if (Level) if (Level)
{ {
// RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); // RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_HIGH);
PORT->P0 |= (1<<3);
PORT->PM0 &= ~(1<<3);
} }
else else
{ {
// RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW); // RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_LOW);
PORT->P0 &= ~(1<<3);//P03
PORT->PM0 &= ~(1<<3);
} }
} }
void BU98R10_CHIP1_SET_CSB_LEVEL(uint8_t Level); void BU98R10_CHIP1_SET_CSB_LEVEL(uint8_t Level);
...@@ -67,12 +83,16 @@ void BU98R10_CHIP1_SET_CSB_LEVEL(uint8_t Level) ...@@ -67,12 +83,16 @@ void BU98R10_CHIP1_SET_CSB_LEVEL(uint8_t Level)
if (Level) if (Level)
{ {
// RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); // RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_HIGH);
PORT->P7 |= (1<<1);
PORT->PM7 &= ~(1<<1);
} }
else else
{ {
//RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_LOW);
PORT->P7 &= ~(1<<1);//P71
PORT->PM7 &= ~(1<<1);
} }
} }
void BU98R10_CHIP0_SET_SCL_LEVEL(uint8_t Level); void BU98R10_CHIP0_SET_SCL_LEVEL(uint8_t Level);
...@@ -81,12 +101,16 @@ void BU98R10_CHIP0_SET_SCL_LEVEL(uint8_t Level) ...@@ -81,12 +101,16 @@ void BU98R10_CHIP0_SET_SCL_LEVEL(uint8_t Level)
if (Level) if (Level)
{ {
//RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_HIGH);
PORT->P0 |= (1<<4);
PORT->PM0 &= ~(1<<4);
} }
else else
{ {
//RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_LOW);
PORT->P0 &= ~(1<<4);//P04
PORT->PM0 &= ~(1<<4);
} }
} }
void BU98R10_CHIP1_SET_SCL_LEVEL(uint8_t Level); void BU98R10_CHIP1_SET_SCL_LEVEL(uint8_t Level);
...@@ -95,12 +119,16 @@ void BU98R10_CHIP1_SET_SCL_LEVEL(uint8_t Level) ...@@ -95,12 +119,16 @@ void BU98R10_CHIP1_SET_SCL_LEVEL(uint8_t Level)
if (Level) if (Level)
{ {
//RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_HIGH);
PORT->P7 |= (1<<0);
PORT->PM7 &= ~(1<<0);
} }
else else
{ {
//RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_LOW); //RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_LOW);
PORT->P7 &= ~(1<<0);//P70
PORT->PM7 &= ~(1<<0);
} }
} }
void BU98R10_CHIP0_SET_SD_DIR(uint8_t Dir); void BU98R10_CHIP0_SET_SD_DIR(uint8_t Dir);
...@@ -108,12 +136,15 @@ void BU98R10_CHIP0_SET_SD_DIR(uint8_t Dir) ...@@ -108,12 +136,15 @@ void BU98R10_CHIP0_SET_SD_DIR(uint8_t Dir)
{ {
if (Dir) if (Dir)
{ {
RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH);
PORT->P0 |= (1<<2);
PORT->PM0 &= ~(1<<2);
// RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); // RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
} }
else else
{ {
RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_IN); //RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_IN);
PORT->PM0 |= (1<<2);
} }
} }
void BU98R10_CHIP1_SET_SD_DIR(uint8_t Dir); void BU98R10_CHIP1_SET_SD_DIR(uint8_t Dir);
...@@ -122,11 +153,14 @@ void BU98R10_CHIP1_SET_SD_DIR(uint8_t Dir) ...@@ -122,11 +153,14 @@ void BU98R10_CHIP1_SET_SD_DIR(uint8_t Dir)
if (Dir) if (Dir)
{ {
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH); //RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
PORT->P7 |= (1<<2);
PORT->PM7 &= ~(1<<2);
} }
else else
{ {
RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_IN); //RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_IN);
PORT->PM7 |= (1<<2);
} }
} }
......
...@@ -52,6 +52,20 @@ static void Power_KL30_Init(void) ...@@ -52,6 +52,20 @@ static void Power_KL30_Init(void)
Data_TPMS_KL30_Init (); Data_TPMS_KL30_Init ();
CAN_TX_Count_Init(); CAN_TX_Count_Init();
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp,2u);
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp,2u);
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp,2u);
Data_TPMS_Processing_Service();
CAN_TX_Init();
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable); CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
...@@ -97,7 +111,7 @@ static void Power_KL30_Init(void) ...@@ -97,7 +111,7 @@ static void Power_KL30_Init(void)
RTE_RTC_Init(RTCInformation); RTE_RTC_Init(RTCInformation);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising); RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
FaultCode_Init(); FaultCode_Init();
// Data_TPMS_Processing_Service();
} }
...@@ -109,7 +123,7 @@ static void Power_Wakeup_Init(void) ...@@ -109,7 +123,7 @@ static void Power_Wakeup_Init(void)
Simulated_IIC_2_Init(); Simulated_IIC_2_Init();
Gpio_Init(Gpio_WakeUp_Init); Gpio_Init(Gpio_WakeUp_Init);
Can_Init(); Can_Init();
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
DFlash_init(); DFlash_init();
Data_Read_DiagPara(); Data_Read_DiagPara();
eeprom_StoreInfo_Init(); eeprom_StoreInfo_Init();
...@@ -117,6 +131,20 @@ static void Power_Wakeup_Init(void) ...@@ -117,6 +131,20 @@ static void Power_Wakeup_Init(void)
Data_User_Mileage_WakeupInit(); Data_User_Mileage_WakeupInit();
BU98R10_Init(); BU98R10_Init();
Sys_WakeUp_Init(); Sys_WakeUp_Init();
Data_TPMS_KL15_WAKE_UP_Init();
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp,2u);
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp,2u);
CanMSg_XMS_Analysis(&CAN_CH0_CanMsgOp,2u);
Data_TPMS_Processing_Service();
CAN_TX_Init();
CAN_TX_Count_Init();
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
Data_Vehicle_Speed_KL30_Init(); Data_Vehicle_Speed_KL30_Init();
Data_Vehicle_Speed_Wakeup_Init(); Data_Vehicle_Speed_Wakeup_Init();
Data_Engine_Speed_KL30_Wakeup_Init(); Data_Engine_Speed_KL30_Wakeup_Init();
...@@ -142,11 +170,11 @@ static void Power_Wakeup_Init(void) ...@@ -142,11 +170,11 @@ static void Power_Wakeup_Init(void)
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High); TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
Telltales_Init(); Telltales_Init();
Telltales_UserInit(); Telltales_UserInit();
Data_TPMS_KL15_WAKE_UP_Init();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising); RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
FaultCode_Init(); FaultCode_Init();
Service_Interval_User_WakeupInit(); Service_Interval_User_WakeupInit();
CAN_TX_Count_Init();
} }
static void Power_LVP_Init(void) static void Power_LVP_Init(void)
...@@ -162,7 +190,7 @@ static void Power_IG_OFF_Init(void) ...@@ -162,7 +190,7 @@ static void Power_IG_OFF_Init(void)
{ {
Line_In_KL15_OFF_Init(); Line_In_KL15_OFF_Init();
Checkself_Init(); Checkself_Init();
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable); //CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
} }
static void Power_IG_ON_Init(void) static void Power_IG_ON_Init(void)
......
...@@ -114,7 +114,11 @@ void Sys_100ms_Tasks(void) ...@@ -114,7 +114,11 @@ void Sys_100ms_Tasks(void)
} }
Clear_Navigation_St(); Clear_Navigation_St();
Protocol_ESP32_Active_Service();
if(Common_GetIgnOffTime() >= 1000)
{
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
}
//R_test = ADC_Read_Signal(ADC_CH_FUEL1); //R_test = ADC_Read_Signal(ADC_CH_FUEL1);
} }
......
...@@ -311,13 +311,13 @@ ...@@ -311,13 +311,13 @@
#define CheckSumErr 7 // Checksum Error #define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID #define UnknownPartID 8 // Unknown Part ID
#define SWV 0x115 // 0x100 = 1.00 software version 软件版本号 #define SWV 0x118 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x103 // 0x100 = 1.00 hardware version 硬件版本号 #define HWV 0x103 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号 #define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x115 // 0x100 = 1.00 internal version 内部版本号 #define INTLV 0x118 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x24 // 0x24 = 2024年, program year #define PROG_Y 0x24 // 0x24 = 2024年, program year
#define PROG_M 0x08 // 0x03 = 3月, program month #define PROG_M 0x08 // 0x03 = 3月, program month
#define PROG_D 0x17 // 0x19 = 19日, program day #define PROG_D 0x19 // 0x19 = 19日, program day
/****************************************************************************** /******************************************************************************
Bootloader Variable Bootloader Variable
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#new Option #new Option
#Sat Aug 03 16:25:18 CST 2024 #Mon Aug 19 18:11:24 CST 2024
IsSort=true IsSort=true
MergeFlashIsCompression=false MergeFlashIsCompression=false
ChangeAppFilePath= ChangeAppFilePath=
...@@ -7,13 +7,13 @@ MergeCanXLSPath= ...@@ -7,13 +7,13 @@ MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath= RH850_D1M1AGPIOJSONpath=
DBFFilePath= DBFFilePath=
MergeCrcTtpe=21 MergeCrcTtpe=21
MergeBootFilePath=D\:\\git\\tianying_ty100\\Firmware\\utility\\Boot_Release\\TY200.080000b(ty)\\TY_TY200.080000b(ty)_Boot_B1.02_240719.hex MergeBootFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\Boot_Release\\TY200.080000b(ty)\\TY_TY200.080000b(ty)_Boot_B1.03_240814.hex
IsMergeChangeAddress=false IsMergeChangeAddress=false
MergeFlashOutPutFilePath= MergeFlashOutPutFilePath=
GPIOOutPutPath= GPIOOutPutPath=
MergeCanDBCPath= MergeCanDBCPath=
IsFilling=true IsFilling=true
RxID=7E8 RxID=794
MergeAudioInPutPath= MergeAudioInPutPath=
MergeAudioIndex=3 MergeAudioIndex=3
IsFastSend=true IsFastSend=true
...@@ -24,13 +24,13 @@ SoftwareVersion=0 ...@@ -24,13 +24,13 @@ SoftwareVersion=0
MsgSTmin=0 MsgSTmin=0
MergeLineInOutPutPath= MergeLineInOutPutPath=
Leave2ID=9 Leave2ID=9
PHYID=7E0 PHYID=714
BaudRate=500K BaudRate=500K
AppUpdateFilePath= AppUpdateFilePath=
FUNID=7DF FUNID=7DF
IsMergeCreateBin=false IsMergeCreateBin=false
IsOverWrite=false IsOverWrite=false
DllFilePath=D\:\\git\\tianying_ty100\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\\u89E3\u9501\u6587\u4EF6\\TY100 x64.dll DllFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\\u89E3\u9501\u6587\u4EF6\\TY100 x64.dll
MergeAudioOutPutPath= MergeAudioOutPutPath=
MergeCanOutPutPath= MergeCanOutPutPath=
ChangeOutPutFilePath= ChangeOutPutFilePath=
...@@ -39,7 +39,7 @@ TTFExtractTXTpath= ...@@ -39,7 +39,7 @@ TTFExtractTXTpath=
JieFaRH850GPIOJSONpath= JieFaRH850GPIOJSONpath=
MergeFlashIsMandatory=false MergeFlashIsMandatory=false
UpdateProcess=\u6BD4\u4E9A\u8FEA UpdateProcess=\u6BD4\u4E9A\u8FEA
Driver=PCAN Driver=Kvaser
MergeFlashImageFormat= MergeFlashImageFormat=
RH850_F1KMGPIOJSONpath= RH850_F1KMGPIOJSONpath=
DriverFilePath= DriverFilePath=
...@@ -56,8 +56,8 @@ IsHexDisplay=true ...@@ -56,8 +56,8 @@ IsHexDisplay=true
MergeLineInXLSPath= MergeLineInXLSPath=
MergeFlashInPutFilePath= MergeFlashInPutFilePath=
MergeFlashIsInternal=false MergeFlashIsInternal=false
MergeOutPutFilePath=D\:\\git\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\20240803 MergeOutPutFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\20240819
MergeAppFilePath=D\:\\git\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\20240803\\TianYing.hex MergeAppFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\20240819\\TianYing.hex
MergeTelltalesXLSPath= MergeTelltalesXLSPath=
FillingByte=-86 FillingByte=-86
ImageVersion=0 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