Commit f24d9531 authored by 郑萍's avatar 郑萍

🐞 fix:欠压保护和过压保护显示问题和恢复后自检问题

parent 0f64c82a
......@@ -10,7 +10,7 @@ static uint32_t PowerSocTimeLine;
static COMMON_PowerStatus_t PowerSts; /*1 ON ; 0 OFF*/
static DataValid_t PowerSts_Valid;
uint8_t Power_Stay_Flag = 0;
// static uint16_t u16SelfCheckTime;
/*每次唤醒调用*/
void Common_DataInit(void)
......@@ -82,9 +82,10 @@ void Common_Input_Para(void)
Common_Set_IG_Sts(COMMON_POWER_OFF);
Common_Set_IG_Sts_Valid(COMMON_Valid);
}
if ((Get_CAN_Power_State() == PKEY_ON))
if ((Get_CAN_Power_State() == PKEY_ON) || (Power_Stay_Flag == 1))
{
PowerIgnOnTimeLine = 0ul;
Power_Stay_Flag = 0;
}
}
else
......
......@@ -72,7 +72,7 @@ extern void Common_Set_Disp_V_Speed_Valid(DataValid_t Val);
// extern uint16_t Common_Get_DispSpeed(void);
extern uint32_t Common_GetIgnOnTime(void); /*ms*/
extern uint32_t Common_GetIgnOffTime(void); /*ms*/
extern uint8_t Power_Stay_Flag;
#endif
......@@ -199,6 +199,11 @@ static Power_Status_em Power_Stay_Protect(void)
{
RTE_WDT_Clear();
Gen_TimeDelay(2000u, 50u);
BU98R10_Shutdown( );
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
TimerM_PWM_set_duty(TIMERM_COUNTER0, TIMERM_CHD, 1000);
RTE_GPIO_Set_Level(RTE_GPIO_PORT04_PIN01, RTE_GPIO_LEVEL_LOW); // OUT_EN_1
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
for(LED = 0u; LED < LampCh0_MAX; LED++)
{
LED_Driver_Channel_Set(0u, LED, 0u);
......@@ -236,12 +241,9 @@ static Power_Status_em Power_Stay_Protect(void)
}
BU98R10_Init( );
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
Power_Stay_Flag = 1;
return u8PowerSts;
}
if ( SYS_OPR_STAT_IGN_OFF )
{
break;
}
}
}
......
......@@ -10,8 +10,8 @@
#define u16ENTER_LOW_Y_RANGE 9000U
#define u16EXIT_LOW_Y_RANGE 10000U
#define u16EXIT_HIGH_Y_RANGE 16000U
#define u16ENTER_HIGH_Y_RANGE 16500U
#define u16EXIT_HIGH_Y_RANGE 16500U
#define u16ENTER_HIGH_Y_RANGE 17000U
#define u16EXIT_HIGH_N_RANGE 17500U
#define u16ENTER_HIGH_N_RANGE 18000U
#define u16Top_Vol 0xffffu
......
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