Browse Source

【3.0.0.35-New】
Merge branch 'V3-7250-QTF' into V3-V30XX-6060

CHENJIE-PC\QiXiang_CHENJIE 3 years ago
parent
commit
66fafdfdb9
3 changed files with 16 additions and 10 deletions
  1. 1 1
      src/EmbeddedCoder_src/BCU.c
  2. 14 8
      src/EmbeddedCoder_src/SFM.c
  3. 1 1
      src/bsp_custom.c

+ 1 - 1
src/EmbeddedCoder_src/BCU.c

@@ -110,7 +110,7 @@ void BCU(void)
                     ihd_st_chrgMosControl = ChargeForbiddenControl == 0;
                     ihd_st_disChrgMosControl = DisChargeForbiddenControl == 0;
                     ihd_st_relayControl = RelayForbiddenControl == 0;
-                    ihd_flg_DTCClear = ihd_flg_disChrgMosClosFlt;
+                    //ihd_flg_DTCClear = ihd_flg_disChrgMosClosFlt;
 
                     //调用算法
                     SFM();

+ 14 - 8
src/EmbeddedCoder_src/SFM.c

@@ -138,6 +138,7 @@ void SFM(void)
     static boolean_T sfmd_flg_Tup;
     static boolean_T sfmd_flg_modTOpenFlt_keep;
     static uint16_T CntB;
+	static boolean_T ihd_flg_urtRecFlt_Delay = false;
 
     int32_T SumR;
 	int32_T SumRR;
@@ -153,9 +154,15 @@ void SFM(void)
     uint16_T j;
     uint16_T k;
 
+    if (ihd_flg_urtRecFlt_Delay)
+    {
+        FirstRun_SFM = true;
+    }
+	ihd_flg_urtRecFlt_Delay = ihd_flg_urtRecFlt;
     //初值
     if (FirstRun_SFM)
     {
+        
         memset(&DiagThr, 0, sizeof(DiagThr));
         memset(&DiagTime, 0, sizeof(DiagTime));
         Cntl = 10;
@@ -211,7 +218,6 @@ void SFM(void)
         sfmd_flg_Tup = false;
         sfmd_flg_modTOpenFlt_keep = false;
         CntB = 0;
-        ;
 
         ihd_T_mosT_Delay = ihd_T_mosT;
         ihd_T_DCPlugT_Delay = ihd_T_DCPlugT;
@@ -244,7 +250,6 @@ void SFM(void)
     if (ihd_flg_urtRecFlt)
     {
         sfmd_flg_interComFlt = true;
-        FirstRun_SFM = true;
     }
     else
     {
@@ -457,9 +462,9 @@ void SFM(void)
     {
         modTArr[i] = ihv_T_modT[i];
     }
-    for (i = 0; i < cmnc_num_modTNum; i++)
+    for (i = 0; i < cmnc_num_modTNum ; i++)
     {
-        if (!sfmv_flg_modTOpenFlt[i] && ((int16_T)(modTArr[i] - ihv_T_modT[i]) > 10 || (int16_T)(modTArr[i] - ihv_T_modT[i]) < -20)&& !sfmd_flg_interComFlt)
+        if (!sfmv_flg_modTOpenFlt[i] && ((int16_T)(modTArr[i] - ihv_T_modT[i]) > 10 || (int16_T)(modTArr[i] - ihv_T_modT[i]) < -20) &&  !sfmd_flg_interComFlt)
         {
             modTRationNr[i] = (modTRationNr[i] + 1) > 200 ? 200 : (modTRationNr[i] + 1);
         }
@@ -480,6 +485,7 @@ void SFM(void)
         sfmd_flg_modTRationFlt = sfmd_flg_modTRationFlt || sfmv_flg_modTRationFlt[i];
     }
 
+	//printf("%d,%d,%d,%d\n",ihd_T_mosT_Delay,ihd_T_mosT,FirstRun_SFM,ihd_flg_urtRecFlt);
     //62 充电Mos 温度合理性故障
     sfmd_flg_chrgMosTRationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_chrgMosTOpenFlt && ((int16_T)(ihd_T_mosT - ihd_T_mosT_Delay) < -10 ||(int16_T)(ihd_T_mosT - ihd_T_mosT_Delay) > 20);
     if (!sfmd_flg_chrgMosTRationFltOnce)
@@ -1711,14 +1717,14 @@ void SFM(void)
         sfmd_st_fltAct = sfmd_st_fltAct | FltActArr[i];
     }
 
-     
-   /*  for(i=0;i < 20;i++)
+    /* 
+     for(i=0;i < 20;i++)
      {
          printf("%d  ",sfmv_idx_fltCode[i]);
      }
      printf("\n");
-    
-*/
+    */
+
     ///=====================================================================
     //======================================================================
 

+ 1 - 1
src/bsp_custom.c

@@ -226,7 +226,7 @@ void BSP_CustomInit(void)
     NVIC_EnableIRQ(PadWakeup2_IRQn);  //lock
     NVIC_DisableIRQ(PadWakeup3_IRQn); //gsensor
     NVIC_DisableIRQ(PadWakeup4_IRQn); //gsensor
-    NVIC_DisableIRQ(PadWakeup5_IRQn); //wakeup2
+    NVIC_EnableIRQ(PadWakeup5_IRQn);  //wakeup2
     CheckLockOutState();
     slpManStartWaitATTimer();