|
@@ -26,6 +26,11 @@ extern HAL_StatusTypeDef EEPROM_M24C08_Zerowrite(uint8_t devid,uint16_t Address)
|
26
|
26
|
extern uint8_t Chksum_Create(uint8_t *data);
|
27
|
27
|
extern uint16_t CRC16_Generate(uint8_t* buf_ptr, int len);
|
28
|
28
|
extern uint8_t MBIC_APIFLASH_Func(uint8_t* data,uint32_t size);
|
|
29
|
+extern void MBIC_Bootloader_FirmwareUpdate(uint8_t* data);
|
|
30
|
+extern uint8_t* MBIC_HeaderMergeFunction(uint8_t* data,uint16_t Length );
|
|
31
|
+extern void PE43711_atten_ctrl2(PE43711_st* ATT ,uint8_t data);
|
|
32
|
+extern void PE43711_UL4_atten_ctrl(uint8_t data);
|
|
33
|
+
|
29
|
34
|
|
30
|
35
|
/***************************************************************************************/
|
31
|
36
|
/* Extern Valuable */
|
|
@@ -958,7 +963,7 @@ void CompareAttenData(BLUESTATUS_st Curr,BLUESTATUS_st Prev){
|
958
|
963
|
MBIC_Val,// Hidden Atten Low bit
|
959
|
964
|
MBIC_UserVal,
|
960
|
965
|
MBIC_ALC_Val);// User Atten Low Bit
|
961
|
|
- printf("%d val = %x \r\n",__LINE__,val);
|
|
966
|
+// printf("%d val = %x \r\n",__LINE__,val);
|
962
|
967
|
PE43711_UL4_atten_ctrl(val);
|
963
|
968
|
}
|
964
|
969
|
// memcpy(&bluecell_Prevdatastatus.ATT_DL1_H,&bluecell_Currdatastatus.ATT_DL1_H,32);
|
|
@@ -1763,7 +1768,7 @@ void Bluecell_TableSave(uint8_t* data,uint8_t type){
|
1763
|
1768
|
break;
|
1764
|
1769
|
case ULO_P4_ATT_Temp_guarantee_Table_Number:printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
1765
|
1770
|
Bluecell_DataCopy(&Temp_UL4.Table_1_Temp,&data[BLUECELL_DATA + 1],sizeof(TEMP_TABLE_st));
|
1766
|
|
- EEPROM_M24C08_write(EEPROM_M24C08_ID ,(EEPROM_TEMP_UL3_TABLE_ADDRESDS),&Temp_UL4.Table_1_Temp,sizeof(TEMP_TABLE_st));
|
|
1771
|
+ EEPROM_M24C08_write((uint8_t)EEPROM_M24C08_ID ,(EEPROM_TEMP_UL3_TABLE_ADDRESDS),&Temp_UL4.Table_1_Temp,sizeof(TEMP_TABLE_st));
|
1767
|
1772
|
EEPROM_M24C08_Read(EEPROM_M24C08_ID ,(EEPROM_TEMP_UL3_TABLE_ADDRESDS),&Temp_UL4.Table_1_Temp,sizeof(TEMP_TABLE_st));
|
1768
|
1773
|
break;
|
1769
|
1774
|
}
|
|
@@ -2624,18 +2629,19 @@ bool Bluecell_Operate(uint8_t* data){
|
2624
|
2629
|
}
|
2625
|
2630
|
bluecell_Currdatastatus.ATT_UL4_PATH = data[BLUECELL_DATA];
|
2626
|
2631
|
#else
|
2627
|
|
- bluecell_Currdatastatus.ATT_DL4_PATH = data[BLUECELL_DATA];
|
2628
|
|
- bluecell_Currdatastatus.DLI_Shutdown_Retry_Count4 = 0;
|
2629
|
|
- bluecell_Prevdatastatus.DLI_Shutdown_Retry_Count4 = 0xFF;
|
|
2632
|
+ bluecell_Currdatastatus.ATT_UL4_PATH = data[BLUECELL_DATA];
|
|
2633
|
+ printf("PATH : %d \r\n",bluecell_Currdatastatus.ATT_UL4_PATH);
|
|
2634
|
+ bluecell_Currdatastatus.ULO_Shutdown_Retry_Count4 = 0;
|
|
2635
|
+ bluecell_Prevdatastatus.ULO_Shutdown_Retry_Count4 = 0xFF;
|
2630
|
2636
|
if(data[BLUECELL_DATA]==0){
|
2631
|
|
- HAL_GPIO_WritePin(PATH_EN_DL4_GPIO_Port,PATH_EN_DL4_Pin,GPIO_PIN_RESET);//CLOCK
|
2632
|
|
- DL_PathUserHandl[3] = true;
|
|
2637
|
+ HAL_GPIO_WritePin(PATH_EN_UL4_GPIO_Port,PATH_EN_UL4_Pin,GPIO_PIN_RESET);//CLOCK
|
|
2638
|
+ UL_PathUserHandl[3] = true;
|
2633
|
2639
|
}
|
2634
|
2640
|
else{
|
2635
|
|
- bluecell_Prevdatastatus.ATT_DL4_H = 0xFF;
|
2636
|
|
- bluecell_Prevdatastatus.ATT_DL4_L =0xFF;
|
2637
|
|
- DL_PathUserHandl[3] = false;
|
2638
|
|
- HAL_GPIO_WritePin(PATH_EN_DL4_GPIO_Port,PATH_EN_DL4_Pin,GPIO_PIN_SET);//CLOCK
|
|
2641
|
+ bluecell_Prevdatastatus.ATT_UL4_H = 0xFF;
|
|
2642
|
+ bluecell_Prevdatastatus.ATT_UL4_L =0xFF;
|
|
2643
|
+ UL_PathUserHandl[3] = false;
|
|
2644
|
+ HAL_GPIO_WritePin(PATH_EN_UL4_GPIO_Port,PATH_EN_UL4_Pin,GPIO_PIN_SET);//CLOCK
|
2639
|
2645
|
}
|
2640
|
2646
|
CompareAttenData(bluecell_Currdatastatus,bluecell_Prevdatastatus);
|
2641
|
2647
|
|
|
@@ -2729,6 +2735,35 @@ bool Bluecell_Operate(uint8_t* data){
|
2729
|
2735
|
tempdata += bluecell_Currdatastatus.DLI_Shutdown_Threshold_L ;
|
2730
|
2736
|
tempdata /= 10;
|
2731
|
2737
|
printf("DL Shutdown Threas : %d \r\n",tempdata);
|
|
2738
|
+#if 0 // PYJ.2020.07.01_BEGIN --
|
|
2739
|
+ tempdata = (( bluecell_Currdatastatus.ULO_Shutdown_Threshold_H << 8) & 0xFF00) ;
|
|
2740
|
+ tempdata += bluecell_Currdatastatus.ULO_Shutdown_Threshold_L ;
|
|
2741
|
+ tempdata /= 10;
|
|
2742
|
+ printf("UL Shutdown Threas : %d \r\n",tempdata);
|
|
2743
|
+
|
|
2744
|
+ tempdata = (( bluecell_Currdatastatus.ATT_UL1_H << 8) & 0xFF00) ;
|
|
2745
|
+ tempdata += bluecell_Currdatastatus.ATT_UL1_L;
|
|
2746
|
+ tempdata /= 10;
|
|
2747
|
+ printf("UL1 Shutdown Threas : %d \r\n",tempdata);
|
|
2748
|
+
|
|
2749
|
+ tempdata = (( bluecell_Currdatastatus.ATT_UL2_H << 8) & 0xFF00) ;
|
|
2750
|
+ tempdata += bluecell_Currdatastatus.ATT_UL2_L ;
|
|
2751
|
+ tempdata /= 10;
|
|
2752
|
+ printf("UL2 Shutdown Threas : %d \r\n",tempdata);
|
|
2753
|
+
|
|
2754
|
+ tempdata = (( bluecell_Currdatastatus.ATT_UL3_H << 8) & 0xFF00) ;
|
|
2755
|
+ tempdata += bluecell_Currdatastatus.ATT_UL3_L ;
|
|
2756
|
+ tempdata /= 10;
|
|
2757
|
+ printf("UL3 Shutdown Threas : %d \r\n",tempdata);
|
|
2758
|
+
|
|
2759
|
+ tempdata = (( bluecell_Currdatastatus.ATT_UL4_H << 8) & 0xFF00) ;
|
|
2760
|
+ tempdata += bluecell_Currdatastatus.ATT_UL4_L ;
|
|
2761
|
+ tempdata /= 10;
|
|
2762
|
+ printf("UL4 Shutdown Threas : %d \r\n",tempdata);
|
|
2763
|
+#endif // PYJ.2020.07.01_END --
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
|
2732
|
2767
|
// printf("Temp Alarm %d \r\n");
|
2733
|
2768
|
printf("ALC Alarm 1: %d 2: %d 3: %d 4: %d\r\n",
|
2734
|
2769
|
bluecell_Currdatastatus.ALARM_ULO_ALC_Alarm & ALARM_ALC_P1,
|
|
@@ -4078,7 +4113,25 @@ uint32_t MBIC_DataSend(uint8_t* data){
|
4078
|
4113
|
|
4079
|
4114
|
}
|
4080
|
4115
|
uint8_t TxData[2048] = {0,};
|
|
4116
|
+#define ALAMASK_DEFAULT 1
|
|
4117
|
+#define Temp_THREADHOLD_DEFAULT 80
|
|
4118
|
+#define CARRIER_DEFAULT 1
|
|
4119
|
+#define DLI_PATH_DEFAULT
|
|
4120
|
+#define DLI_GAIN_ATT_DEFAULT 0
|
|
4121
|
+
|
|
4122
|
+
|
|
4123
|
+
|
|
4124
|
+void Factory_Set(){
|
|
4125
|
+ bluecell_Currdatastatus.ALARM_MASK1 = ALAMASK_DEFAULT;
|
|
4126
|
+ bluecell_Currdatastatus.ALARM_MASK2 = ALAMASK_DEFAULT;
|
|
4127
|
+ bluecell_Currdatastatus.ALARM_MASK3 = ALAMASK_DEFAULT;
|
|
4128
|
+ bluecell_Currdatastatus.ALARM_MASK4 = ALAMASK_DEFAULT;
|
|
4129
|
+ bluecell_Currdatastatus.ALARM_MASK5 = ALAMASK_DEFAULT;
|
|
4130
|
+ bluecell_Currdatastatus.Temp_High_Threshold = Temp_THREADHOLD_DEFAULT;
|
|
4131
|
+// bluecell_Currdatastatus.Carrier_ON_OFF =
|
|
4132
|
+
|
4081
|
4133
|
|
|
4134
|
+}
|
4082
|
4135
|
bool MBIC_Operate(uint8_t* data){
|
4083
|
4136
|
uint8_t datatype = data[MBIC_PAYLOADSTART + 1];
|
4084
|
4137
|
// uint8_t Length = (data[MBIC_PROT_SUB_DATA_INDEX + 2]);
|
|
@@ -5844,20 +5897,20 @@ typedef enum{
|
5844
|
5897
|
ULO_ALC_L,
|
5845
|
5898
|
};
|
5846
|
5899
|
void ALC_Package_Operate(uint8_t*ULO_ADC_Level,uint8_t* ULO_Level,DET_TABLEUL_st* UL_Table,uint8_t TableIndex,uint8_t* ALC_Atten,uint8_t* UL_Main_Atten,uint8_t* GainOffset ){
|
|
5900
|
+ /*static int16_t PrevLimitdata[ALC_Alarm_UL_Index_MAX] = {0,};
|
|
5901
|
+ static int8_t* ALC_Table;
|
|
5902
|
+ int16_t tmpcalc = 0;
|
|
5903
|
+ static int16_t PrevIwillGiveAtten[ALC_Alarm_UL_Index_MAX] ={0,};*/
|
|
5904
|
+ int16_t Gain_Atten = 0;
|
5847
|
5905
|
double ret = 0;
|
5848
|
5906
|
double CurrentATTENVALUE = 0;
|
5849
|
5907
|
int16_t Limitdata = 0;
|
5850
|
|
- static int16_t PrevLimitdata[ALC_Alarm_UL_Index_MAX] = {0,};
|
5851
|
5908
|
double ResdBm = 0;
|
5852
|
5909
|
int16_t ResultData = 0;
|
5853
|
5910
|
int16_t IwillGiveAtten = 0;
|
5854
|
|
- static int8_t* ALC_Table;
|
5855
|
|
- int16_t tmpcalc = 0;
|
5856
|
5911
|
int16_t UL_Atten = 0;
|
5857
|
5912
|
int16_t Main_Atten = 0;
|
5858
|
|
- int16_t Gain_Atten = 0;
|
5859
|
5913
|
int16_t GiveAttenPlusULAtten = 0;
|
5860
|
|
- static int16_t PrevIwillGiveAtten[ALC_Alarm_UL_Index_MAX] ={0,};
|
5861
|
5914
|
|
5862
|
5915
|
UL_Atten = ALC_Atten[ULO_ALC_H] << 8 | ALC_Atten[ULO_ALC_L];
|
5863
|
5916
|
Main_Atten = UL_Main_Atten[ULO_ALC_H] << 8 | UL_Main_Atten[ULO_ALC_L];
|
|
@@ -5879,9 +5932,9 @@ void ALC_Package_Operate(uint8_t*ULO_ADC_Level,uint8_t* ULO_Level,DET_TABLEUL_st
|
5879
|
5932
|
CurrentATTENVALUE = PE43711_Double(ALC_Atten[ULO_ALC_H],ALC_Atten[ULO_ALC_L]);
|
5880
|
5933
|
ULO_Level[ULO_ALC_H] = (ResultData & 0xFF00) >> 8;
|
5881
|
5934
|
ULO_Level[ULO_ALC_L] = (ResultData & 0x00FF);
|
5882
|
|
- printf("=============ALC ON =====START================\r\n");
|
|
5935
|
+// printf("=============ALC ON =====START================\r\n");
|
5883
|
5936
|
// printf("Current UL ADC VALUE : %f \r\n",ret);
|
5884
|
|
- printf("ResdBm : UL%d : %f \r\n",TableIndex + 1,ResdBm);
|
|
5937
|
+// printf("ResdBm : UL%d : %f \r\n",TableIndex + 1,ResdBm);
|
5885
|
5938
|
// printf("ORIGIN ResdBm : %f %d\r\n",ResdBm,Main_Atten);
|
5886
|
5939
|
// printf("After ResdBm : %f \r\n",ResdBm);
|
5887
|
5940
|
Limitdata += (Main_Atten * 0.1);
|
|
@@ -5951,7 +6004,7 @@ void ALC_Function(){ //DL
|
5951
|
6004
|
// int32_t CurrnALC_MAX_SettingValue = 0;
|
5952
|
6005
|
// int32_t CurrnALC_MIN_SettingValue = 0;
|
5953
|
6006
|
// int32_t ALC_Result = 0;
|
5954
|
|
- int16_t Limitdata = 0;
|
|
6007
|
+/* int16_t Limitdata = 0;
|
5955
|
6008
|
static int16_t PrevLimitdata[ALC_Alarm_UL_Index_MAX] = {0,};
|
5956
|
6009
|
double ResdBm = 0;
|
5957
|
6010
|
int16_t ResultData = 0;
|
|
@@ -5959,11 +6012,11 @@ void ALC_Function(){ //DL
|
5959
|
6012
|
int16_t IwillGiveAtten = 0;
|
5960
|
6013
|
static int8_t* ALC_Table;
|
5961
|
6014
|
int16_t tmpcalc = 0;
|
5962
|
|
- int16_t UL_Atten[ALC_Alarm_UL_Index_MAX] = {0,};
|
5963
|
|
- int16_t Main_Atten[ALC_Alarm_UL_Index_MAX] = {0,};
|
5964
|
|
- static int16_t PrevIwillGiveAtten[ALC_Alarm_UL_Index_MAX] ={0,};
|
|
6015
|
+ static int16_t PrevIwillGiveAtten[ALC_Alarm_UL_Index_MAX] ={0,};*/
|
5965
|
6016
|
// uint8_t tempadc[256];
|
5966
|
6017
|
|
|
6018
|
+ int16_t UL_Atten[ALC_Alarm_UL_Index_MAX] = {0,};
|
|
6019
|
+ int16_t Main_Atten[ALC_Alarm_UL_Index_MAX] = {0,};
|
5967
|
6020
|
|
5968
|
6021
|
// Bluecell_StructCpy(&AutoControl_Save[0],&UL_DET_Table_ref[TABLE_MAX_VALUE],sizeof(ALC_dBm_t));
|
5969
|
6022
|
// Bluecell_StructCpy(&tempadc[0],&Det_UL1.Table_Det_15_dBm_H,sizeof(DET_TABLEUL_st));
|
|
@@ -6677,15 +6730,15 @@ void DL_Det_Function(uint8_t Table_Num,uint8_t* CurrADC_Level,DET_TABLEDL_st* DL
|
6677
|
6730
|
Level[DL_Level_L] = (Levelret & 0x00FF);
|
6678
|
6731
|
}
|
6679
|
6732
|
void AGC_Function(){//DL
|
6680
|
|
- double ret = 0;
|
|
6733
|
+ /*double ret = 0;
|
6681
|
6734
|
int8_t ResdBm = 0;
|
6682
|
|
-
|
6683
|
6735
|
int16_t Levelret = 0;
|
6684
|
6736
|
int i = 0;
|
6685
|
|
- int16_t Limitdata = 0;
|
6686
|
6737
|
int16_t IwillgiveAtten = 0;
|
6687
|
6738
|
int16_t ResultData = 0;
|
6688
|
|
- static int8_t* AGC_Table;// = &DL_DET_Table_ref[MBIC_Table_DL1_INDEX][TABLE_MAX_VALUE];
|
|
6739
|
+ static int8_t* AGC_Table;// = &DL_DET_Table_ref[MBIC_Table_DL1_INDEX][TABLE_MAX_VALUE];*/
|
|
6740
|
+
|
|
6741
|
+ int16_t Limitdata = 0;
|
6689
|
6742
|
int16_t DL_Curr_Atten[AGC_Alarm_DL_Index_MAX] = {
|
6690
|
6743
|
bluecell_Currdatastatus.ATT_DL1_H << 8 | bluecell_Currdatastatus.ATT_DL1_L,
|
6691
|
6744
|
bluecell_Currdatastatus.ATT_DL2_H << 8 | bluecell_Currdatastatus.ATT_DL2_L,
|
|
@@ -7409,8 +7462,8 @@ typedef enum{
|
7409
|
7462
|
};
|
7410
|
7463
|
|
7411
|
7464
|
void DL_Shutdown_Operate(uint8_t index,uint8_t* path,uint8_t* retrycnt,uint8_t* ShutdownAlarm,uint8_t* MainAtten){
|
7412
|
|
- GPIO_TypeDef *Port;
|
7413
|
|
- uint16_t Pin;
|
|
7465
|
+ GPIO_TypeDef *Port = 0;
|
|
7466
|
+ uint16_t Pin = 0;
|
7414
|
7467
|
uint8_t AlarmFlag = 0;
|
7415
|
7468
|
|
7416
|
7469
|
|
|
@@ -7434,10 +7487,11 @@ void DL_Shutdown_Operate(uint8_t index,uint8_t* path,uint8_t* retrycnt,uint8_t*
|
7434
|
7487
|
Port = PATH_EN_DL4_GPIO_Port;
|
7435
|
7488
|
Pin = PATH_EN_DL4_Pin;
|
7436
|
7489
|
AlarmFlag = ALARM_DLI_SHUTDOWN_P4;
|
|
7490
|
+// printf("Timer : %d | Retry Cnt : %d | PrevMBIC_DL_ShutdownCount[%d] %d | MBIC_DL_ShutdownCount[%d] %d | DL_PathUserHandl[index] %d \r\n",DET_DL_Shutdown_Off_AlarmTimerCnt[index],(*retrycnt),index + 1,PrevMBIC_DL_ShutdownCount[index],index + 1,MBIC_DL_ShutdownCount[index],DL_PathUserHandl[index]);
|
7437
|
7491
|
break;
|
7438
|
7492
|
}
|
7439
|
|
- if(MBIC_DL_ShutdownCount[index] < 3
|
7440
|
|
- && (PrevMBIC_DL_ShutdownCount[index] != MBIC_DL_ShutdownCount[index])
|
|
7493
|
+ if((*retrycnt) < 3
|
|
7494
|
+ /*&& (PrevMBIC_DL_ShutdownCount[index] != MBIC_DL_ShutdownCount[index])*/
|
7441
|
7495
|
&& DET_DL_Shutdown_Off_AlarmTimerCnt[index] >= MBIC_RECOVERY_SHUTDOWN_MAINTAIN_SEC
|
7442
|
7496
|
&& DL_PathUserHandl[index] == false
|
7443
|
7497
|
&& (*retrycnt) > 0){
|
|
@@ -7729,9 +7783,9 @@ UL_Shutdown_Operate(DET_Alarm_UL1_Shutdown_Index,
|
7729
|
7783
|
&bluecell_Currdatastatus.ULO_Shutdown_Alarm1);
|
7730
|
7784
|
#endif // PYJ.2020.06.28_END --
|
7731
|
7785
|
|
7732
|
|
-void UL_Shutdown_Operate(uint8_t Index,uint8_t* Path,uint8_t* PrevATT,uint8_t* RetryCnt,uint8_t* ShutdownAlarm){
|
7733
|
|
- GPIO_TypeDef *Port;
|
7734
|
|
- uint16_t Pin;
|
|
7786
|
+void UL_Shutdown_Operate(uint8_t Index,uint8_t* Path,uint8_t* PrevATT,uint8_t* RetryCnt,uint8_t* ShutdownAlarm,uint8_t AlarmFlag){
|
|
7787
|
+ GPIO_TypeDef *Port = 0;
|
|
7788
|
+ uint16_t Pin = 0;
|
7735
|
7789
|
|
7736
|
7790
|
|
7737
|
7791
|
switch(Index){
|
|
@@ -7750,20 +7804,24 @@ void UL_Shutdown_Operate(uint8_t Index,uint8_t* Path,uint8_t* PrevATT,uint8_t* R
|
7750
|
7804
|
case DET_Alarm_UL4_Shutdown_Index:
|
7751
|
7805
|
Port = PATH_EN_UL4_GPIO_Port;
|
7752
|
7806
|
Pin = PATH_EN_UL4_Pin;
|
|
7807
|
+// printf("Timer : %d | Retry Cnt : %d | \r\n",DET_UL_Shutdown_Off_AlarmTimerCnt[Index],(*RetryCnt),Index + 1,PrevMBIC_UL_ShutdownCount[Index],Index + 1,MBIC_UL_ShutdownCount[Index]);
|
7753
|
7808
|
break;
|
7754
|
7809
|
|
7755
|
7810
|
}
|
7756
|
|
- if(MBIC_UL_ShutdownCount[Index] < 3
|
7757
|
|
- && (PrevMBIC_UL_ShutdownCount[Index] != MBIC_UL_ShutdownCount[Index])
|
7758
|
|
- && DET_UL_Shutdown_Off_AlarmTimerCnt[Index] >= MBIC_RECOVERY_SHUTDOWN_MAINTAIN_SEC){
|
|
7811
|
+
|
|
7812
|
+ if((*RetryCnt) < 3
|
|
7813
|
+// && (PrevMBIC_UL_ShutdownCount[Index] != MBIC_UL_ShutdownCount[Index])
|
|
7814
|
+ && DET_UL_Shutdown_Off_AlarmTimerCnt[Index] >= MBIC_RECOVERY_SHUTDOWN_MAINTAIN_SEC
|
|
7815
|
+ && (*RetryCnt) > 0){
|
7759
|
7816
|
HAL_GPIO_WritePin(Port,Pin,GPIO_PIN_SET);//CLOCK
|
|
7817
|
+// printf();
|
7760
|
7818
|
*Path = true;
|
7761
|
7819
|
PrevATT[UL_Shutdown_H] = 0xFF;
|
7762
|
7820
|
PrevATT[UL_Shutdown_L] = 0xFF;
|
7763
|
7821
|
PrevMBIC_UL_ShutdownCount[Index] = MBIC_UL_ShutdownCount[Index];
|
7764
|
7822
|
CompareAttenData(bluecell_Currdatastatus,bluecell_Prevdatastatus);
|
7765
|
7823
|
}
|
7766
|
|
- else if(MBIC_UL_ShutdownCount[Index] == 3
|
|
7824
|
+ else if((*RetryCnt) == 3
|
7767
|
7825
|
&& DET_UL_Shutdown_Off_AlarmTimerCnt[Index] >= MBIC_RECOVERY_LAST_SHUTDOWN_MAINTAIN_SEC){
|
7768
|
7826
|
HAL_GPIO_WritePin(Port,Pin,GPIO_PIN_SET);//CLOCK
|
7769
|
7827
|
*Path = true;
|
|
@@ -7781,7 +7839,7 @@ void UL_Shutdown_Operate(uint8_t Index,uint8_t* Path,uint8_t* PrevATT,uint8_t* R
|
7781
|
7839
|
|
7782
|
7840
|
if((*RetryCnt) >= RETRYCNT_MAX){
|
7783
|
7841
|
(*RetryCnt) = RETRYCNT_MAX;
|
7784
|
|
- bluecell_Currdatastatus.ALARM_ULO_SHTUTDOWN |= ALARM_ULO_SHUTDOWN_P1;
|
|
7842
|
+ bluecell_Currdatastatus.ALARM_ULO_SHTUTDOWN |= AlarmFlag;
|
7785
|
7843
|
*ShutdownAlarm = true;
|
7786
|
7844
|
}else{
|
7787
|
7845
|
}
|
|
@@ -7790,10 +7848,11 @@ void UL_Shutdown_Operate(uint8_t Index,uint8_t* Path,uint8_t* PrevATT,uint8_t* R
|
7790
|
7848
|
else{
|
7791
|
7849
|
if(DET_UL_Shutdown_Off_AlarmTimerCnt[Index] >= MBIC_OFF_MAINTAIN_SEC
|
7792
|
7850
|
&& (*RetryCnt) != RETRYCNT_MAX){
|
7793
|
|
- bluecell_Currdatastatus.ALARM_ULO_SHTUTDOWN &= ~ALARM_ULO_SHUTDOWN_P1;
|
|
7851
|
+ bluecell_Currdatastatus.ALARM_ULO_SHTUTDOWN &= ~AlarmFlag;
|
7794
|
7852
|
*ShutdownAlarm = false;
|
7795
|
7853
|
}
|
7796
|
7854
|
}
|
|
7855
|
+
|
7797
|
7856
|
}
|
7798
|
7857
|
|
7799
|
7858
|
void ULO_ShutdownAlarmCheck(){
|
|
@@ -7854,6 +7913,35 @@ void ULO_ShutdownAlarmCheck(){
|
7854
|
7913
|
|
7855
|
7914
|
#endif // PYJ.2020.06.21_END --
|
7856
|
7915
|
#if 1 // PYJ.2020.06.19_BEGIN --
|
|
7916
|
+#if 1 // PYJ.2020.07.01_BEGIN --
|
|
7917
|
+ UL_Shutdown_Operate(DET_Alarm_UL1_Shutdown_Index,
|
|
7918
|
+ &bluecell_Currdatastatus.ATT_UL1_PATH,
|
|
7919
|
+ &bluecell_Prevdatastatus.ATT_UL1_H,
|
|
7920
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count1,
|
|
7921
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Alarm1,
|
|
7922
|
+ ALARM_ULO_SHUTDOWN_P1);
|
|
7923
|
+ UL_Shutdown_Operate(DET_Alarm_UL2_Shutdown_Index,
|
|
7924
|
+ &bluecell_Currdatastatus.ATT_UL2_PATH,
|
|
7925
|
+ &bluecell_Prevdatastatus.ATT_UL2_H,
|
|
7926
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count2,
|
|
7927
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Alarm2,
|
|
7928
|
+ ALARM_ULO_SHUTDOWN_P2);
|
|
7929
|
+ UL_Shutdown_Operate(DET_Alarm_UL3_Shutdown_Index,
|
|
7930
|
+ &bluecell_Currdatastatus.ATT_UL3_PATH,
|
|
7931
|
+ &bluecell_Prevdatastatus.ATT_UL3_H,
|
|
7932
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count3,
|
|
7933
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Alarm3,
|
|
7934
|
+ ALARM_ULO_SHUTDOWN_P3);
|
|
7935
|
+ UL_Shutdown_Operate(DET_Alarm_UL4_Shutdown_Index,
|
|
7936
|
+ &bluecell_Currdatastatus.ATT_UL4_PATH,
|
|
7937
|
+ &bluecell_Prevdatastatus.ATT_UL4_H,
|
|
7938
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count4,
|
|
7939
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Alarm4,
|
|
7940
|
+ ALARM_ULO_SHUTDOWN_P4);
|
|
7941
|
+#else
|
|
7942
|
+
|
|
7943
|
+
|
|
7944
|
+
|
7857
|
7945
|
/***************************************************************************************************************/
|
7858
|
7946
|
/* SHUTDOWN UL1 */
|
7859
|
7947
|
/***************************************************************************************************************/
|
|
@@ -8066,6 +8154,8 @@ void ULO_ShutdownAlarmCheck(){
|
8066
|
8154
|
}
|
8067
|
8155
|
}
|
8068
|
8156
|
|
|
8157
|
+
|
|
8158
|
+#endif // PYJ.2020.07.01_END --
|
8069
|
8159
|
|
8070
|
8160
|
#if 0 // PYJ.2020.06.21_BEGIN --
|
8071
|
8161
|
if(ADC_Alarm_UL_Shutdown_Set[DET_Alarm_UL3_Shutdown_Index] == true
|