Commit e9f41b5d authored by 郑萍's avatar 郑萍

🐞 fix:修改can休眠唤醒条件和时间

parent 427770e1
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</OCR_RVCT3> </OCR_RVCT3>
<OCR_RVCT4> <OCR_RVCT4>
<Type>1</Type> <Type>1</Type>
<StartAddress>0x8000</StartAddress> <StartAddress>0x0</StartAddress>
<Size>0x40000</Size> <Size>0x40000</Size>
</OCR_RVCT4> </OCR_RVCT4>
<OCR_RVCT5> <OCR_RVCT5>
......
...@@ -99,7 +99,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -99,7 +99,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
200ul, 2000ul,
0x125ul, 0x125ul,
((void *)0), ((void *)0),
(System_Indicator_ON_callback), (System_Indicator_ON_callback),
...@@ -218,6 +218,7 @@ void Set_CAN_ALL_Signal(void) ...@@ -218,6 +218,7 @@ void Set_CAN_ALL_Signal(void)
else else
{ {
MMCU_SeatDetectState = Get_CAN_CH0_ID_125_Sig_MMCU_SeatDetectState(); // 掉线需要做处理 MMCU_SeatDetectState = Get_CAN_CH0_ID_125_Sig_MMCU_SeatDetectState(); // 掉线需要做处理
MMCU_PowerMode = Get_CAN_CH0_ID_125_Sig_MMCU_PowerMode();
} }
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg)) == CAN_ERR_OK) if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg)) == CAN_ERR_OK)
{ {
......
...@@ -69,7 +69,7 @@ static void Power_KL30_Init(void) ...@@ -69,7 +69,7 @@ static void Power_KL30_Init(void)
g_stRTCInformation.u8RTCMonth = 1; g_stRTCInformation.u8RTCMonth = 1;
g_stRTCInformation.u8RTCYear = 20; g_stRTCInformation.u8RTCYear = 20;
RTE_RTC_Init(g_stRTCInformation); RTE_RTC_Init(g_stRTCInformation);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_Rising); RTE_DEEPSLEEP_GPIO_Interrupt_Enable(CAN_MCU_RXD,Trigger_Rising);
} }
extern uint32_t PowerIgnOffTimeLine; extern uint32_t PowerIgnOffTimeLine;
...@@ -91,7 +91,7 @@ static void Power_Wakeup_Init(void) ...@@ -91,7 +91,7 @@ static void Power_Wakeup_Init(void)
TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHD, ActiveLevel_High); TimerM_PWM_CH_Output_init(TIMERM_COUNTER0, TIMERM_CHD, ActiveLevel_High);
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();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_Rising); RTE_DEEPSLEEP_GPIO_Interrupt_Enable(CAN_MCU_RXD,Trigger_Rising);
} }
static void Power_LVP_Init(void) static void Power_LVP_Init(void)
...@@ -252,7 +252,7 @@ static Power_Status_em Power_Stay_Sleep(void) ...@@ -252,7 +252,7 @@ static Power_Status_em Power_Stay_Sleep(void)
while (1) while (1)
{ {
RTE_WDT_Clear(); RTE_WDT_Clear();
if (RTE_GPIO_Get_Level(KL15_AD_IN))/* KL15 */ if (RTE_GPIO_Get_Level(CAN_MCU_RXD))/* KL15 */
{ {
u8PowerSts = EM_IGN_Wakeup; u8PowerSts = EM_IGN_Wakeup;
break; break;
......
...@@ -105,18 +105,13 @@ monitorlib_uint8_t Sys_Read_KL15_Valid(void) ...@@ -105,18 +105,13 @@ monitorlib_uint8_t Sys_Read_KL15_Valid(void)
monitorlib_uint8_t System_LINE_KL15(void) monitorlib_uint8_t System_LINE_KL15(void)
{ {
static monitorlib_uint8_t u8KL15 = 0; static monitorlib_uint8_t u8KL15 = 0;
if (Get_CAN_CH0_ID_125_Sig_MMCU_PowerMode() != 0x0 )
if (Sys_Read_KL15_Voltage() >= 5500u )
{ {
u8KL15 = 1u; u8KL15 = 1u;
} }
else if((Sys_Read_KL15_Voltage() >= 5000u)&&(Sys_Read_KL15_Voltage() < 5500u)) else
{
;
}
else
{ {
u8KL15 = 0; u8KL15 = 0u;
} }
return u8KL15; return u8KL15;
} }
......
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