Commit 181083bc authored by 高士达's avatar 高士达

Merge branch 'CJL' into 'dev'

Cjl

See merge request !108
parents 89379eca 2af3f8b4
...@@ -20,7 +20,7 @@ void CAN_TX_Flag_Init(void) ...@@ -20,7 +20,7 @@ void CAN_TX_Flag_Init(void)
void CAN_TX_Count_Init(void) void CAN_TX_Count_Init(void)
{ {
//CAN_TX_Count = 0; //CAN_TX_Count = 0;
CAN_Send_Cound = 0; //CAN_Send_Cound = 0;
if(AliveCount_KL30_ResettingFlag > 0) if(AliveCount_KL30_ResettingFlag > 0)
{ {
AliveCount_KL30_ResettingFlag = 0; AliveCount_KL30_ResettingFlag = 0;
......
...@@ -13,6 +13,7 @@ uint8_t CAN_Send_Cound = 0; ...@@ -13,6 +13,7 @@ uint8_t CAN_Send_Cound = 0;
void Can_Init(void) void Can_Init(void)
{ {
CAN_Send_Cound = 0;
CAN_TX_Count_Init(); CAN_TX_Count_Init();
can_config_st_t Can_Config; can_config_st_t Can_Config;
Can_Config.ch = CAN_CH_0; Can_Config.ch = CAN_CH_0;
...@@ -325,6 +326,7 @@ void Can_BusOff_Recover(uint8_t deltaTime) ...@@ -325,6 +326,7 @@ void Can_BusOff_Recover(uint8_t deltaTime)
{ {
CanRxInitflag = 1; CanRxInitflag = 1;
CAN_TX_Count_Init(); CAN_TX_Count_Init();
CAN_Send_Cound = 0;
if (RSCAN0Busoff.Status == RSCAN0_BUS_STABLE) if (RSCAN0Busoff.Status == RSCAN0_BUS_STABLE)
{ {
RSCAN0Busoff.Status = RSCAN0_BUS_OFF_LV1; RSCAN0Busoff.Status = RSCAN0_BUS_OFF_LV1;
...@@ -347,6 +349,7 @@ void Can_BusOff_Recover(uint8_t deltaTime) ...@@ -347,6 +349,7 @@ void Can_BusOff_Recover(uint8_t deltaTime)
} }
//需调用CAN中止函数,中止所有硬件buf内要发送的数据 //需调用CAN中止函数,中止所有硬件buf内要发送的数据
CAN_TX_Count_Init(); CAN_TX_Count_Init();
CAN_Send_Cound = 0;
Can_QuickTimer_Init(); Can_QuickTimer_Init();
reset_busoff(CAN_CH_0); reset_busoff(CAN_CH_0);
} }
...@@ -360,6 +363,7 @@ void Can_BusOff_Recover(uint8_t deltaTime) ...@@ -360,6 +363,7 @@ void Can_BusOff_Recover(uint8_t deltaTime)
RSCAN0Busoff.Timer = 0U; RSCAN0Busoff.Timer = 0U;
//需调用CAN中止函数,中止所有硬件buf内要发送的数据 //需调用CAN中止函数,中止所有硬件buf内要发送的数据
CAN_TX_Count_Init(); CAN_TX_Count_Init();
CAN_Send_Cound = 0;
Can_QuickTimer_Init(); Can_QuickTimer_Init();
reset_busoff(CAN_CH_0); reset_busoff(CAN_CH_0);
} }
......
...@@ -108,6 +108,7 @@ static void Power_KL30_Init(void) ...@@ -108,6 +108,7 @@ static void Power_KL30_Init(void)
extern uint32_t PowerIgnOffTimeLine; extern uint32_t PowerIgnOffTimeLine;
static void Power_Wakeup_Init(void) static void Power_Wakeup_Init(void)
{ {
CAN_Send_Cound = 0;
PowerIgnOffTimeLine = 0; PowerIgnOffTimeLine = 0;
//RTE_CLOCK_Select_Start(); //RTE_CLOCK_Select_Start();
Gpio_Init(Gpio_WakeUp_Init); Gpio_Init(Gpio_WakeUp_Init);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "isr.h" #include "isr.h"
#include "rte_can.h" #include "rte_can.h"
extern void Can_Rx_Cak(CanTxRxMsg *Msg);
CANBuffList_t CanBufList = {0}; CANBuffList_t CanBufList = {0};
CANMSG_Type* CANMSG; CANMSG_Type* CANMSG;
CanTxRxMsg CAN_RecvMsg; CanTxRxMsg CAN_RecvMsg;
......
...@@ -45,4 +45,5 @@ extern uint8_t rte_can_deinit(CAN_CH ch); ...@@ -45,4 +45,5 @@ extern uint8_t rte_can_deinit(CAN_CH ch);
extern uint8_t get_can_busoff(CAN_CH ch); extern uint8_t get_can_busoff(CAN_CH ch);
extern uint8_t reset_busoff(CAN_CH ch); extern uint8_t reset_busoff(CAN_CH ch);
extern uint8_t Read_RingBuff(CanTxRxMsg *data); extern uint8_t Read_RingBuff(CanTxRxMsg *data);
extern void Can_Rx_Cak(CanTxRxMsg *Msg);
#endif /* RTE_CAN_H_ */ #endif /* RTE_CAN_H_ */
This source diff could not be displayed because it is too large. You can view the blob instead.
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