ZDBMS/output/PorSelfTest.lst

239 lines
11 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

C51 COMPILER V9.01 PORSELFTEST 02/06/2025 15:28:46 PAGE 1
C51 COMPILER V9.01, COMPILATION OF MODULE PORSELFTEST
OBJECT MODULE PLACED IN .\output\PorSelfTest.obj
COMPILER INVOKED BY: D:\Tool\Keil\C51\BIN\C51.EXE code_drv\PorSelfTest.c LARGE OPTIMIZE(7,SIZE) REGFILE(.\output\MCUCore
-_Load.ORC) BROWSE INTVECTOR(0X1000) INCDIR(.\header_app;.\header_drv;.\code_gasguage;.\code_classb\iec60730_lib\include;
-.\code_classb\iec60730_proc\Include;.\code_classb\config) DEBUG OBJECTEXTEND PRINT(.\output\PorSelfTest.lst) OBJECT(.\ou
-tput\PorSelfTest.obj)
line level source
1 /********************************************************************************
2 Copyright (C), Sinowealth Electronic. Ltd.
3 Author: Sino
4 Version: V0.0
5 Date: 2020/04/26
6 History:
7 V2.0 2020/04/26 Preliminary
8 ********************************************************************************/
9 #include "Main.H"
10
11 BOOL bPorSelfTestFlg;
12 U8 ucPorSelfTestDelayCnt;
13
14 /*************************************************************************************************
15 * 函数名: PorProtectOV
16 * 参 数: 无
17 * 返回值: 无
18 * 描 述: 单节电池过压保护检测过压后置位bOV为1
19 *************************************************************************************************/
20 void PorProtectOV(void)
21 {
22 1 if(!bOV)
23 1 {
24 2 if(uiCellVmax > E2uiOVvol)
25 2 {
26 3 if(++uiOVDelayCnt >= TIME_50mS_50mS)
27 3 {
28 4 bOV = 1;
29 4 uiOVDelayCnt = 0;
30 4 }
31 3 }
32 2 else if(uiCellVmax < E2uiOVRvol)
33 2 {
34 3 uiOVDelayCnt = 0;
35 3 }
36 2 }
37 1 }
38
39
40 /*************************************************************************************************
41 * 函数名: PorProtectUV
42 * 参 数: 无
43 * 返回值: 无
44 * 描 述: 单节电芯欠压保护检测保护后置位bUV为1
45 *************************************************************************************************/
46 void PorProtectUV(void)
47 {
48 1 if(!bUV)
49 1 {
50 2 if(uiCellVmin < E2uiUVvol)
51 2 {
52 3 if(++uiUVDelayCnt >= TIME_50mS_50mS)
C51 COMPILER V9.01 PORSELFTEST 02/06/2025 15:28:46 PAGE 2
53 3 {
54 4 bUV = 1;
55 4 uiUVDelayCnt = 0;
56 4 }
57 3 }
58 2 else if(uiCellVmin > E2uiUVRvol)
59 2 {
60 3 uiUVDelayCnt = 0;
61 3 }
62 2 }
63 1 }
64
65
66 /*************************************************************************************************
67 * 函数名: PorProtectOTC
68 * 参 数: 无
69 * 返回值: 无
70 * 描 述: 充电高温保护检测保护后置位bOTC为1
71 *************************************************************************************************/
72 void PorProtectOTC(void)
73 {
74 1 if(!bOTC)
75 1 {
76 2 if(uiTempeMax > E2uiTempOTC)
77 2 {
78 3 if(++uiOTCDelayCnt >= TIME_50mS_50mS)
79 3 {
80 4 bOTC = 1;
81 4 uiOTCDelayCnt = 0;
82 4 }
83 3 }
84 2 else if(uiTempeMax < E2uiTempOTCR)
85 2 {
86 3 uiOTCDelayCnt = 0;
87 3 }
88 2 }
89 1 }
90
91
92 /*************************************************************************************************
93 * 函数名: PorProtectUTC
94 * 参 数: 无
95 * 返回值: 无
96 * 描 述: 充电低温保护检测保护后置位bUTC为1
97 *************************************************************************************************/
98 void PorProtectUTC(void)
99 {
100 1 if(!bUTC)
101 1 {
102 2 if(uiTempeMin < E2uiTempUTC)
103 2 {
104 3 if(++uiUTCDelayCnt >= TIME_50mS_50mS)
105 3 {
106 4 bUTC = 1;
107 4 uiUTCDelayCnt = 0;
108 4 }
109 3 }
110 2 else if(uiTempeMin > E2uiTempUTCR)
111 2 {
112 3 uiUTCDelayCnt = 0;
113 3 }
114 2 }
C51 COMPILER V9.01 PORSELFTEST 02/06/2025 15:28:46 PAGE 3
115 1 }
116
117
118 /*************************************************************************************************
119 * 函数名: PorProtectOTD
120 * 参 数: 无
121 * 返回值: 无
122 * 描 述: 放电高温保护检测保护后置位bOTD为1
123 *************************************************************************************************/
124 void PorProtectOTD(void)
125 {
126 1 if(!bOTD)
127 1 {
128 2 if(uiTempeMax > E2uiTempOTD)
129 2 {
130 3 if(++uiOTDDelayCnt >= TIME_50mS_50mS)
131 3 {
132 4 bOTD = 1;
133 4 uiOTDDelayCnt = 0;
134 4 }
135 3 }
136 2 else if(uiTempeMax < E2uiTempOTDR)
137 2 {
138 3 uiOTDDelayCnt = 0;
139 3 }
140 2 }
141 1 }
142
143
144 /*************************************************************************************************
145 * 函数名: PorProtectUTD
146 * 参 数: 无
147 * 返回值: 无
148 * 描 述: 放电低温保护检测保护后置位bUTD为1
149 *************************************************************************************************/
150 void PorProtectUTD(void)
151 {
152 1 if(!bUTD)
153 1 {
154 2 if(uiTempeMin < E2uiTempUTD)
155 2 {
156 3 if(++uiUTDDelayCnt >= TIME_50mS_50mS)
157 3 {
158 4 bUTD = 1;
159 4 uiUTDDelayCnt = 0;
160 4 }
161 3 }
162 2 else if(uiTempeMin > E2uiTempUTDR)
163 2 {
164 3 uiUTDDelayCnt = 0;
165 3 }
166 2 }
167 1 }
168
169
170 /*************************************************************************************************
171 * 函数名: ProtectProcess
172 * 参 数: 无
173 * 返回值: 无
174 * 描 述: 第一次上电时的自检持续100mS上电自检最快完成时间为50mS
175 *************************************************************************************************/
176 void PorSelfTest(void)
C51 COMPILER V9.01 PORSELFTEST 02/06/2025 15:28:46 PAGE 4
177 {
178 1 if(bPorSelfTestFlg)
179 1 {
180 2 AfeCalcuVol(); //第一次上电50mS后自动读取电压数据和温度数据
181 2 AfeCalcuTempe();
182 2 PorProtectOV(); //检测过压保护及其释放
183 2 PorProtectUV(); //检测欠压保护及其释放
184 2
185 2 PorProtectOTC(); //检测充电高温保护及其释放
186 2 PorProtectUTC(); //检测充电低温保护及其释放
187 2 PorProtectOTD(); //检测放电高温保护及其释放
188 2 PorProtectUTD(); //检测放电低温保护及其释放
189 2
190 2 if(++ucPorSelfTestDelayCnt >= TIME_50mS_100mS) //如果需要最快自检完成则将TIME_50mS_100mS修改<E4BFAE>
-猅IME_50mS_50mS
191 2 {
192 3 bPorSelfTestFlg = 0; //1S自检结束后根据当前状态确定是否进入PD或者是否开<E590A6>
-豈OS
193 3 if(bAfeErr || bE2PRErr || bRTCErr || bMcuFlashErr)
194 3 {
195 4 bPDFlg = 1;
196 4 }
197 3 else
198 3 {
199 4 GasGaugeInit(); //计算电量值
200 4 }
201 3 }
202 2 }
203 1 }
204
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 519 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 1 ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = 1 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)