修改Flash默认电池串数
This commit is contained in:
parent
26782bab39
commit
f40a5c92ff
194
MCUCore.uvopt
194
MCUCore.uvopt
|
@ -1532,10 +1532,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>64</ColumnNumber>
|
||||
<ColumnNumber>18</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>61</TopLine>
|
||||
<CurrentLine>89</CurrentLine>
|
||||
<TopLine>25</TopLine>
|
||||
<CurrentLine>33</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_app\Main.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Main.c</FilenameWithoutPath>
|
||||
|
@ -1548,7 +1548,7 @@
|
|||
<Focus>0</Focus>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>537</TopLine>
|
||||
<TopLine>520</TopLine>
|
||||
<CurrentLine>538</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_app\Initial.c</PathWithFileName>
|
||||
|
@ -1632,8 +1632,8 @@
|
|||
<Focus>0</Focus>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>66</TopLine>
|
||||
<CurrentLine>66</CurrentLine>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_app\Memory.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Memory.c</FilenameWithoutPath>
|
||||
|
@ -1693,10 +1693,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>56</ColumnNumber>
|
||||
<ColumnNumber>49</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>369</TopLine>
|
||||
<CurrentLine>380</CurrentLine>
|
||||
<TopLine>46</TopLine>
|
||||
<CurrentLine>76</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Calculate.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Calculate.c</FilenameWithoutPath>
|
||||
|
@ -1707,10 +1707,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>62</ColumnNumber>
|
||||
<ColumnNumber>31</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>79</TopLine>
|
||||
<CurrentLine>79</CurrentLine>
|
||||
<CurrentLine>80</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Calibrate.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Calibrate.c</FilenameWithoutPath>
|
||||
|
@ -1737,8 +1737,8 @@
|
|||
<Focus>0</Focus>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>349</TopLine>
|
||||
<CurrentLine>367</CurrentLine>
|
||||
<TopLine>461</TopLine>
|
||||
<CurrentLine>461</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\ExtE2PRom.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ExtE2PRom.c</FilenameWithoutPath>
|
||||
|
@ -1861,10 +1861,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<ColumnNumber>45</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>408</TopLine>
|
||||
<CurrentLine>408</CurrentLine>
|
||||
<TopLine>121</TopLine>
|
||||
<CurrentLine>121</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\TWI.c</PathWithFileName>
|
||||
<FilenameWithoutPath>TWI.c</FilenameWithoutPath>
|
||||
|
@ -1875,9 +1875,9 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<ColumnNumber>21</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>103</TopLine>
|
||||
<TopLine>97</TopLine>
|
||||
<CurrentLine>127</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Uart.c</PathWithFileName>
|
||||
|
@ -1889,10 +1889,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>60</ColumnNumber>
|
||||
<ColumnNumber>54</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>13</TopLine>
|
||||
<CurrentLine>22</CurrentLine>
|
||||
<TopLine>330</TopLine>
|
||||
<CurrentLine>362</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Thermistor.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Thermistor.c</FilenameWithoutPath>
|
||||
|
@ -1929,7 +1929,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>Gasguage</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -1964,7 +1964,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>AppBoot</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -2008,10 +2008,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>5266323</ColumnNumber>
|
||||
<ColumnNumber>31</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>53104040</TopLine>
|
||||
<CurrentLine>17768312</CurrentLine>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>30</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_dataflash\DataFlash.c</PathWithFileName>
|
||||
<FilenameWithoutPath>DataFlash.c</FilenameWithoutPath>
|
||||
|
@ -2405,7 +2405,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>BootLoad</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -3807,32 +3807,98 @@
|
|||
<ActiveMDIGroup>0</ActiveMDIGroup>
|
||||
<MDIGroup>
|
||||
<Size>100</Size>
|
||||
<ActiveTab>1</ActiveTab>
|
||||
<ActiveTab>5</ActiveTab>
|
||||
<Documents>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\AFE.H</Name>
|
||||
<ColumnNumber>8</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>4</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\CALCULATE.H</Name>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>13</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Thermistor.c</Name>
|
||||
<ColumnNumber>54</ColumnNumber>
|
||||
<TopLine>330</TopLine>
|
||||
<CurrentLine>362</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Main.c</Name>
|
||||
<ColumnNumber>18</ColumnNumber>
|
||||
<TopLine>25</TopLine>
|
||||
<CurrentLine>33</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Memory.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calculate.c</Name>
|
||||
<ColumnNumber>49</ColumnNumber>
|
||||
<TopLine>46</TopLine>
|
||||
<CurrentLine>76</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calibrate.c</Name>
|
||||
<ColumnNumber>31</ColumnNumber>
|
||||
<TopLine>79</TopLine>
|
||||
<CurrentLine>80</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_dataflash\DataFlash.c</Name>
|
||||
<ColumnNumber>31</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>30</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\ExtE2PRom.c</Name>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<TopLine>461</TopLine>
|
||||
<CurrentLine>461</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>\Y\KEIL\ZDBMS\ZDBMS\HEADER_APP\UARTAPP.H</Name>
|
||||
<ColumnNumber>12</ColumnNumber>
|
||||
<TopLine>128</TopLine>
|
||||
<CurrentLine>128</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Uart.c</Name>
|
||||
<ColumnNumber>21</ColumnNumber>
|
||||
<TopLine>97</TopLine>
|
||||
<CurrentLine>127</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Initial.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>520</TopLine>
|
||||
<CurrentLine>538</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\TWI.c</Name>
|
||||
<ColumnNumber>45</ColumnNumber>
|
||||
<TopLine>121</TopLine>
|
||||
<CurrentLine>121</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\AFE.c</Name>
|
||||
<ColumnNumber>9</ColumnNumber>
|
||||
<TopLine>304</TopLine>
|
||||
<CurrentLine>304</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Main.c</Name>
|
||||
<ColumnNumber>64</ColumnNumber>
|
||||
<TopLine>61</TopLine>
|
||||
<CurrentLine>89</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>\Y\KEIL\ZDBMS\ZDBMS\HEADER_APP\MEMORY.H</Name>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Memory.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>66</TopLine>
|
||||
<CurrentLine>66</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\ChargerLoad.c</Name>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
|
@ -3863,12 +3929,6 @@
|
|||
<TopLine>1774</TopLine>
|
||||
<CurrentLine>1798</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Uart.c</Name>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<TopLine>103</TopLine>
|
||||
<CurrentLine>127</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\PorSelfTest.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
|
@ -3881,12 +3941,6 @@
|
|||
<TopLine>1</TopLine>
|
||||
<CurrentLine>7</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Initial.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>537</TopLine>
|
||||
<CurrentLine>538</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\header_app\Main.h</Name>
|
||||
<ColumnNumber>28</ColumnNumber>
|
||||
|
@ -3899,48 +3953,12 @@
|
|||
<TopLine>1</TopLine>
|
||||
<CurrentLine>5</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\ExtE2PRom.c</Name>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<TopLine>349</TopLine>
|
||||
<CurrentLine>367</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calibrate.c</Name>
|
||||
<ColumnNumber>62</ColumnNumber>
|
||||
<TopLine>79</TopLine>
|
||||
<CurrentLine>79</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calculate.c</Name>
|
||||
<ColumnNumber>56</ColumnNumber>
|
||||
<TopLine>369</TopLine>
|
||||
<CurrentLine>380</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Thermistor.c</Name>
|
||||
<ColumnNumber>60</ColumnNumber>
|
||||
<TopLine>13</TopLine>
|
||||
<CurrentLine>22</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\CALCULATE.H</Name>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>26</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\MCUFLASH.H</Name>
|
||||
<ColumnNumber>79</ColumnNumber>
|
||||
<TopLine>55</TopLine>
|
||||
<CurrentLine>64</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\AFE.H</Name>
|
||||
<ColumnNumber>8</ColumnNumber>
|
||||
<TopLine>16</TopLine>
|
||||
<CurrentLine>52</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\InterruptApp.c</Name>
|
||||
<ColumnNumber>63</ColumnNumber>
|
||||
|
|
|
@ -1532,10 +1532,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>17</ColumnNumber>
|
||||
<ColumnNumber>18</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>34</TopLine>
|
||||
<CurrentLine>49</CurrentLine>
|
||||
<TopLine>25</TopLine>
|
||||
<CurrentLine>33</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_app\Main.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Main.c</FilenameWithoutPath>
|
||||
|
@ -1548,7 +1548,7 @@
|
|||
<Focus>0</Focus>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>537</TopLine>
|
||||
<TopLine>520</TopLine>
|
||||
<CurrentLine>538</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_app\Initial.c</PathWithFileName>
|
||||
|
@ -1630,10 +1630,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>11</ColumnNumber>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>145</TopLine>
|
||||
<CurrentLine>180</CurrentLine>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_app\Memory.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Memory.c</FilenameWithoutPath>
|
||||
|
@ -1656,7 +1656,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>Driver</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -1665,10 +1665,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>65</ColumnNumber>
|
||||
<ColumnNumber>9</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>177</TopLine>
|
||||
<CurrentLine>193</CurrentLine>
|
||||
<TopLine>304</TopLine>
|
||||
<CurrentLine>304</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\AFE.c</PathWithFileName>
|
||||
<FilenameWithoutPath>AFE.c</FilenameWithoutPath>
|
||||
|
@ -1693,10 +1693,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>56</ColumnNumber>
|
||||
<ColumnNumber>40</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>369</TopLine>
|
||||
<CurrentLine>380</CurrentLine>
|
||||
<TopLine>30</TopLine>
|
||||
<CurrentLine>67</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Calculate.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Calculate.c</FilenameWithoutPath>
|
||||
|
@ -1707,10 +1707,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>62</ColumnNumber>
|
||||
<ColumnNumber>28</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>79</TopLine>
|
||||
<CurrentLine>79</CurrentLine>
|
||||
<TopLine>61</TopLine>
|
||||
<CurrentLine>80</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Calibrate.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Calibrate.c</FilenameWithoutPath>
|
||||
|
@ -1721,10 +1721,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>5266323</ColumnNumber>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>53104136</TopLine>
|
||||
<CurrentLine>17768312</CurrentLine>
|
||||
<TopLine>13</TopLine>
|
||||
<CurrentLine>37</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\ChargerLoad.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ChargerLoad.c</FilenameWithoutPath>
|
||||
|
@ -1737,8 +1737,8 @@
|
|||
<Focus>0</Focus>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>349</TopLine>
|
||||
<CurrentLine>367</CurrentLine>
|
||||
<TopLine>461</TopLine>
|
||||
<CurrentLine>461</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\ExtE2PRom.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ExtE2PRom.c</FilenameWithoutPath>
|
||||
|
@ -1833,10 +1833,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>27</ColumnNumber>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>143</TopLine>
|
||||
<CurrentLine>156</CurrentLine>
|
||||
<TopLine>413</TopLine>
|
||||
<CurrentLine>431</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Protect.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Protect.c</FilenameWithoutPath>
|
||||
|
@ -1861,10 +1861,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<ColumnNumber>45</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>408</TopLine>
|
||||
<CurrentLine>408</CurrentLine>
|
||||
<TopLine>121</TopLine>
|
||||
<CurrentLine>121</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\TWI.c</PathWithFileName>
|
||||
<FilenameWithoutPath>TWI.c</FilenameWithoutPath>
|
||||
|
@ -1875,9 +1875,9 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<ColumnNumber>21</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>103</TopLine>
|
||||
<TopLine>97</TopLine>
|
||||
<CurrentLine>127</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Uart.c</PathWithFileName>
|
||||
|
@ -1889,10 +1889,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>60</ColumnNumber>
|
||||
<ColumnNumber>58</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>13</TopLine>
|
||||
<CurrentLine>22</CurrentLine>
|
||||
<TopLine>346</TopLine>
|
||||
<CurrentLine>383</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_drv\Thermistor.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Thermistor.c</FilenameWithoutPath>
|
||||
|
@ -1929,7 +1929,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>Gasguage</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -1964,7 +1964,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>AppBoot</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -2008,10 +2008,10 @@
|
|||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>5266323</ColumnNumber>
|
||||
<ColumnNumber>38</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>53104040</TopLine>
|
||||
<CurrentLine>17768312</CurrentLine>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>34</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\code_dataflash\DataFlash.c</PathWithFileName>
|
||||
<FilenameWithoutPath>DataFlash.c</FilenameWithoutPath>
|
||||
|
@ -2405,7 +2405,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>BootLoad</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<File>
|
||||
|
@ -3807,8 +3807,104 @@
|
|||
<ActiveMDIGroup>0</ActiveMDIGroup>
|
||||
<MDIGroup>
|
||||
<Size>100</Size>
|
||||
<ActiveTab>0</ActiveTab>
|
||||
<ActiveTab>4</ActiveTab>
|
||||
<Documents>
|
||||
<Doc>
|
||||
<Name>.\code_app\Main.c</Name>
|
||||
<ColumnNumber>18</ColumnNumber>
|
||||
<TopLine>25</TopLine>
|
||||
<CurrentLine>33</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Memory.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calculate.c</Name>
|
||||
<ColumnNumber>40</ColumnNumber>
|
||||
<TopLine>30</TopLine>
|
||||
<CurrentLine>67</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calibrate.c</Name>
|
||||
<ColumnNumber>28</ColumnNumber>
|
||||
<TopLine>61</TopLine>
|
||||
<CurrentLine>80</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_dataflash\DataFlash.c</Name>
|
||||
<ColumnNumber>38</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>34</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\ExtE2PRom.c</Name>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<TopLine>461</TopLine>
|
||||
<CurrentLine>461</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>\Y\KEIL\ZDBMS\ZDBMS\HEADER_APP\UARTAPP.H</Name>
|
||||
<ColumnNumber>12</ColumnNumber>
|
||||
<TopLine>128</TopLine>
|
||||
<CurrentLine>128</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Uart.c</Name>
|
||||
<ColumnNumber>21</ColumnNumber>
|
||||
<TopLine>97</TopLine>
|
||||
<CurrentLine>127</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Initial.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>520</TopLine>
|
||||
<CurrentLine>538</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\TWI.c</Name>
|
||||
<ColumnNumber>45</ColumnNumber>
|
||||
<TopLine>121</TopLine>
|
||||
<CurrentLine>121</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\CALCULATE.H</Name>
|
||||
<ColumnNumber>28</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>31</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Thermistor.c</Name>
|
||||
<ColumnNumber>58</ColumnNumber>
|
||||
<TopLine>346</TopLine>
|
||||
<CurrentLine>383</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\AFE.c</Name>
|
||||
<ColumnNumber>9</ColumnNumber>
|
||||
<TopLine>304</TopLine>
|
||||
<CurrentLine>304</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>\Y\KEIL\ZDBMS\ZDBMS\HEADER_APP\MEMORY.H</Name>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\ChargerLoad.c</Name>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<TopLine>13</TopLine>
|
||||
<CurrentLine>37</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Protect.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>413</TopLine>
|
||||
<CurrentLine>431</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Balance.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
|
@ -3827,12 +3923,6 @@
|
|||
<TopLine>1774</TopLine>
|
||||
<CurrentLine>1798</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Uart.c</Name>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<TopLine>103</TopLine>
|
||||
<CurrentLine>127</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\PorSelfTest.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
|
@ -3845,78 +3935,18 @@
|
|||
<TopLine>1</TopLine>
|
||||
<CurrentLine>7</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Initial.c</Name>
|
||||
<ColumnNumber>5</ColumnNumber>
|
||||
<TopLine>537</TopLine>
|
||||
<CurrentLine>538</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\header_app\Main.h</Name>
|
||||
<ColumnNumber>28</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>4</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\AFE.c</Name>
|
||||
<ColumnNumber>65</ColumnNumber>
|
||||
<TopLine>177</TopLine>
|
||||
<CurrentLine>193</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\CALIBRATE.H</Name>
|
||||
<ColumnNumber>33</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>5</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Main.c</Name>
|
||||
<ColumnNumber>17</ColumnNumber>
|
||||
<TopLine>34</TopLine>
|
||||
<CurrentLine>49</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\ExtE2PRom.c</Name>
|
||||
<ColumnNumber>13</ColumnNumber>
|
||||
<TopLine>349</TopLine>
|
||||
<CurrentLine>367</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_app\Memory.c</Name>
|
||||
<ColumnNumber>11</ColumnNumber>
|
||||
<TopLine>145</TopLine>
|
||||
<CurrentLine>180</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calibrate.c</Name>
|
||||
<ColumnNumber>62</ColumnNumber>
|
||||
<TopLine>79</TopLine>
|
||||
<CurrentLine>79</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Calculate.c</Name>
|
||||
<ColumnNumber>56</ColumnNumber>
|
||||
<TopLine>369</TopLine>
|
||||
<CurrentLine>380</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Thermistor.c</Name>
|
||||
<ColumnNumber>60</ColumnNumber>
|
||||
<TopLine>13</TopLine>
|
||||
<CurrentLine>22</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\CALCULATE.H</Name>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>26</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\code_drv\Protect.c</Name>
|
||||
<ColumnNumber>27</ColumnNumber>
|
||||
<TopLine>143</TopLine>
|
||||
<CurrentLine>156</CurrentLine>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>.\HEADER_DRV\MCUFLASH.H</Name>
|
||||
<ColumnNumber>79</ColumnNumber>
|
||||
|
|
|
@ -33,7 +33,7 @@ void main(void)
|
|||
{
|
||||
Initial(); //初始化系统
|
||||
|
||||
printf("SystemClock: 8MHz");
|
||||
// printf("SystemClock: 8MHz");
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ V0.0 2014/09/10 Preliminary
|
|||
// <o> LED显示个数
|
||||
#define _EPCM_LED_NUM 0 //BIT11~12; 未调用
|
||||
// <o> 电芯串数
|
||||
#define _EPCM_CELL_NUM 10 //BIT8~10; 电芯串数,6~10串
|
||||
#define _EPCM_CELL_NUM 4 //BIT8~10; 电芯串数,6~10串
|
||||
// <q> 外挂EEPROM备份
|
||||
#define _EPCM_EEPROM_EN 0 //BIT7; 0:不使能外挂EE备份功能; 1:使能外挂EE备份功能
|
||||
// <q> 放电过流MOS控制
|
||||
|
@ -109,7 +109,7 @@ V0.0 2014/09/10 Preliminary
|
|||
// <o>序列号<0x0000-0xffff>
|
||||
#define _E2_SerialNum 0x0000 // U16 xdata SerialNum
|
||||
// <s.12>设备名称
|
||||
#define _E2_DeviceName "SH39F004" // U8 xdata DeviceName[12]
|
||||
#define _E2_DeviceName "SH39F003" // U8 xdata DeviceName[12]
|
||||
// <s.4>电芯材料
|
||||
#define _E2_DeviceChem "LION" // U8 xdata DeviceChem[12]
|
||||
// <o>电芯化学ID<0x0000-0xffff>
|
||||
|
|
|
@ -68,8 +68,11 @@ U16 CalcuTemp(U16 getdata)
|
|||
i--;
|
||||
}
|
||||
ucTempeMiddle = i;
|
||||
|
||||
#if NTC_SL //SLÈÈÃôµç×è
|
||||
Temperature = (U16)(ucTempeMiddle-20)*10+(NTC103AT[i]-Tempcalcu)*10/(NTC103AT[i]-NTC103AT[i+1])+2731;
|
||||
#else
|
||||
Temperature = (U16)(ucTempeMiddle-50)*10+(NTC103AT[i]-Tempcalcu)*10/(NTC103AT[i]-NTC103AT[i+1])+2731;
|
||||
#endif
|
||||
}
|
||||
return Temperature;
|
||||
}
|
||||
|
|
|
@ -351,6 +351,29 @@ U16 code NTC103AT[NTC103AT_ARRAY_LEN]= //103AT
|
|||
52, //109
|
||||
50 //110
|
||||
};
|
||||
/*************************************************************************************************
|
||||
* 函数名: NTC103AT
|
||||
* 参 数: 无
|
||||
* 返回值: 无
|
||||
* 描 述: SL的NTC阻值表,单位为10 ohms
|
||||
*************************************************************************************************/
|
||||
#elif RT_TABLE == NTC_SL
|
||||
U16 code NTC103AT[NTC103AT_ARRAY_LEN]=
|
||||
{ //温度为索引-20
|
||||
// -20℃~100℃共121个温度点,索引0~120
|
||||
9534, 9006, 8510, 8044, 7607, 7196, 6809, 6445, 6103, 5780, //-20~-11
|
||||
5477, 5191, 4922, 4668, 4429, 4203, 3990, 3789, 3599, 3420, //-10~-1
|
||||
3250, 3090, 2939, 2796, 2661, 2533, 2411, 2297, 2188, 2085, //0~9
|
||||
1987, 1895, 1807, 1724, 1645, 1570, 1499, 1432, 1368, 1307, //10~19
|
||||
1249, 1194, 1142, 1092, 1045, 1000, 957 , 916 , 878 , 841 , //20~29
|
||||
805 , 772 , 740 , 709 , 680 , 653 , 626 , 601 , 577 , 554 , //30~39
|
||||
532 , 511 , 491 , 471 , 453 , 436 , 419 , 403 , 387 , 373 , //40~49
|
||||
359 , 345 , 332 , 320 , 308 , 297 , 286 , 276 , 266 , 256 , //50~59
|
||||
247 , 238 , 230 , 222 , 214 , 206 , 199 , 192 , 186 , 179 , //60~69
|
||||
173 , 167 , 162 , 156 , 151 , 146 , 141 , 137 , 132 , 128 , //70~79
|
||||
124 , 120 , 116 , 112 , 109 , 105 , 102 , 99 , 96 , 93 , //80~89
|
||||
90 , 87 , 85 , 82 , 79 , 77 , 75 , 73 , 70 , 68 , 66 //90~100
|
||||
};
|
||||
#else
|
||||
#error "underfined RT_TABLE!"
|
||||
#endif
|
||||
|
|
|
@ -118,7 +118,7 @@ void InterruptUART0(void) interrupt 4
|
|||
{
|
||||
RI = 0;
|
||||
RxData = SBUF;
|
||||
InterruptUart0AppRx(RxData); //中颖协议
|
||||
InterruptUart0AppRx(RxData); //中颖协议
|
||||
}
|
||||
|
||||
if(TI)
|
||||
|
|
|
@ -8,19 +8,27 @@
|
|||
#define REF_RES_VAL 1000 //芯片内部的参考电阻默认为10K=1000*10, 单位是10 ohms
|
||||
#endif
|
||||
|
||||
#define NTC_103AT_3435 1
|
||||
#define NTC_103AT_3435 0
|
||||
#define NTC_103AT_3950 0
|
||||
#define NTC_SL 1
|
||||
|
||||
#define RT_TABLE NTC_103AT_3435
|
||||
#define RT_TABLE NTC_SL
|
||||
|
||||
#if RT_TABLE == NTC_103AT_3435
|
||||
#define NTC103AT_ARRAY_LEN 161
|
||||
#define TEMP_UPPER_LIMIT 110 // 110℃
|
||||
#define TEMP_LOWER_LIMIT -50 // -50℃
|
||||
|
||||
#elif RT_TABLE == NTC_103AT_3950
|
||||
#define NTC103AT_ARRAY_LEN 161
|
||||
#define TEMP_UPPER_LIMIT 110 // 110℃
|
||||
#define TEMP_LOWER_LIMIT -50 // -50℃
|
||||
|
||||
#elif RT_TABLE == NTC_SL
|
||||
#define NTC103AT_ARRAY_LEN 121
|
||||
#define TEMP_UPPER_LIMIT 100 // 100¡æ
|
||||
#define TEMP_LOWER_LIMIT -20 // -20¡æ
|
||||
|
||||
#else
|
||||
#error "underfined RT_TABLE!"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE AFE
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 3 ucAfeI2CErrDelayCnt = TIME_1S_5S;
|
||||
51 3 }
|
||||
52 2 }
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 1 else
|
||||
54 1 {
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 2 }
|
||||
113 1 bAfeI2CRWErrFlg = !Result; //标记通讯是否正常
|
||||
114 1
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115 1 return Result;
|
||||
116 1 }
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 3 AFEWriteReg(AFE_SCONF1, 1, ®.AFESCONF1);
|
||||
175 3 }
|
||||
176 2 }
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
177 1 }
|
||||
178
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
233 1 {
|
||||
234 2 if( AFEWriteReg(AFE_INT_EN, 11, ®.AFEINTEN))
|
||||
235 2 {
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
236 3 for(i=3; i<=11; i=i+2)
|
||||
237 3 {
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
295 2
|
||||
296 2 if((REG.AFEFLAG2&0x04) != 0) //判断FLAG2的bit2是否为1,如为1则表示AFE发生过LVR,需<EFBC8C>
|
||||
-<2D>匦鲁跏蓟疉FE寄存器
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
297 2 {
|
||||
298 3 AFEInit();
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
356 void AFEEnterPD(void)
|
||||
357 {
|
||||
358 1 REG.AFESCONF10 = 0x33;
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 7
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 7
|
||||
|
||||
359 1 if(AFEWriteReg(AFE_SCONF10, 1, ®.AFESCONF10))
|
||||
360 1 {
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
418 * 参 数: BalChTemp:平衡对应的CELL,如果全部为0,则关闭平衡
|
||||
419 * 返回值: 无
|
||||
420 * 描 述: 开启和关闭平衡
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 8
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 8
|
||||
|
||||
421 *************************************************************************************************/
|
||||
422 void AfeBalCtl(U16 BalChTemp)
|
||||
|
@ -510,7 +510,7 @@ line level source
|
|||
480 {
|
||||
481 1 REG.AFESCONF3 &= ~0xe0;
|
||||
482 1 AFEWriteReg(AFE_SCONF3, 1, ®.AFESCONF3);
|
||||
C51 COMPILER V9.01 AFE 02/07/2025 10:36:15 PAGE 9
|
||||
C51 COMPILER V9.01 AFE 02/08/2025 15:18:20 PAGE 9
|
||||
|
||||
483 1 }
|
||||
484
|
||||
|
|
BIN
output/AFE.obj
BIN
output/AFE.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 BALANCE 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 BALANCE 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE BALANCE
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
47 4 }
|
||||
48 3 else
|
||||
49 3 {
|
||||
C51 COMPILER V9.01 BALANCE 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 BALANCE 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
50 4 if(((uiCellVmax>E2uiBalanceVol) && (uiCellVmax-uiCellVmin)>=E2uiBalanceVolDiff) && (Info.slCurr>=E2
|
||||
-siBalCurrent))
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
107 5 bCTOValidFlg = 0;
|
||||
108 5 ucCtoCnt = 0;
|
||||
109 5 }
|
||||
C51 COMPILER V9.01 BALANCE 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 BALANCE 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
110 4 }
|
||||
111 3 }
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
168 3 AfeBalCtl(BalChTemp); //¿ªÆôƽºâ
|
||||
169 3 ucBalanceStep = BALANCE_START;
|
||||
170 3 bBalancingFlg = 1;
|
||||
C51 COMPILER V9.01 BALANCE 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 BALANCE 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
171 3 }
|
||||
172 2 break;
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
230 4 uiBalanceChannel = 0x03ff;
|
||||
231 4 }
|
||||
232 3 }
|
||||
C51 COMPILER V9.01 BALANCE 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 BALANCE 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
233 2 }
|
||||
234 1 }
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 BOOTAPP 02/07/2025 10:36:16 PAGE 1
|
||||
C51 COMPILER V9.01 BOOTAPP 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE BOOTAPP
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 BOOTIAP 02/07/2025 10:36:16 PAGE 1
|
||||
C51 COMPILER V9.01 BOOTIAP 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE BOOTIAP
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 0x25,0xF5,0x24,0xF5,0x23,0xE4,0xF5,0x0F,0x30,0x01,0x5E,0x25,0x26,0xF5,0x0E,0xE5, //02D0
|
||||
51 0x25,0x34,0x10,0xF5,0x0D,0xE4,0x35,0x24,0xF5,0x0C,0xE4,0x35,0x23,0xF5,0x0B,0xE4, //02E0
|
||||
52 0x25,0x2A,0xFF,0xE5,0x29,0x34,0x0C,0xFE,0xE4,0x35,0x28,0xFD,0xE4,0x35,0x27,0xFC, //02F0
|
||||
C51 COMPILER V9.01 BOOTIAP 02/07/2025 10:36:16 PAGE 2
|
||||
C51 COMPILER V9.01 BOOTIAP 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
53 0xAB,0x0E,0xAA,0x0D,0xA9,0x0C,0xA8,0x0B,0xC3,0x12,0x07,0x18,0x40,0x40,0xE4,0x25, //0300
|
||||
54 0x2A,0xFB,0xE5,0x29,0x34,0x0C,0xFA,0xE4,0x35,0x28,0xF9,0xE4,0x35,0x27,0xF8,0xC3, //0310
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 0x40,0x04,0xEB,0x99,0xFB,0x0F,0xD8,0xE5,0xE4,0xF9,0xFA,0x22,0x78,0x18,0xEF,0x2F, //06B0
|
||||
113 0xFF,0xEE,0x33,0xFE,0xED,0x33,0xFD,0xEC,0x33,0xFC,0xC9,0x33,0xC9,0x10,0xD7,0x05, //06C0
|
||||
114 0x9B,0xE9,0x9A,0x40,0x07,0xEC,0x9B,0xFC,0xE9,0x9A,0xF9,0x0F,0xD8,0xE0,0xE4,0xC9, //06D0
|
||||
C51 COMPILER V9.01 BOOTIAP 02/07/2025 10:36:16 PAGE 3
|
||||
C51 COMPILER V9.01 BOOTIAP 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
115 0xFA,0xE4,0xCC,0xFB,0x22,0x75,0xF0,0x10,0xEF,0x2F,0xFF,0xEE,0x33,0xFE,0xED,0x33, //06E0
|
||||
116 0xFD,0xCC,0x33,0xCC,0xC8,0x33,0xC8,0x10,0xD7,0x07,0x9B,0xEC,0x9A,0xE8,0x99,0x40, //06F0
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 0x25,0x2B,0xF5,0x82,0xE4,0x34,0x02,0xF5,0x83,0xE0,0xF5,0x99,0x22,0xE4,0xF5,0x2B, //0A90
|
||||
175 0x90,0x02,0x02,0xE0,0xFD,0x24,0x08,0xF5,0x82,0xE4,0x34,0x02,0xF5,0x83,0xE0,0xFE, //0AA0
|
||||
176 0x74,0x07,0x2D,0xF5,0x82,0xE4,0x34,0x02,0xF5,0x83,0xE0,0x7C,0x00,0x24,0x00,0xFF, //0AB0
|
||||
C51 COMPILER V9.01 BOOTIAP 02/07/2025 10:36:16 PAGE 4
|
||||
C51 COMPILER V9.01 BOOTIAP 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
177 0xEC,0x3E,0xFE,0xEF,0x65,0x32,0x70,0x03,0xEE,0x65,0x31,0x60,0x03,0x43,0x22,0x80, //0AC0
|
||||
178 0xE5,0x22,0x60,0x06,0x90,0x02,0x06,0xF0,0x80,0x38,0x90,0x02,0x05,0xE0,0xFE,0xB4, //0AD0
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
236 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //0E70
|
||||
237 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //0E80
|
||||
238 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //0E90
|
||||
C51 COMPILER V9.01 BOOTIAP 02/07/2025 10:36:16 PAGE 5
|
||||
C51 COMPILER V9.01 BOOTIAP 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
239 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //0EA0
|
||||
240 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //0EB0
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE CALCULATE
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
49 2 if(Tempcalcu > NTC103AT[i])
|
||||
50 2 {
|
||||
51 3 for(i=ucTempeMiddle-1; i>=0; i--)
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
52 3 {
|
||||
53 4 if(Tempcalcu <= NTC103AT[i]) //NTC103AT[i+1]<resis<NTC103AT[i]
|
||||
|
@ -83,450 +83,453 @@ line level source
|
|||
68 3 i--;
|
||||
69 3 }
|
||||
70 2 ucTempeMiddle = i;
|
||||
71 2
|
||||
72 2 Temperature = (U16)(ucTempeMiddle-50)*10+(NTC103AT[i]-Tempcalcu)*10/(NTC103AT[i]-NTC103AT[i+1])+2731;
|
||||
73 2 }
|
||||
74 1 return Temperature;
|
||||
75 1 }
|
||||
76
|
||||
77
|
||||
78 /*************************************************************************************************
|
||||
79 * 函数名: AfeGetVol、AfeGetTempe
|
||||
80 * 参 数: 无
|
||||
81 * 返回值: 无
|
||||
82 * 描 述: 从AFE读取电压、温度采集数据
|
||||
83 *************************************************************************************************/
|
||||
84 BOOL AfeGetVol(void)
|
||||
85 {
|
||||
86 1 U8 i;
|
||||
87 1 BOOL Result=1;
|
||||
88 1
|
||||
89 1 for(i=ucCellNumOffset; i<(ucCellNum+ucCellNumOffset); i++)
|
||||
90 1 {
|
||||
91 2 if(!AFEReadReg(AFE_CELL1H+2*i, 2, (U8 xdata *)(&AFE.uiCell[i]))) //通过TWI读取VADC采集的电压值()
|
||||
92 2 {
|
||||
93 3 Result = 0;
|
||||
94 3 return Result;
|
||||
95 3 }
|
||||
96 2 }
|
||||
97 1
|
||||
98 1 return Result;
|
||||
99 1 }
|
||||
100
|
||||
101 BOOL AfeGetTempe(void)
|
||||
102 {
|
||||
103 1 BOOL Result=1;
|
||||
104 1
|
||||
105 1 if(!AFEReadReg(AFE_TS1H, 2, (U8 xdata *)&AFE.uiTS[0]))
|
||||
106 1 {
|
||||
107 2 Result = 0;
|
||||
108 2 }
|
||||
109 1 if(!AFEReadReg(AFE_TS2H, 2, (U8 xdata *)&AFE.uiTS[1]))
|
||||
110 1 {
|
||||
111 2 Result = 0;
|
||||
112 2 }
|
||||
113 1
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 3
|
||||
71 2 #if NTC_SL //SL热敏电阻
|
||||
72 2 Temperature = (U16)(ucTempeMiddle-20)*10+(NTC103AT[i]-Tempcalcu)*10/(NTC103AT[i]-NTC103AT[i+1])+2731;
|
||||
73 2 #else
|
||||
Temperature = (U16)(ucTempeMiddle-50)*10+(NTC103AT[i]-Tempcalcu)*10/(NTC103AT[i]-NTC103AT[i+1])+2731;
|
||||
#endif
|
||||
76 2 }
|
||||
77 1 return Temperature;
|
||||
78 1 }
|
||||
79
|
||||
80
|
||||
81 /*************************************************************************************************
|
||||
82 * 函数名: AfeGetVol、AfeGetTempe
|
||||
83 * 参 数: 无
|
||||
84 * 返回值: 无
|
||||
85 * 描 述: 从AFE读取电压、温度采集数据
|
||||
86 *************************************************************************************************/
|
||||
87 BOOL AfeGetVol(void)
|
||||
88 {
|
||||
89 1 U8 i;
|
||||
90 1 BOOL Result=1;
|
||||
91 1
|
||||
92 1 for(i=ucCellNumOffset; i<(ucCellNum+ucCellNumOffset); i++)
|
||||
93 1 {
|
||||
94 2 if(!AFEReadReg(AFE_CELL1H+2*i, 2, (U8 xdata *)(&AFE.uiCell[i]))) //通过TWI读取VADC采集的电压值()
|
||||
95 2 {
|
||||
96 3 Result = 0;
|
||||
97 3 return Result;
|
||||
98 3 }
|
||||
99 2 }
|
||||
100 1
|
||||
101 1 return Result;
|
||||
102 1 }
|
||||
103
|
||||
104 BOOL AfeGetTempe(void)
|
||||
105 {
|
||||
106 1 BOOL Result=1;
|
||||
107 1
|
||||
108 1 if(!AFEReadReg(AFE_TS1H, 2, (U8 xdata *)&AFE.uiTS[0]))
|
||||
109 1 {
|
||||
110 2 Result = 0;
|
||||
111 2 }
|
||||
112 1 if(!AFEReadReg(AFE_TS2H, 2, (U8 xdata *)&AFE.uiTS[1]))
|
||||
113 1 {
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
114 1 if(!AFEReadReg(AFE_TEMP1H, 2, (U8 xdata *)&AFE.uiICTempe[0]))
|
||||
115 1 {
|
||||
116 2 Result = 0;
|
||||
117 2 }
|
||||
118 1 if(ucCellNum > 5) //6~10串应用时
|
||||
119 1 {
|
||||
120 2 if(!AFEReadReg(AFE_TEMP2H, 2, (U8 xdata *)&AFE.uiICTempe[1]))
|
||||
121 2 {
|
||||
122 3 Result = 0;
|
||||
123 3 }
|
||||
124 2 }
|
||||
125 1
|
||||
126 1 return Result;
|
||||
127 1 }
|
||||
128
|
||||
129
|
||||
130 /*************************************************************************************************
|
||||
131 * 函数名: AfeCalcuTempe
|
||||
132 * 参 数: 无
|
||||
133 * 返回值: 无
|
||||
134 * 描 述: 计算温度,更新uiTempeMax、uiTempeMin
|
||||
135 *************************************************************************************************/
|
||||
136 void AfeCalcuTempe(void)
|
||||
137 {
|
||||
138 1 U16 TempeData;
|
||||
139 1
|
||||
140 1 if(AfeGetTempe())
|
||||
141 1 {
|
||||
142 2 TempeData = CalcuTemp(AFE.uiTS[0]) + E2siTS0Offset; //计算外部温度1
|
||||
143 2 #if (UART0_DEFINE != 0)
|
||||
144 2 IrqUart0Dis();
|
||||
145 2 #endif
|
||||
146 2 #if (UART1_DEFINE != 0)
|
||||
114 2 Result = 0;
|
||||
115 2 }
|
||||
116 1
|
||||
117 1 if(!AFEReadReg(AFE_TEMP1H, 2, (U8 xdata *)&AFE.uiICTempe[0]))
|
||||
118 1 {
|
||||
119 2 Result = 0;
|
||||
120 2 }
|
||||
121 1 if(ucCellNum > 5) //6~10串应用时
|
||||
122 1 {
|
||||
123 2 if(!AFEReadReg(AFE_TEMP2H, 2, (U8 xdata *)&AFE.uiICTempe[1]))
|
||||
124 2 {
|
||||
125 3 Result = 0;
|
||||
126 3 }
|
||||
127 2 }
|
||||
128 1
|
||||
129 1 return Result;
|
||||
130 1 }
|
||||
131
|
||||
132
|
||||
133 /*************************************************************************************************
|
||||
134 * 函数名: AfeCalcuTempe
|
||||
135 * 参 数: 无
|
||||
136 * 返回值: 无
|
||||
137 * 描 述: 计算温度,更新uiTempeMax、uiTempeMin
|
||||
138 *************************************************************************************************/
|
||||
139 void AfeCalcuTempe(void)
|
||||
140 {
|
||||
141 1 U16 TempeData;
|
||||
142 1
|
||||
143 1 if(AfeGetTempe())
|
||||
144 1 {
|
||||
145 2 TempeData = CalcuTemp(AFE.uiTS[0]) + E2siTS0Offset; //计算外部温度1
|
||||
146 2 #if (UART0_DEFINE != 0)
|
||||
147 2 IrqUart0Dis();
|
||||
148 2 #endif
|
||||
149 2 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
149 2 #if (UART2_DEFINE != 0)
|
||||
152 2 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
152 2 Info.uiTS[0] = TempeData;
|
||||
153 2 #if (UART0_DEFINE != 0)
|
||||
154 2 IrqUart0En(); //开启uart0中断
|
||||
155 2 #endif
|
||||
156 2 #if (UART1_DEFINE != 0)
|
||||
155 2 Info.uiTS[0] = TempeData;
|
||||
156 2 #if (UART0_DEFINE != 0)
|
||||
157 2 IrqUart0En(); //开启uart0中断
|
||||
158 2 #endif
|
||||
159 2 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
159 2 #if (UART2_DEFINE != 0)
|
||||
162 2 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
162 2 TempeData = (U32)AFE.uiICTempe[0]*17/10+31; //计算内部温度1
|
||||
163 2 #if (UART0_DEFINE != 0)
|
||||
164 2 IrqUart0Dis();
|
||||
165 2 #endif
|
||||
166 2 #if (UART1_DEFINE != 0)
|
||||
165 2 TempeData = (U32)AFE.uiICTempe[0]*17/10+31; //计算内部温度1
|
||||
166 2 #if (UART0_DEFINE != 0)
|
||||
167 2 IrqUart0Dis();
|
||||
168 2 #endif
|
||||
169 2 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
169 2 #if (UART2_DEFINE != 0)
|
||||
172 2 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
172 2 Info.uiICTempe[0] = TempeData;
|
||||
173 2
|
||||
174 2 #if (UART0_DEFINE != 0)
|
||||
175 2 IrqUart0En(); //开启uart0中断
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 4
|
||||
175 2 Info.uiICTempe[0] = TempeData;
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
176 2 #endif
|
||||
177 2 #if (UART1_DEFINE != 0)
|
||||
176 2
|
||||
177 2 #if (UART0_DEFINE != 0)
|
||||
178 2 IrqUart0En(); //开启uart0中断
|
||||
179 2 #endif
|
||||
180 2 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
180 2 #if (UART2_DEFINE != 0)
|
||||
183 2 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
183 2
|
||||
184 2 if(ucCellNum > 5) //6~10串应用时
|
||||
185 2 {
|
||||
186 3 TempeData = (U32)AFE.uiICTempe[1]*17/10+31; //计算内部温度2
|
||||
187 3 #if (UART0_DEFINE != 0)
|
||||
188 3 IrqUart0Dis();
|
||||
189 3 #endif
|
||||
190 3 #if (UART1_DEFINE != 0)
|
||||
186 2
|
||||
187 2 if(ucCellNum > 5) //6~10串应用时
|
||||
188 2 {
|
||||
189 3 TempeData = (U32)AFE.uiICTempe[1]*17/10+31; //计算内部温度2
|
||||
190 3 #if (UART0_DEFINE != 0)
|
||||
191 3 IrqUart0Dis();
|
||||
192 3 #endif
|
||||
193 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
193 3 #if (UART2_DEFINE != 0)
|
||||
196 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
196 3 Info.uiICTempe[1] = TempeData;
|
||||
197 3 #if (UART0_DEFINE != 0)
|
||||
198 3 IrqUart0En(); //开启uart0中断
|
||||
199 3 #endif
|
||||
200 3 #if (UART1_DEFINE != 0)
|
||||
199 3 Info.uiICTempe[1] = TempeData;
|
||||
200 3 #if (UART0_DEFINE != 0)
|
||||
201 3 IrqUart0En(); //开启uart0中断
|
||||
202 3 #endif
|
||||
203 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
203 3 #if (UART2_DEFINE != 0)
|
||||
206 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
206 3 }
|
||||
207 2
|
||||
208 2 uiTempeMin = Info.uiTS[0];
|
||||
209 2 uiTempeMax = Info.uiTS[0];
|
||||
210 2 if(bTempNum)
|
||||
211 2 {
|
||||
212 3 TempeData = CalcuTemp(AFE.uiTS[1]) + E2siTS1Offset; //计算外部温度2
|
||||
213 3 #if (UART0_DEFINE != 0)
|
||||
214 3 IrqUart0Dis();
|
||||
215 3 #endif
|
||||
216 3 #if (UART1_DEFINE != 0)
|
||||
209 3 }
|
||||
210 2
|
||||
211 2 uiTempeMin = Info.uiTS[0];
|
||||
212 2 uiTempeMax = Info.uiTS[0];
|
||||
213 2 if(bTempNum)
|
||||
214 2 {
|
||||
215 3 TempeData = CalcuTemp(AFE.uiTS[1]) + E2siTS1Offset; //计算外部温度2
|
||||
216 3 #if (UART0_DEFINE != 0)
|
||||
217 3 IrqUart0Dis();
|
||||
218 3 #endif
|
||||
219 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
219 3 #if (UART2_DEFINE != 0)
|
||||
222 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
222 3 Info.uiTS[1] = TempeData;
|
||||
223 3 #if (UART0_DEFINE != 0)
|
||||
224 3 IrqUart0En(); //开启uart0中断
|
||||
225 3 #endif
|
||||
226 3 #if (UART1_DEFINE != 0)
|
||||
225 3 Info.uiTS[1] = TempeData;
|
||||
226 3 #if (UART0_DEFINE != 0)
|
||||
227 3 IrqUart0En(); //开启uart0中断
|
||||
228 3 #endif
|
||||
229 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
229 3 #if (UART2_DEFINE != 0)
|
||||
232 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
232 3
|
||||
233 3 if(TempeData < uiTempeMin)
|
||||
234 3 {
|
||||
235 4 uiTempeMin = TempeData;
|
||||
236 4 }
|
||||
237 3 else
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 5
|
||||
235 3
|
||||
236 3 if(TempeData < uiTempeMin)
|
||||
237 3 {
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
238 3 {
|
||||
239 4 uiTempeMax = TempeData;
|
||||
240 4 }
|
||||
241 3 }
|
||||
242 2 }
|
||||
243 1 }
|
||||
244
|
||||
245
|
||||
246 /*************************************************************************************************
|
||||
247 * 函数名: AfeCalcuVol
|
||||
248 * 参 数: 无
|
||||
249 * 返回值: 无
|
||||
250 * 描 述: 计算电压,同步更新最大值最小值uiVadcVmax、uiVadcVmin,用于断线判断
|
||||
251 当没有平衡时,才更新uiCellVmax、uiCellVmin,用于保护判断
|
||||
252 *************************************************************************************************/
|
||||
253 void AfeCalcuVol(void)
|
||||
254 {
|
||||
255 1 U8 i;
|
||||
256 1 U32 TempPackVol=0, TempCellVol=0;
|
||||
257 1 uiVadcVmax = 0;
|
||||
258 1 uiVadcVmin = 6000;
|
||||
259 1
|
||||
260 1 if(AfeGetVol())
|
||||
261 1 {
|
||||
262 2 for(i=ucCellNumOffset; i<(ucCellNum+ucCellNumOffset); i++)
|
||||
263 2 {
|
||||
264 3 TempCellVol = (U32)AFE.uiCell[i]*CALIVOL/E2uiVPackGain;
|
||||
265 3
|
||||
266 3 if(TempCellVol > uiVadcVmax) //计算最大值&最小值
|
||||
267 3 {
|
||||
268 4 uiVadcVmax = TempCellVol;
|
||||
269 4 }
|
||||
270 3 if(TempCellVol < uiVadcVmin)
|
||||
271 3 {
|
||||
272 4 uiVadcVmin = TempCellVol;
|
||||
273 4 }
|
||||
274 3
|
||||
275 3 if(!bBalancingFlg) //if bCellOpenDecFlag this data will throw away
|
||||
276 3 {
|
||||
277 4 #if (UART0_DEFINE != 0)
|
||||
278 4 IrqUart0Dis();
|
||||
279 4 #endif
|
||||
280 4 #if (UART1_DEFINE != 0)
|
||||
238 4 uiTempeMin = TempeData;
|
||||
239 4 }
|
||||
240 3 else
|
||||
241 3 {
|
||||
242 4 uiTempeMax = TempeData;
|
||||
243 4 }
|
||||
244 3 }
|
||||
245 2 }
|
||||
246 1 }
|
||||
247
|
||||
248
|
||||
249 /*************************************************************************************************
|
||||
250 * 函数名: AfeCalcuVol
|
||||
251 * 参 数: 无
|
||||
252 * 返回值: 无
|
||||
253 * 描 述: 计算电压,同步更新最大值最小值uiVadcVmax、uiVadcVmin,用于断线判断
|
||||
254 当没有平衡时,才更新uiCellVmax、uiCellVmin,用于保护判断
|
||||
255 *************************************************************************************************/
|
||||
256 void AfeCalcuVol(void)
|
||||
257 {
|
||||
258 1 U8 i;
|
||||
259 1 U32 TempPackVol=0, TempCellVol=0;
|
||||
260 1 uiVadcVmax = 0;
|
||||
261 1 uiVadcVmin = 6000;
|
||||
262 1
|
||||
263 1 if(AfeGetVol())
|
||||
264 1 {
|
||||
265 2 for(i=ucCellNumOffset; i<(ucCellNum+ucCellNumOffset); i++)
|
||||
266 2 {
|
||||
267 3 TempCellVol = (U32)AFE.uiCell[i]*CALIVOL/E2uiVPackGain;
|
||||
268 3
|
||||
269 3 if(TempCellVol > uiVadcVmax) //计算最大值&最小值
|
||||
270 3 {
|
||||
271 4 uiVadcVmax = TempCellVol;
|
||||
272 4 }
|
||||
273 3 if(TempCellVol < uiVadcVmin)
|
||||
274 3 {
|
||||
275 4 uiVadcVmin = TempCellVol;
|
||||
276 4 }
|
||||
277 3
|
||||
278 3 if(!bBalancingFlg) //if bCellOpenDecFlag this data will throw away
|
||||
279 3 {
|
||||
280 4 #if (UART0_DEFINE != 0)
|
||||
281 4 IrqUart0Dis();
|
||||
282 4 #endif
|
||||
283 4 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
283 4 #if (UART2_DEFINE != 0)
|
||||
286 4 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
286 4 Info.uiVCell[i] = TempCellVol;
|
||||
287 4 #if (UART0_DEFINE != 0)
|
||||
288 4 IrqUart0En(); //开启uart0中断
|
||||
289 4 #endif
|
||||
290 4 #if (UART1_DEFINE != 0)
|
||||
289 4 Info.uiVCell[i] = TempCellVol;
|
||||
290 4 #if (UART0_DEFINE != 0)
|
||||
291 4 IrqUart0En(); //开启uart0中断
|
||||
292 4 #endif
|
||||
293 4 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
293 4 #if (UART2_DEFINE != 0)
|
||||
296 4 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
296 4 TempPackVol += TempCellVol;
|
||||
297 4 }
|
||||
298 3 }
|
||||
299 2
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 6
|
||||
299 4 TempPackVol += TempCellVol;
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
300 2 if(!bBalancingFlg)
|
||||
301 2 {
|
||||
302 3 uiCellVmax = uiVadcVmax;
|
||||
303 3 uiCellVmin = uiVadcVmin;
|
||||
304 3
|
||||
305 3 #if (UART0_DEFINE != 0)
|
||||
306 3 IrqUart0Dis();
|
||||
307 3 #endif
|
||||
308 3 #if (UART1_DEFINE != 0)
|
||||
300 4 }
|
||||
301 3 }
|
||||
302 2
|
||||
303 2 if(!bBalancingFlg)
|
||||
304 2 {
|
||||
305 3 uiCellVmax = uiVadcVmax;
|
||||
306 3 uiCellVmin = uiVadcVmin;
|
||||
307 3
|
||||
308 3 #if (UART0_DEFINE != 0)
|
||||
309 3 IrqUart0Dis();
|
||||
310 3 #endif
|
||||
311 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
311 3 #if (UART2_DEFINE != 0)
|
||||
314 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
314 3 Info.ulVoltage = TempPackVol; //Calculate the total voltage
|
||||
315 3 #if (UART0_DEFINE != 0)
|
||||
316 3 IrqUart0En(); //开启uart0中断
|
||||
317 3 #endif
|
||||
318 3 #if (UART1_DEFINE != 0)
|
||||
317 3 Info.ulVoltage = TempPackVol; //Calculate the total voltage
|
||||
318 3 #if (UART0_DEFINE != 0)
|
||||
319 3 IrqUart0En(); //开启uart0中断
|
||||
320 3 #endif
|
||||
321 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
321 3 #if (UART2_DEFINE != 0)
|
||||
324 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
324 3 }
|
||||
325 2 }
|
||||
326 1 }
|
||||
327
|
||||
328
|
||||
329 /*************************************************************************************************
|
||||
330 * 函数名: CurTempOffset
|
||||
331 * 参 数: 无
|
||||
332 * 返回值: 无
|
||||
333 * 描 述: 不同芯片温度下ADC的补偿值
|
||||
334 *************************************************************************************************/
|
||||
335 S16 code siCurTempOffset[2][13]=
|
||||
336 { /**0****1****2****3***4***5***6***7***8***9**10**11**12**/
|
||||
337 {-40, -30, -20, -10, 0, 10, 25, 35, 45, 55, 65, 75, 85},
|
||||
338 { -5, -4, -3, -2, -1, -1, 0, 1, 1, 2, 3, 4, 5},
|
||||
339 };
|
||||
340
|
||||
341 /*************************************************************************************************
|
||||
342 * 函数名: OffsetCalculate()
|
||||
343 * 参 数: 无
|
||||
344 * 返回值: 无
|
||||
345 * 描 述: 根据芯片内部温度实时调整0电流补偿值,以便消除温度对ADC采集产生的影响
|
||||
346 *************************************************************************************************/
|
||||
347 S16 OffsetCalculate(void)
|
||||
348 {
|
||||
349 1 S16 xdata siCadcTempOffset=0; //20220620
|
||||
350 1 U8 xdata i;
|
||||
351 1
|
||||
352 1 for(i=0; i<12; i++)
|
||||
353 1 {
|
||||
354 2 if(Info.uiICTempe[0] <= (((S32)siCurTempOffset[0][i] + siCurTempOffset[0][i+1]) / 2 * 10 + 2731))
|
||||
355 2 {
|
||||
356 3 siCadcTempOffset = siCurTempOffset[1][i];
|
||||
357 3 break;
|
||||
358 3 }
|
||||
359 2 }
|
||||
360 1 return siCadcTempOffset;
|
||||
361 1 }
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 7
|
||||
327 3 }
|
||||
328 2 }
|
||||
329 1 }
|
||||
330
|
||||
331
|
||||
332 /*************************************************************************************************
|
||||
333 * 函数名: CurTempOffset
|
||||
334 * 参 数: 无
|
||||
335 * 返回值: 无
|
||||
336 * 描 述: 不同芯片温度下ADC的补偿值
|
||||
337 *************************************************************************************************/
|
||||
338 S16 code siCurTempOffset[2][13]=
|
||||
339 { /**0****1****2****3***4***5***6***7***8***9**10**11**12**/
|
||||
340 {-40, -30, -20, -10, 0, 10, 25, 35, 45, 55, 65, 75, 85},
|
||||
341 { -5, -4, -3, -2, -1, -1, 0, 1, 1, 2, 3, 4, 5},
|
||||
342 };
|
||||
343
|
||||
344 /*************************************************************************************************
|
||||
345 * 函数名: OffsetCalculate()
|
||||
346 * 参 数: 无
|
||||
347 * 返回值: 无
|
||||
348 * 描 述: 根据芯片内部温度实时调整0电流补偿值,以便消除温度对ADC采集产生的影响
|
||||
349 *************************************************************************************************/
|
||||
350 S16 OffsetCalculate(void)
|
||||
351 {
|
||||
352 1 S16 xdata siCadcTempOffset=0; //20220620
|
||||
353 1 U8 xdata i;
|
||||
354 1
|
||||
355 1 for(i=0; i<12; i++)
|
||||
356 1 {
|
||||
357 2 if(Info.uiICTempe[0] <= (((S32)siCurTempOffset[0][i] + siCurTempOffset[0][i+1]) / 2 * 10 + 2731))
|
||||
358 2 {
|
||||
359 3 siCadcTempOffset = siCurTempOffset[1][i];
|
||||
360 3 break;
|
||||
361 3 }
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 7
|
||||
|
||||
362
|
||||
363 /*************************************************************************************************
|
||||
364 * 函数名: AfeCalcuCurr
|
||||
365 * 参 数: 无
|
||||
366 * 返回值: 无
|
||||
367 * 描 述: 计算CADC采集的电流数据
|
||||
368 *************************************************************************************************/
|
||||
369 void AfeCalcuCurr(void)
|
||||
370 {
|
||||
371 1 U8 i;
|
||||
372 1 S32 Tempdata=0;
|
||||
373 1
|
||||
374 1 AFEReadReg(AFE_CURH, 2, (U8 xdata *)&AFE.siCurr); //通过TWI读取CADC采集的电流值
|
||||
375 1
|
||||
376 1 if((AFE.siCurr&0x1000) != 0) //根据bit12判断是否为负数(放电电流为负值),如为负值高位补0
|
||||
377 1 {
|
||||
378 2 AFE.siCurr|=0xE000;
|
||||
379 2 }
|
||||
380 1 slCadcCurrent = (S32)CALICUR*(AFE.siCurr-E2siCadcOffset+OffsetCalculate())/E2siCadcGain;
|
||||
381 1
|
||||
382 1 slCadcCurBuf[ucCadcCnt] = slCadcCurrent; //对连续采集的16次电流取平均值,作为当前电流值
|
||||
383 1 if(++ucCadcCnt >= 16)
|
||||
384 1 {
|
||||
385 2 ucCadcCnt = 0;
|
||||
386 2 }
|
||||
387 1 for(i=0; i<16; i++)
|
||||
388 1 {
|
||||
389 2 Tempdata += slCadcCurBuf[i];
|
||||
390 2 }
|
||||
391 1 slCadcCurAverage = Tempdata/16;
|
||||
392 1
|
||||
393 1 bDSGING = 0; //根据电流判定充放电状态
|
||||
394 1 bCHGING = 0;
|
||||
395 1 if(slCadcCurAverage < (-E2siDfilterCur))
|
||||
396 1 {
|
||||
397 2 if(++ucDsgingCheckCnt >= TIME_50MS_500MS) //充放电状态检测延时10*50mS
|
||||
398 2 {
|
||||
399 3 ucDsgingCheckCnt = TIME_50MS_500MS;
|
||||
400 3 bDSGING = 1;
|
||||
401 3 #if (UART0_DEFINE != 0)
|
||||
402 3 IrqUart0Dis();
|
||||
403 3 #endif
|
||||
404 3 #if (UART1_DEFINE != 0)
|
||||
362 2 }
|
||||
363 1 return siCadcTempOffset;
|
||||
364 1 }
|
||||
365
|
||||
366 /*************************************************************************************************
|
||||
367 * 函数名: AfeCalcuCurr
|
||||
368 * 参 数: 无
|
||||
369 * 返回值: 无
|
||||
370 * 描 述: 计算CADC采集的电流数据
|
||||
371 *************************************************************************************************/
|
||||
372 void AfeCalcuCurr(void)
|
||||
373 {
|
||||
374 1 U8 i;
|
||||
375 1 S32 Tempdata=0;
|
||||
376 1
|
||||
377 1 AFEReadReg(AFE_CURH, 2, (U8 xdata *)&AFE.siCurr); //通过TWI读取CADC采集的电流值
|
||||
378 1
|
||||
379 1 if((AFE.siCurr&0x1000) != 0) //根据bit12判断是否为负数(放电电流为负值),如为负值高位补0
|
||||
380 1 {
|
||||
381 2 AFE.siCurr|=0xE000;
|
||||
382 2 }
|
||||
383 1 slCadcCurrent = (S32)CALICUR*(AFE.siCurr-E2siCadcOffset+OffsetCalculate())/E2siCadcGain;
|
||||
384 1
|
||||
385 1 slCadcCurBuf[ucCadcCnt] = slCadcCurrent; //对连续采集的16次电流取平均值,作为当前电流值
|
||||
386 1 if(++ucCadcCnt >= 16)
|
||||
387 1 {
|
||||
388 2 ucCadcCnt = 0;
|
||||
389 2 }
|
||||
390 1 for(i=0; i<16; i++)
|
||||
391 1 {
|
||||
392 2 Tempdata += slCadcCurBuf[i];
|
||||
393 2 }
|
||||
394 1 slCadcCurAverage = Tempdata/16;
|
||||
395 1
|
||||
396 1 bDSGING = 0; //根据电流判定充放电状态
|
||||
397 1 bCHGING = 0;
|
||||
398 1 if(slCadcCurAverage < (-E2siDfilterCur))
|
||||
399 1 {
|
||||
400 2 if(++ucDsgingCheckCnt >= TIME_50MS_500MS) //充放电状态检测延时10*50mS
|
||||
401 2 {
|
||||
402 3 ucDsgingCheckCnt = TIME_50MS_500MS;
|
||||
403 3 bDSGING = 1;
|
||||
404 3 #if (UART0_DEFINE != 0)
|
||||
405 3 IrqUart0Dis();
|
||||
406 3 #endif
|
||||
407 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
407 3 #if (UART2_DEFINE != 0)
|
||||
410 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
410 3 Info.slCurr = slCadcCurAverage;
|
||||
411 3 #if (UART0_DEFINE != 0)
|
||||
412 3 IrqUart0En(); //开启uart0中断
|
||||
413 3 #endif
|
||||
414 3 #if (UART1_DEFINE != 0)
|
||||
413 3 Info.slCurr = slCadcCurAverage;
|
||||
414 3 #if (UART0_DEFINE != 0)
|
||||
415 3 IrqUart0En(); //开启uart0中断
|
||||
416 3 #endif
|
||||
417 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
417 3 #if (UART2_DEFINE != 0)
|
||||
420 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
420 3 }
|
||||
421 2 }
|
||||
422 1 else if(slCadcCurAverage > E2siDfilterCur)
|
||||
423 1 {
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 8
|
||||
423 3 }
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 8
|
||||
|
||||
424 2 if(++ucChgingCheckCnt >= TIME_50MS_500MS) //充放电状态检测延时10*50mS
|
||||
425 2 {
|
||||
426 3 ucChgingCheckCnt = TIME_50MS_500MS;
|
||||
427 3 bCHGING = 1;
|
||||
428 3 McuPWM2Set(4000, 100);
|
||||
429 3 #if (UART0_DEFINE != 0)
|
||||
430 3 IrqUart0Dis();
|
||||
431 3 #endif
|
||||
432 3 #if (UART1_DEFINE != 0)
|
||||
424 2 }
|
||||
425 1 else if(slCadcCurAverage > E2siDfilterCur)
|
||||
426 1 {
|
||||
427 2 if(++ucChgingCheckCnt >= TIME_50MS_500MS) //充放电状态检测延时10*50mS
|
||||
428 2 {
|
||||
429 3 ucChgingCheckCnt = TIME_50MS_500MS;
|
||||
430 3 bCHGING = 1;
|
||||
431 3 McuPWM2Set(4000, 100);
|
||||
432 3 #if (UART0_DEFINE != 0)
|
||||
433 3 IrqUart0Dis();
|
||||
434 3 #endif
|
||||
435 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
435 3 #if (UART2_DEFINE != 0)
|
||||
438 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
438 3 Info.slCurr = slCadcCurAverage;
|
||||
439 3 #if (UART0_DEFINE != 0)
|
||||
440 3 IrqUart0En(); //开启uart0中断
|
||||
441 3 #endif
|
||||
442 3 #if (UART1_DEFINE != 0)
|
||||
441 3 Info.slCurr = slCadcCurAverage;
|
||||
442 3 #if (UART0_DEFINE != 0)
|
||||
443 3 IrqUart0En(); //开启uart0中断
|
||||
444 3 #endif
|
||||
445 3 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
445 3 #if (UART2_DEFINE != 0)
|
||||
448 3 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
448 3 }
|
||||
449 2 }
|
||||
450 1 else
|
||||
451 1 {
|
||||
452 2 #if (UART0_DEFINE != 0)
|
||||
453 2 IrqUart0Dis();
|
||||
454 2 #endif
|
||||
455 2 #if (UART1_DEFINE != 0)
|
||||
451 3 }
|
||||
452 2 }
|
||||
453 1 else
|
||||
454 1 {
|
||||
455 2 #if (UART0_DEFINE != 0)
|
||||
456 2 IrqUart0Dis();
|
||||
457 2 #endif
|
||||
458 2 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
458 2 #if (UART2_DEFINE != 0)
|
||||
461 2 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
#endif
|
||||
461 2 Info.slCurr = 0;
|
||||
462 2 #if (UART0_DEFINE != 0)
|
||||
463 2 IrqUart0En(); //开启uart0中断
|
||||
464 2 #endif
|
||||
465 2 #if (UART1_DEFINE != 0)
|
||||
464 2 Info.slCurr = 0;
|
||||
465 2 #if (UART0_DEFINE != 0)
|
||||
466 2 IrqUart0En(); //开启uart0中断
|
||||
467 2 #endif
|
||||
468 2 #if (UART1_DEFINE != 0)
|
||||
IrqUart1En(); //开启uart1中断
|
||||
#endif
|
||||
468 2 #if (UART2_DEFINE != 0)
|
||||
471 2 #if (UART2_DEFINE != 0)
|
||||
IrqUart2En(); //初始化UART2中断使能,根据具体使用UART模块来进行选择
|
||||
#endif
|
||||
471 2 }
|
||||
472 1 }
|
||||
473
|
||||
474
|
||||
475 /*************************************************************************************************
|
||||
476 * 函数名: AFEInfoProcess
|
||||
477 * 参 数: 无
|
||||
478 * 返回值: 无
|
||||
479 * 描 述: 每50mS读取AFE信息,并更新电压、电流、温度数据
|
||||
480 *************************************************************************************************/
|
||||
481 void AFEInfoProcess(void)
|
||||
482 {
|
||||
483 1 AFERdFlg();
|
||||
484 1
|
||||
485 1 bVADCFlg = 0;
|
||||
C51 COMPILER V9.01 CALCULATE 02/07/2025 10:36:15 PAGE 9
|
||||
474 2 }
|
||||
475 1 }
|
||||
476
|
||||
477
|
||||
478 /*************************************************************************************************
|
||||
479 * 函数名: AFEInfoProcess
|
||||
480 * 参 数: 无
|
||||
481 * 返回值: 无
|
||||
482 * 描 述: 每50mS读取AFE信息,并更新电压、电流、温度数据
|
||||
483 *************************************************************************************************/
|
||||
484 void AFEInfoProcess(void)
|
||||
485 {
|
||||
C51 COMPILER V9.01 CALCULATE 02/08/2025 15:18:20 PAGE 9
|
||||
|
||||
486 1 AfeCalcuVol();
|
||||
487 1 AfeCalcuTempe();
|
||||
488 1
|
||||
489 1 if(bCADCFlg) //当CADC转换完成后,才读取AFE电流信息并计算
|
||||
490 1 {
|
||||
491 2 bCADCFlg = 0;
|
||||
492 2 AfeCalcuCurr();
|
||||
493 2 }
|
||||
494 1 }
|
||||
495
|
||||
496
|
||||
486 1 AFERdFlg();
|
||||
487 1
|
||||
488 1 bVADCFlg = 0;
|
||||
489 1 AfeCalcuVol();
|
||||
490 1 AfeCalcuTempe();
|
||||
491 1
|
||||
492 1 if(bCADCFlg) //当CADC转换完成后,才读取AFE电流信息并计算
|
||||
493 1 {
|
||||
494 2 bCADCFlg = 0;
|
||||
495 2 AfeCalcuCurr();
|
||||
496 2 }
|
||||
497 1 }
|
||||
498
|
||||
499
|
||||
|
||||
|
||||
MODULE INFORMATION: STATIC OVERLAYABLE
|
||||
CODE SIZE = 1760 ----
|
||||
CODE SIZE = 1772 ----
|
||||
CONSTANT SIZE = 52 ----
|
||||
XDATA SIZE = 2 25
|
||||
PDATA SIZE = ---- ----
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 CALIBRATE 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 CALIBRATE 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE CALIBRATE
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 1 TempGain = (S32)CALICUR*(AFE.siCurr-E2siCadcOffset)/slExtCur;
|
||||
51 1 if(TempGain != 0)
|
||||
52 1 {
|
||||
C51 COMPILER V9.01 CALIBRATE 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 CALIBRATE 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 2 E2siCadcGain = TempGain;
|
||||
54 2 }
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 1 RTC.Month = ucExtRTC[4];
|
||||
113 1 RTC.Year = ucExtRTC[5];
|
||||
114 1 RTC.Week = ucExtRTC[6];
|
||||
C51 COMPILER V9.01 CALIBRATE 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 CALIBRATE 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115 1
|
||||
116 1 RTCModifyTime(&RTC);
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174
|
||||
175
|
||||
|
||||
C51 COMPILER V9.01 CALIBRATE 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 CALIBRATE 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
|
||||
MODULE INFORMATION: STATIC OVERLAYABLE
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 CHARGERLOAD 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 CHARGERLOAD 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE CHARGERLOAD
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 4 bOCD2 = 0;
|
||||
51 4 if(bAFE_SC)
|
||||
52 4 {
|
||||
C51 COMPILER V9.01 CHARGERLOAD 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 CHARGERLOAD 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 5 bAFE_SC = 0;
|
||||
54 5 AFEClrFlg(); //헌뇜똬쨌괏빱깃羚
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 1
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE DATAFLASH
|
||||
|
@ -31,7 +31,7 @@ line level source
|
|||
21 // <o> LED显示个数
|
||||
22 #define _EPCM_LED_NUM 0 //BIT11~12; 未调用
|
||||
23 // <o> 电芯串数
|
||||
24 #define _EPCM_CELL_NUM 10 //BIT8~10; µçо´®Êý£¬6~10´®
|
||||
24 #define _EPCM_CELL_NUM 4 //BIT8~10; µçо´®Êý£¬6~10´®
|
||||
25 // <q> 外挂EEPROM备份
|
||||
26 #define _EPCM_EEPROM_EN 0 //BIT7; 0:不使能外挂EE备份功能; 1:使能外挂EE备份功能
|
||||
27 // <q> 放电过流MOS控制
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 // <o>10%容量对应电压
|
||||
51 #define _E2_VOC10 3200 //U16 xdata VOC10
|
||||
52 // <o>20%容量对应电压
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 2
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 2
|
||||
|
||||
53 #define _E2_VOC20 3400 //U16 xdata VOC10
|
||||
54 // <o>30%容量对应电压
|
||||
|
@ -123,10 +123,10 @@ line level source
|
|||
109 // <o>序列号<0x0000-0xffff>
|
||||
110 #define _E2_SerialNum 0x0000 // U16 xdata SerialNum
|
||||
111 // <s.12>设备名称
|
||||
112 #define _E2_DeviceName "SH39F004" // U8 xdata DeviceName[12]
|
||||
112 #define _E2_DeviceName "SH39F003" // U8 xdata DeviceName[12]
|
||||
113 // <s.4>电芯材料
|
||||
114 #define _E2_DeviceChem "LION" // U8 xdata DeviceChem[12]
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 3
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 3
|
||||
|
||||
115 // <o>电芯化学ID<0x0000-0xffff>
|
||||
116 #define _E2_ChemID 0x0000 // U16 xdata ChemID
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 #define _E2_DSG1PWMRatioL 30 // U8 xdata DSG1PWMRatioL
|
||||
175 // <o>PWM高档占空比(%)
|
||||
176 #define _E2_DSG1PWMRatioH 70 // U8 xdata DSG1PWMRatioH
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 4
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 4
|
||||
|
||||
177 #define _E2_ucRamCheckFlg5 _RAM_CHECK_DATA // U8 xdata E2ucRamCheckFlg5
|
||||
178 // </h>
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
236 // <h>AFE参数(SubClassID=0x0A length=4)
|
||||
237 // <o>保护配置
|
||||
238 #define _E2_AFEProtectConfig 0x74 // U8 xdata AFEProtectConfig
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 5
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 5
|
||||
|
||||
239 // <o>硬件过压保护阈值
|
||||
240 #define _E2_AFEOVvol 4400 // U16 xdata AFEOVvol
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
286 unsigned char E2ucChgBKDelay;
|
||||
287 unsigned int E2siChgBKCur;
|
||||
288 unsigned char E2ucRTCBKDelay;
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 6
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 6
|
||||
|
||||
289 unsigned char E2ucRamCheckFlg0;
|
||||
290
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
348 unsigned int TempOTDR;
|
||||
349 unsigned int TempUTD;
|
||||
350 unsigned int TempUTDR;
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 7
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 7
|
||||
|
||||
351 unsigned char E2ucRamCheckFlg7;
|
||||
352
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
408 _E2_VOC30, //U16 xdata VOC30
|
||||
409 _E2_VOC40, //U16 xdata VOC40
|
||||
410 _E2_VOC50, //U16 xdata VOC50
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 8
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 8
|
||||
|
||||
411 _E2_VOC60, //U16 xdata VOC60
|
||||
412 _E2_VOC70, //U16 xdata VOC70
|
||||
|
@ -510,7 +510,7 @@ line level source
|
|||
470 //放电PWM参数区开始 SubClassID=0x05 langth=5
|
||||
471 _E2_DSG1PWMFreq, //U16 xdata DSG1PWMFreq
|
||||
472 _E2_DSG1PWMRatioL, //U8 xdata DSG1PWMRatioL
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 9
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 9
|
||||
|
||||
473 _E2_DSG1PWMRatioH, //U8 xdata DSG1PWMRatioH
|
||||
474 _E2_ucRamCheckFlg5, //U8 xdata E2ucRamCheckFlg5
|
||||
|
@ -574,7 +574,7 @@ line level source
|
|||
530 /*********************************************************************************************************
|
||||
-********/
|
||||
531 //系统信息区开始 SubClassID=0x00 langth=48
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 10
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 10
|
||||
|
||||
532 {
|
||||
533 _E2_PACKCONFIGMAP, //U16 xdata E2uiPackConfigMap
|
||||
|
@ -638,7 +638,7 @@ line level source
|
|||
591 _E2_ucDelayOCD, //U8 xdata E2ucDelayOCD
|
||||
592 _E2_slOCD2vol, //S32 xdata E2slOCD2vol
|
||||
593 _E2_ucDelayOCD2, //U8 xdata E2ucDelayOCD2
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 11
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 11
|
||||
|
||||
594 _E2_ucDelayLoadR, //U8 xdata E2ucDelayLoadR
|
||||
595 _E2_ucRamCheckFlg3, //U8 xdata E2ucRamCheckFlg3
|
||||
|
@ -702,7 +702,7 @@ line level source
|
|||
653 };
|
||||
654
|
||||
655 //*** <<< end of configuration section >>> ***
|
||||
C51 COMPILER V9.01 DATAFLASH 01/23/2025 17:20:39 PAGE 12
|
||||
C51 COMPILER V9.01 DATAFLASH 02/08/2025 14:58:02 PAGE 12
|
||||
|
||||
|
||||
|
||||
|
|
Binary file not shown.
BIN
output/Eeprom
BIN
output/Eeprom
Binary file not shown.
|
@ -1,8 +1,8 @@
|
|||
:1000000033270C800D480DDE0E740ED80F3C0FA068
|
||||
:1000000033210C800D480DDE0E740ED80F3C0FA06E
|
||||
:1000100010041036106800000FA000000FA00000B0
|
||||
:100020000BB800000B410000006414010064055A85
|
||||
:10003000021501300073696E6F7765616C7468003A
|
||||
:100040000020231222000053483339463030340058
|
||||
:100040000020231222000053483339463030330059
|
||||
:100050000000004C494F4E0000000000000000006E
|
||||
:10006000005A109A10360202104000640500000B7E
|
||||
:10007000B802025A0A8C0BB802020B5405FFFFB1FA
|
||||
|
@ -30,11 +30,11 @@
|
|||
:1001D000000000000000000000000000000000001F
|
||||
:1001E000000000000000000000000000000000000F
|
||||
:1001F00000000000000000000000000000005AA500
|
||||
:1002000033270C800D480DDE0E740ED80F3C0FA066
|
||||
:1002000033210C800D480DDE0E740ED80F3C0FA06C
|
||||
:1002100010041036106800000FA000000FA00000AE
|
||||
:100220000BB800000B410000006414010064055A83
|
||||
:10023000021501300073696E6F7765616C74680038
|
||||
:100240000020231222000053483339463030340056
|
||||
:100240000020231222000053483339463030330057
|
||||
:100250000000004C494F4E0000000000000000006C
|
||||
:10026000005A109A10360202104000640500000B7C
|
||||
:10027000B802025A0A8C0BB802020B5405FFFFB1F8
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
BL51 BANKED LINKER/LOCATER V6.22 01/23/2025 17:20:40 PAGE 1
|
||||
BL51 BANKED LINKER/LOCATER V6.22 02/08/2025 14:58:03 PAGE 1
|
||||
|
||||
|
||||
BL51 BANKED LINKER/LOCATER V6.22, INVOKED BY:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE EXTE2PROM
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
49 3 if(++ucE2PTwiRWErrDelayCnt >= TIME_1S_5S)
|
||||
50 3 {
|
||||
51 4 bE2PRErr = 1;
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
52 4 ucE2PTwiRWErrDelayCnt = TIME_1S_5S;
|
||||
53 4 }
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
111 1 if(!bE2PRErr)
|
||||
112 1 {
|
||||
113 2 for(i=0; i<5; i++)
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
114 2 {
|
||||
115 3 #ifdef TWI_Hardware_Module
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
173 1
|
||||
174 1 Result = E2PRomRead(E2PROM_BOOT_ADDR, 8, RdBuf);
|
||||
175 1
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
176 1 RdBuf[2] = RdBuf[0]+RdBuf[1];
|
||||
177 1 RdBuf[6] = RdBuf[4]+RdBuf[5];
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
235 1 WrBuf[5] = WrBuf[1];
|
||||
236 1 WrBuf[7] = WrBuf[3];
|
||||
237 1
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
238 1 E2PRomWrite(E2PROM_BOOT_ADDR, 8, WrBuf);
|
||||
239 1 }
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
297 2 }
|
||||
298 1
|
||||
299 1 E2PRomBKBoot();
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
300 1 }
|
||||
301
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
356 * 函数名: UartRdRTC
|
||||
357 * 参 数: 无
|
||||
358 * 返回值: 无
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 7
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 7
|
||||
|
||||
359 * 描 述: 读取RTC时间:秒、分、时、日、月、年,并返回给UART
|
||||
360 *************************************************************************************************/
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
418 2 {
|
||||
419 3 bE2PErase = 0;
|
||||
420 3 E2PRomErase();
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 8
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 8
|
||||
|
||||
421 3 }
|
||||
422 2
|
||||
|
@ -510,7 +510,7 @@ line level source
|
|||
480 3 }
|
||||
481 2
|
||||
482 2 if(bE2PBKDsgEnd)
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 9
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 9
|
||||
|
||||
483 2 {
|
||||
484 3 bE2PBKDsgEnd = 0;
|
||||
|
@ -574,7 +574,7 @@ line level source
|
|||
542 3 {
|
||||
543 4 RTCReadTime(&RTC);
|
||||
544 4 MemoryCopy((U8 xdata *)&RTC, ucRTCBuf, 7);
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/07/2025 10:36:15 PAGE 10
|
||||
C51 COMPILER V9.01 EXTE2PROM 02/08/2025 15:18:20 PAGE 10
|
||||
|
||||
545 4 }
|
||||
546 3
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/07/2025 10:36:16 PAGE 1
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE GASGAUGEINTER_V4_13
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
48 //U32 xdata E2ulCycleThreshold; //循环次数更新阈值,变量类型:U32 xdata(输入)
|
||||
49 //U32 xdata E2ulCycleThresholdCount;//循环电量计数,变量类型:U32 xdata(输入\输出存入E2)
|
||||
50 //U16 xdata E2uiCycleCount; //循环次数,变量类型:U16 xdata(输入\输出存入E2)
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/07/2025 10:36:16 PAGE 2
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
51 //U16 xdata E2uiLastCCount; //上次更新容量时的循环次数 ,变量类型:U16 xdata(输入\输出存入E2)
|
||||
52 //S16 xdata E2siDfilterCur; //零电流窗口,变量类型:S16 xdata(输入)
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
101 U16 data uiCellVminG; //当前电压最低的电芯电压,变量类型:U16 data(输入)
|
||||
102 //U8 data ucCellNum; //电芯串数,变量类型:U8 data(输入)
|
||||
103 //S32 xdata slCadcCurAverage; //用于库伦积分的平均电流(主控充放电回路),变量类型:S32 xdata(输入)
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/07/2025 10:36:16 PAGE 3
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
104 S32 xdata slAdcCur2; //用于库伦积分的平均电流(辅控放电回路,如没有可以恒为0),变量类型:S32 xdata(输<EFBC88>
|
||||
-耄<>
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
162 1
|
||||
163 1 E2ucFccUpdatePercent = 30;
|
||||
164 1 E2uiChgEndTemp = (15*10 + 2731);
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/07/2025 10:36:16 PAGE 4
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
165 1 E2uiDsgEndTemp = (15*10 + 2731);
|
||||
166 1
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
224 1 EA = eabak;
|
||||
225 1
|
||||
226 1 // if( bOV )
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/07/2025 10:36:16 PAGE 5
|
||||
C51 COMPILER V9.01 GASGAUGEINTER_V4_13 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
227 1 // {
|
||||
228 1 // E2ucSOC = 100;
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 1
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE INITIAL
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 2 }
|
||||
51 1 else if(McuFlashCheckFlg(MCUFLASH_BK2_FLG_ADDR))
|
||||
52 1 {
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 2
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 2 McuFlashRead(MCUFLASH_BK2_ADDR, XRAM_MAP_ADDR, 512);
|
||||
54 2 McuFlashWrite(MCUFLASH_BK1_ADDR, XRAM_MAP_ADDR); //更新备份区1
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
111 1 }
|
||||
112
|
||||
113
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 3
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
114 /*************************************************************************************************
|
||||
115 * 函数名: InitGPIO
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
- IO状态:P2.[7,6,5,4,3,2,1,0]有效
|
||||
156 P2.7CR[1], P2.6CR[0], P2.5CR[1], P2.4CR[1], P2.3CR[1], P2.2CR[0], P2.1CR[1], P2.0CR[1], P2CR = 0xB
|
||||
-B; IO方向:P2.[7,6,5,4,3,2,1,0]有效,1输出,0输入
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 4
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
157 P2.7PC[0], P2.6PC[1], P2.5PC[0], P2.4PC[0], P2.3PC[0], P2.2PC[1], P2.1PC[1], P2.0PC[1], P2PCR = 0x
|
||||
-46; 内部上拉:1开启,0关闭
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
211 1 #if (UART0_DEFINE == 6)
|
||||
P0 |= 0xC0;
|
||||
P0PCR |= 0x40;
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 5
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
#endif
|
||||
215 1
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
273 1 #if (UART0_DEFINE == 17)
|
||||
P0 |= 0x80;
|
||||
P2 |= 0x20;
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 6
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
P0PCR |= 0x80;
|
||||
#endif
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
P0 |= 0x02;
|
||||
P2 |= 0x20;
|
||||
P2PCR |= 0x20;
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 7
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 7
|
||||
|
||||
#endif
|
||||
339 1
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
397 1 #if (UART1_DEFINE == 9)
|
||||
P1 |= 0x02;
|
||||
P2 |= 0x40;
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 8
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 8
|
||||
|
||||
P2PCR |= 0x40;
|
||||
#endif
|
||||
|
@ -510,7 +510,7 @@ line level source
|
|||
#endif
|
||||
460 1
|
||||
461 1 #if (UART1_DEFINE == 20)
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 9
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 9
|
||||
|
||||
P3 |= 0x10;
|
||||
P2 |= 0x80;
|
||||
|
@ -574,7 +574,7 @@ line level source
|
|||
P2 |= 0xC0;
|
||||
P2PCR |= 0x40;
|
||||
#endif
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 10
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 10
|
||||
|
||||
524 1
|
||||
525 1 //UART2相关IO配置,当前demo板此串口做LED灯显示功能,不支持串口通讯,故demo板配置为不使能uart2串口功能
|
||||
|
@ -638,7 +638,7 @@ line level source
|
|||
583 2 {
|
||||
584 3 bRTCErr = 1; //外置RTC模块出错
|
||||
585 3 }
|
||||
C51 COMPILER V9.01 INITIAL 02/07/2025 10:36:14 PAGE 11
|
||||
C51 COMPILER V9.01 INITIAL 02/08/2025 15:18:20 PAGE 11
|
||||
|
||||
586 2 }
|
||||
587 1
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 INTERRUPT 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 INTERRUPT 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE INTERRUPT
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 2 IF45 = 0;
|
||||
51 2 InterruptINT4App(0x20);
|
||||
52 2 }
|
||||
C51 COMPILER V9.01 INTERRUPT 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 INTERRUPT 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 1 if(IF46)
|
||||
54 1 {
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 INTERRUPTAPP 02/07/2025 10:36:14 PAGE 1
|
||||
C51 COMPILER V9.01 INTERRUPTAPP 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE INTERRUPTAPP
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 *************************************************************************************************/
|
||||
51 void InterruptTimer3App(void)
|
||||
52 {
|
||||
C51 COMPILER V9.01 INTERRUPTAPP 02/07/2025 10:36:14 PAGE 2
|
||||
C51 COMPILER V9.01 INTERRUPTAPP 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 1
|
||||
54 1 bTimer5msFlg = 1; //5ms标志为预留标志
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 KEYAPP 02/07/2025 10:36:14 PAGE 1
|
||||
C51 COMPILER V9.01 KEYAPP 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE KEYAPP
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 1 {
|
||||
51 2 bSlowDischarge = 0;
|
||||
52 2 bMidDischarge = 0;
|
||||
C51 COMPILER V9.01 KEYAPP 02/07/2025 10:36:14 PAGE 2
|
||||
C51 COMPILER V9.01 KEYAPP 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 2 bFastDischarge = 0;
|
||||
54 2 }
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 KEYSCAN 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 KEYSCAN 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE KEYSCAN
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 2 else if(!KEY_2_IO_RD)
|
||||
51 2 {
|
||||
52 3 ucKeyValueBK = KEYVAL_2; //按键按下后,获取新键值
|
||||
C51 COMPILER V9.01 KEYSCAN 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 KEYSCAN 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 3 }
|
||||
54 2 #endif
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
103 4 if(uiKeyValidCnt == KEY_L_TIME) //当按下时间达到长按滤波时间时,认为此按键为长按键
|
||||
104 4 {
|
||||
105 5 ucKeyValue = ucKeyOldValue | KEY_STATE_L;
|
||||
C51 COMPILER V9.01 KEYSCAN 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 KEYSCAN 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
106 5 bKeyFlg = 1;
|
||||
107 5 }
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 LED 02/07/2025 10:36:14 PAGE 1
|
||||
C51 COMPILER V9.01 LED 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE LED
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
51
|
||||
52
|
||||
53 /*************************************************************************************************
|
||||
C51 COMPILER V9.01 LED 02/07/2025 10:36:14 PAGE 2
|
||||
C51 COMPILER V9.01 LED 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
54 * 函数名: LedAutoOff
|
||||
55 * 参 数: 无
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
113 2 if(LedDisNum == 0)
|
||||
114 2 {
|
||||
115 3 // LEDAllOff();
|
||||
C51 COMPILER V9.01 LED 02/07/2025 10:36:14 PAGE 3
|
||||
C51 COMPILER V9.01 LED 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
116 3 }
|
||||
117 2 if(LedDisNum == 1)
|
||||
|
|
BIN
output/Led.obj
BIN
output/Led.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 LOWPOWER 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 LOWPOWER 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE LOWPOWER
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 2 ucSleepTimerCnt = 0;
|
||||
51 2 ucPDTimerCnt = 0;
|
||||
52 2 ucUart0TimeoutCnt = 0;
|
||||
C51 COMPILER V9.01 LOWPOWER 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 LOWPOWER 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 2 ucUart1TimeoutCnt = 0;
|
||||
54 2 ucUart2TimeoutCnt = 0;
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 1 #if (UART1_DEFINE != 0)
|
||||
IrqUart1Dis();
|
||||
#endif
|
||||
C51 COMPILER V9.01 LOWPOWER 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 LOWPOWER 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115 1 #if (UART2_DEFINE != 0)
|
||||
IrqUart2Dis();
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
170 6 bSleepFlg = 1;
|
||||
171 6 }
|
||||
172 5 }
|
||||
C51 COMPILER V9.01 LOWPOWER 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 LOWPOWER 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
173 4 else
|
||||
174 4 {
|
||||
|
@ -254,7 +254,7 @@ MODULE INFORMATION: STATIC OVERLAYABLE
|
|||
XDATA SIZE = 3 ----
|
||||
PDATA SIZE = ---- ----
|
||||
DATA SIZE = ---- ----
|
||||
C51 COMPILER V9.01 LOWPOWER 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 LOWPOWER 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
IDATA SIZE = ---- ----
|
||||
BIT SIZE = 4 ----
|
||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -9,272 +9,6 @@ Project File Date: 01/23/2025
|
|||
<h2>Output:</h2>
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(98): error C141: syntax error near 'U8'
|
||||
CODE_APP\MAIN.C(98): error C202: 'RegTemp': undefined identifier
|
||||
CODE_APP\MAIN.C(99): error C202: 'RegTemp': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C141: syntax error near 'printf'
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(98): error C141: syntax error near 'unsigned'
|
||||
CODE_APP\MAIN.C(98): error C202: 'RegTemp': undefined identifier
|
||||
CODE_APP\MAIN.C(99): error C202: 'RegTemp': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C141: syntax error near 'printf'
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(98): error C141: syntax error near 'U8'
|
||||
CODE_APP\MAIN.C(98): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(99): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C141: syntax error near 'printf'
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(98): error C141: syntax error near 'U8'
|
||||
CODE_APP\MAIN.C(98): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(99): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C202: 'aaaa': undefined identifier
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(98): error C202: 'uint8_t': undefined identifier
|
||||
CODE_APP\MAIN.C(98): error C141: syntax error near 'aaaa'
|
||||
CODE_APP\MAIN.C(99): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C202: 'aaaa': undefined identifier
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(98): error C141: syntax error near 'int'
|
||||
CODE_APP\MAIN.C(98): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(99): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C202: 'aaaa': undefined identifier
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
CODE_APP\MAIN.C(37): error C141: syntax error near 'int'
|
||||
CODE_APP\MAIN.C(37): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(99): error C202: 'aaaa': undefined identifier
|
||||
CODE_APP\MAIN.C(100): error C202: 'aaaa': undefined identifier
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
Target not created
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
|
@ -311,200 +45,127 @@ linking...
|
|||
SEGMENT: ?PR?_MCUCLOCKSET?MCULIB
|
||||
CALLER1: ?PR?INTERRUPTINT4?INTERRUPT
|
||||
CALLER2: ?C_C51STARTUP
|
||||
Program Size: data=154.7 xdata=1529 code=31983
|
||||
Program Size: data=151.4 xdata=1529 code=29770
|
||||
creating hex file from ".\output\MCUCore_Load"...
|
||||
".\output\MCUCore_Load" - 0 Error(s), 3 Warning(s).
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
linking...
|
||||
*** WARNING L15: MULTIPLE CALL TO SEGMENT
|
||||
SEGMENT: ?PR?_MCUCLOCKSET?MCULIB
|
||||
CALLER1: ?PR?INTERRUPTINT4?INTERRUPT
|
||||
CALLER2: ?C_C51STARTUP
|
||||
Program Size: data=154.7 xdata=1529 code=32015
|
||||
creating hex file from ".\output\MCUCore_Load"...
|
||||
".\output\MCUCore_Load" - 0 Error(s), 3 Warning(s).
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
linking...
|
||||
*** WARNING L15: MULTIPLE CALL TO SEGMENT
|
||||
SEGMENT: ?PR?_MCUCLOCKSET?MCULIB
|
||||
CALLER1: ?PR?INTERRUPTINT4?INTERRUPT
|
||||
CALLER2: ?C_C51STARTUP
|
||||
Program Size: data=154.7 xdata=1529 code=32015
|
||||
creating hex file from ".\output\MCUCore_Load"...
|
||||
".\output\MCUCore_Load" - 0 Error(s), 3 Warning(s).
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:36:28.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Flash Erase Done.
|
||||
ISP size=0, E2PROM size=1024;
|
||||
Main Size=64512Bytes; E2PROM Size=1024Bytes;
|
||||
The Code CheckSum is 2C22H
|
||||
Code Write Done: 32021 bytes programmed.
|
||||
The Code CheckSum is 32F7H
|
||||
Code Write Done: 29776 bytes programmed.
|
||||
Code Option Write Done.
|
||||
Code Verify Done: 32021 bytes verified.
|
||||
Code Verify Done: 29776 bytes verified.
|
||||
Code Option Verify Done
|
||||
Code Security Write Done.
|
||||
Code Security Verify Done
|
||||
Update EEprom Done
|
||||
elaspe time 4203 ms
|
||||
elaspe time 3985 ms
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
linking...
|
||||
*** WARNING L15: MULTIPLE CALL TO SEGMENT
|
||||
SEGMENT: ?PR?_MCUCLOCKSET?MCULIB
|
||||
CALLER1: ?PR?INTERRUPTINT4?INTERRUPT
|
||||
CALLER2: ?C_C51STARTUP
|
||||
Program Size: data=151.4 xdata=1529 code=29607
|
||||
creating hex file from ".\output\MCUCore_Load"...
|
||||
".\output\MCUCore_Load" - 0 Error(s), 3 Warning(s).
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:42:57.
|
||||
*** Error:Flash Erase failed.
|
||||
Flash Erase Done.
|
||||
ISP size=0, E2PROM size=1024;
|
||||
Main Size=64512Bytes; E2PROM Size=1024Bytes;
|
||||
The Code CheckSum is E552H
|
||||
Code Write Done: 29613 bytes programmed.
|
||||
Code Option Write Done.
|
||||
Code Verify Done: 29613 bytes verified.
|
||||
Code Option Verify Done
|
||||
Code Security Write Done.
|
||||
Code Security Verify Done
|
||||
Update EEprom Done
|
||||
elaspe time 3969 ms
|
||||
Build target 'McuFlash_Load'
|
||||
compiling Main.c...
|
||||
compiling Initial.c...
|
||||
compiling InterruptApp.c...
|
||||
compiling Led.c...
|
||||
compiling KeyApp.c...
|
||||
compiling LowPower.c...
|
||||
compiling UartApp.c...
|
||||
compiling Memory.c...
|
||||
compiling AFE.c...
|
||||
compiling Balance.c...
|
||||
compiling Calculate.c...
|
||||
compiling Calibrate.c...
|
||||
compiling ChargerLoad.c...
|
||||
compiling ExtE2PRom.c...
|
||||
compiling Interrupt.c...
|
||||
compiling KeyScan.c...
|
||||
compiling McuFlash.c...
|
||||
compiling McuLib.c...
|
||||
CODE_DRV\MCULIB.C(20): warning C280: 'ClkSource': unreferenced local variable
|
||||
CODE_DRV\MCULIB.C(84): warning C280: 'SysClock': unreferenced local variable
|
||||
compiling MosCtrl.c...
|
||||
compiling PorSelfTest.c...
|
||||
compiling Protect.c...
|
||||
compiling RTC.c...
|
||||
compiling TWI.c...
|
||||
compiling Uart.c...
|
||||
compiling Thermistor.c...
|
||||
compiling TwiIO.c...
|
||||
assembling STARTUP.A51...
|
||||
compiling GasGaugeInter_V4_13.c...
|
||||
compiling BootApp.c...
|
||||
compiling BootIAP.c...
|
||||
linking...
|
||||
*** WARNING L15: MULTIPLE CALL TO SEGMENT
|
||||
SEGMENT: ?PR?_MCUCLOCKSET?MCULIB
|
||||
CALLER1: ?PR?INTERRUPTINT4?INTERRUPT
|
||||
CALLER2: ?C_C51STARTUP
|
||||
Program Size: data=151.4 xdata=1529 code=29770
|
||||
creating hex file from ".\output\MCUCore_Load"...
|
||||
".\output\MCUCore_Load" - 0 Error(s), 3 Warning(s).
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:43:02.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:43:07.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:43:12.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:43:17.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Erase error!
|
||||
error time at 2025-02-07 10:43:27.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Erase error!
|
||||
error time at 2025-02-07 10:43:35.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:46:26.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Erase error!
|
||||
error time at 2025-02-07 10:46:30.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:46:38.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:46:58.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:47:30.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:47:35.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:48:02.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:51:04.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:51:13.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:57:47.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:57:54.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:59:15.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:59:19.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:59:33.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:59:38.
|
||||
*** Error:Flash Erase failed.
|
||||
Load "E:\\Y\\keil\\ZDBMS\\ZDBMS\\output\\MCUCore_Load"
|
||||
Refresh WriteMode error.
|
||||
error time at 2025-02-07 10:59:52.
|
||||
*** Error:Flash Erase failed.
|
||||
Flash Erase Done.
|
||||
ISP size=0, E2PROM size=1024;
|
||||
Main Size=64512Bytes; E2PROM Size=1024Bytes;
|
||||
The Code CheckSum is 3315H
|
||||
Code Write Done: 29776 bytes programmed.
|
||||
Code Option Write Done.
|
||||
Code Verify Done: 29776 bytes verified.
|
||||
Code Option Verify Done
|
||||
Code Security Write Done.
|
||||
Code Security Verify Done
|
||||
Update EEprom Done
|
||||
elaspe time 4000 ms
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 MAIN 02/07/2025 10:36:14 PAGE 1
|
||||
C51 COMPILER V9.01 MAIN 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE MAIN
|
||||
|
@ -44,7 +44,7 @@ line level source
|
|||
33 {
|
||||
34 1 Initial(); //初始化系统
|
||||
35 1
|
||||
36 1 printf("SystemClock: 8MHz");
|
||||
36 1 // printf("SystemClock: 8MHz");
|
||||
37 1
|
||||
38 1 while(1)
|
||||
39 1 {
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
51 3 ProtectProcess(); //电压、电流、温度保护
|
||||
52 3
|
||||
53 3 PorSelfTest(); //第一次上电保护检测(延时较短,暂定50mS一次检测)
|
||||
C51 COMPILER V9.01 MAIN 02/07/2025 10:36:14 PAGE 2
|
||||
C51 COMPILER V9.01 MAIN 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
54 3
|
||||
55 3 LoadCheck(); //检测负载是否释放
|
||||
|
@ -109,7 +109,7 @@ line level source
|
|||
95 3 //
|
||||
96 3 // printf("\r\n");
|
||||
97 3 // printf("CURR I1:%.2f mA\r\n", AFE.siCurr*1000.0*1000.0/16384/5);
|
||||
98 3 printf("\r\nBSTATUS:%x\r\n", REG.AFEBSTATUS);
|
||||
98 3 // printf("\r\nBSTATUS:%x\r\n", REG.AFEBSTATUS);
|
||||
99 3
|
||||
100 3 bTimer1sFlg = 0;
|
||||
101 3 GasGaugeManage(); //Calculate the battery charge and discharge capacity
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 4 }
|
||||
113 3
|
||||
114 3 McuFlashWrWaitCheck(); //检测是否需要更新参数到MCU Flash
|
||||
C51 COMPILER V9.01 MAIN 02/07/2025 10:36:14 PAGE 3
|
||||
C51 COMPILER V9.01 MAIN 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115 3
|
||||
116 3 E2PRomBKCheck(); //备份EEPROM
|
||||
|
@ -159,8 +159,8 @@ line level source
|
|||
|
||||
|
||||
MODULE INFORMATION: STATIC OVERLAYABLE
|
||||
CODE SIZE = 150 ----
|
||||
CONSTANT SIZE = 33 ----
|
||||
CODE SIZE = 124 ----
|
||||
CONSTANT SIZE = ---- ----
|
||||
XDATA SIZE = ---- ----
|
||||
PDATA SIZE = ---- ----
|
||||
DATA SIZE = ---- ----
|
||||
|
|
BIN
output/Main.obj
BIN
output/Main.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE MCUFLASH
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50
|
||||
51
|
||||
52 /*************************************************************************************************
|
||||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 * 函数名: McuFlashBlankCheck
|
||||
54 * 参 数: McuFlashAddr:起始地址
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 1
|
||||
113 1 for(i=0; i<MCUFLASH_SECTOR_SIZE; i++)
|
||||
114 1 {
|
||||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115 2 IB_OFFSET = McuFlashAddr+i;
|
||||
116 2 XPAGE = (McuFlashAddr+i)>>8;
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 3.将XRAM数据写入
|
||||
175 4.校验XRAM和MCU Flash区数据是否一致
|
||||
176 *************************************************************************************************/
|
||||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
177 BOOL McuFlashWrite(U16 McuFlashAddr, U16 XramAddr)
|
||||
178 {
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
236
|
||||
237
|
||||
238 /*************************************************************************************************
|
||||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
239 * 函数名: McuFlashProcess
|
||||
240 * 参 数: 无
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
298 2 }
|
||||
299 1 }
|
||||
300
|
||||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
301
|
||||
302 /*************************************************************************************************
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
359 1 McuFlashEn();
|
||||
360 1 if(CWORD[McuFlashAddr/2] == 0x5AA5)
|
||||
361 1 {
|
||||
C51 COMPILER V9.01 MCUFLASH 02/07/2025 10:36:15 PAGE 7
|
||||
C51 COMPILER V9.01 MCUFLASH 02/08/2025 15:18:20 PAGE 7
|
||||
|
||||
362 2 Result = 1;
|
||||
363 2 }
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 MCULIB 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 MCULIB 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE MCULIB
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
49 1 // TempVal = 0x10000 - (U32)128*XmS/256;
|
||||
50 1 // }
|
||||
51 1 // }
|
||||
C51 COMPILER V9.01 MCULIB 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 MCULIB 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
52 1 // else if(ClkSource == TIM_CLK_24MHz)
|
||||
53 1 // {
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
109
|
||||
110 /*************************************************************************************************
|
||||
111 * 函数名: McuPWM0Set、McuPWM1Set、McuPWM2Set
|
||||
C51 COMPILER V9.01 MCULIB 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 MCULIB 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
112 * 参 数: PwmFreq:PWM的频率Hz;DutyRatio:PWM的高电平占空比
|
||||
113 * 返回值: 无
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
168 1 {
|
||||
169 2 Tcnt = 1670/4;
|
||||
170 2 }
|
||||
C51 COMPILER V9.01 MCULIB 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 MCULIB 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
171 1 else //2MHz
|
||||
172 1 {
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
230 1 || (E2ucRamCheckFlg9 != RAM_CHECK_DATA)
|
||||
231 1 || (E2ucRamCheckFlgA != RAM_CHECK_DATA)
|
||||
232 1 || (E2ucRamCheckFlgB != RAM_CHECK_DATA)
|
||||
C51 COMPILER V9.01 MCULIB 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 MCULIB 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
233 1 || (E2uiCheckFlag != 0x5AA5))
|
||||
234 1 {
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
292 1 PCON |= 0x01;
|
||||
293 1 _nop_();
|
||||
294 1 _nop_();
|
||||
C51 COMPILER V9.01 MCULIB 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 MCULIB 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
295 1 _nop_();
|
||||
296 1 _nop_();
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 MEMORY 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 MEMORY 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE MEMORY
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 sbit bOV = uiBatStatus^8;
|
||||
51 sbit bUV = uiBatStatus^9;
|
||||
52 sbit bOCC = uiBatStatus^10;
|
||||
C51 COMPILER V9.01 MEMORY 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 MEMORY 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 sbit bOCD1 = uiBatStatus^11;
|
||||
54 sbit bOCD2 = uiBatStatus^12;
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 U8 xdata E2ucOCCDelay _at_ CHG_PARA_MAP_ADDR+15;
|
||||
113 U8 xdata E2ucOCCRDelay _at_ CHG_PARA_MAP_ADDR+16;
|
||||
114 U8 xdata E2ucRamCheckFlg2 _at_ CHG_PARA_MAP_ADDR+17;
|
||||
C51 COMPILER V9.01 MEMORY 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 MEMORY 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115
|
||||
116 //放电参数区开始 SubClassID=0x03 langth=21
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 U16 xdata E2uiAFEOVvol _at_ AFE_PARA_MAP_ADDR+1;
|
||||
175 U8 xdata E2ucRamCheckFlgA _at_ AFE_PARA_MAP_ADDR+3;
|
||||
176
|
||||
C51 COMPILER V9.01 MEMORY 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 MEMORY 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
177 //校准参数区开始 SubClassID=0x0B langth=12
|
||||
178 U16 xdata E2uiVPackGain _at_ CALI_PARA_MAP_ADDR;
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 MOSCTRL 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 MOSCTRL 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE MOSCTRL
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
49 2 }
|
||||
50 1
|
||||
51 1 if(bOCD1 || bOCD2 || bAFE_SC) //放电过流时,如果OCPM配置为1,则关闭充电MOS
|
||||
C51 COMPILER V9.01 MOSCTRL 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 MOSCTRL 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
52 1 {
|
||||
53 2 bCHGMOS = 0;
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 PORSELFTEST 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE PORSELFTEST
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 2 if(uiCellVmin < E2uiUVvol)
|
||||
51 2 {
|
||||
52 3 if(++uiUVDelayCnt >= TIME_50mS_50mS)
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
53 3 {
|
||||
54 4 bUV = 1;
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 3 uiUTCDelayCnt = 0;
|
||||
113 3 }
|
||||
114 2 }
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
115 1 }
|
||||
116
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 * 描 述: 第一次上电时的自检,持续100mS,上电自检最快完成时间为50mS
|
||||
175 *************************************************************************************************/
|
||||
176 void PorSelfTest(void)
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 PORSELFTEST 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
177 {
|
||||
178 1 if(bPorSelfTestFlg)
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE PROTECT
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
48 4 bOVLock = 0;
|
||||
49 4 uiOVDelayCnt = 0;
|
||||
50 4 uiOVRDelayCnt = 0;
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
51 4 }
|
||||
52 3 }
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
110 2 }
|
||||
111 1 else if(!bUVLock)
|
||||
112 1 {
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
113 2 if(uiCellVmin > E2uiUVRvol)
|
||||
114 2 {
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
172 2 else if(uiTempeMax > E2uiTempOTC)
|
||||
173 2 {
|
||||
174 3 uiOTCRDelayCnt = 0;
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
175 3 }
|
||||
176 2 }
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
234 2 {
|
||||
235 3 if(++uiOTDDelayCnt >= TEMPE_DELAY_CNT)
|
||||
236 3 {
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
237 4 bOTD = 1;
|
||||
238 4 uiOTDDelayCnt = 0;
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
296 4 bUTD = 0;
|
||||
297 4 uiUTDDelayCnt = 0;
|
||||
298 4 uiUTDRDelayCnt = 0;
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 6
|
||||
|
||||
299 4 }
|
||||
300 3 }
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
358 3 }
|
||||
359 2 else if(!bLoadChkingFlg)
|
||||
360 2 {
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 7
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 7
|
||||
|
||||
361 3 if(uiOCD1DelayCnt > 0)
|
||||
362 3 {
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
420 2 ProtectOCD2(); //·Åµç¹ýÁ÷2±£»¤
|
||||
421 2 }
|
||||
422 1 }
|
||||
C51 COMPILER V9.01 PROTECT 02/07/2025 10:36:15 PAGE 8
|
||||
C51 COMPILER V9.01 PROTECT 02/08/2025 15:18:21 PAGE 8
|
||||
|
||||
423
|
||||
424
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 RTC 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 RTC 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE RTC
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
51 1 BOOL Result = 0;
|
||||
52 1 U8 i;
|
||||
53 1
|
||||
C51 COMPILER V9.01 RTC 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 RTC 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
54 1 if(!bRTCErr)
|
||||
55 1 {
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
113 1 return Result;
|
||||
114 1 }
|
||||
115
|
||||
C51 COMPILER V9.01 RTC 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 RTC 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
116 /*************************************************************************************************
|
||||
117 * 函数名: RTCReadTime
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
172
|
||||
173 /*************************************************************************************************
|
||||
174 * 函数名: RTCModifyTime
|
||||
C51 COMPILER V9.01 RTC 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 RTC 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
175 * 参 数: RTC:将RTC参数传递进来,进行RTC更新
|
||||
176 * 返回值: 无
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
232 2 }
|
||||
233 1
|
||||
234 1 MemoryCopy(rtcbuf, (U8 xdata *)RtcInitVal, 7); //从E2读出的时间或出厂时间先放到RTC时间寄存器
|
||||
C51 COMPILER V9.01 RTC 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 RTC 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
-中存起来
|
||||
235 1 Result = RTCReadTime((RTC_VAR xdata *)RtcInitVal);
|
||||
|
|
BIN
output/RTC.obj
BIN
output/RTC.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
A51 MACRO ASSEMBLER STARTUP 02/07/2025 10:36:16 PAGE 1
|
||||
A51 MACRO ASSEMBLER STARTUP 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
MACRO ASSEMBLER A51 V8.02
|
||||
|
@ -48,7 +48,7 @@ LOC OBJ LINE SOURCE
|
|||
001C 00 37 NOP
|
||||
001D 020000 F 38 LJMP ?C_START
|
||||
39 END
|
||||
A51 MACRO ASSEMBLER STARTUP 02/07/2025 10:36:16 PAGE 2
|
||||
A51 MACRO ASSEMBLER STARTUP 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
SYMBOL TABLE LISTING
|
||||
------ ----- -------
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE TWI
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
51
|
||||
52
|
||||
53 /*************************************************************************************************
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
54 * 函数名: TWICheckStatus
|
||||
55 * 参 数: Status:当前TWI的状态
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 2 HTimeoutChk();
|
||||
113 2 TWICON = 0x60; //Start
|
||||
114 2 if((!TWICheckStatus(0x08))&&(!TWICheckStatus(0x10)))
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
115 2 {
|
||||
116 3 Result = 0;
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 5 goto WrErr;
|
||||
175 5 }
|
||||
176 4 WrBuf++;
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
177 4 }
|
||||
178 3 }
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
236 2 {
|
||||
237 3 Result = 0;
|
||||
238 3 goto RdErr;
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
239 3 }
|
||||
240 2
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
298 5 TWICheckStatus(0x50);
|
||||
299 5 }
|
||||
300 4 *RdBuf = TWIDAT;
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 6
|
||||
|
||||
301 4 RdBuf++;
|
||||
302 4 }
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
360 // TWIBR = (24000/TWI_FREQ_KHz-16)/2/1; //配置发送波特率,禁止总线超时判断,f=fsys/(16+2*CR*TWI
|
||||
-BR)=24MHz/(16+2*16*TWIBR)=**KHz
|
||||
361 // TWISTA = 0x06; //16分频
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 7
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 7
|
||||
|
||||
362 // TWICON = 0x40; //ENTWI ,禁止高电平超时
|
||||
363 // TWTFREE = 0xff; //最大超时配置
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
419 // TWISTA = 0x00;
|
||||
420 // break;
|
||||
421 //
|
||||
C51 COMPILER V9.01 TWI 02/07/2025 10:36:15 PAGE 8
|
||||
C51 COMPILER V9.01 TWI 02/08/2025 15:18:21 PAGE 8
|
||||
|
||||
422 // case 2:
|
||||
423 // TWISTA = 0x02;
|
||||
|
|
BIN
output/TWI.obj
BIN
output/TWI.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 1
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE THERMISTOR
|
||||
|
@ -27,184 +27,184 @@ line level source
|
|||
15 * 描 述: b值为3435的NTC阻值表,单位为10 ohms
|
||||
16 *************************************************************************************************/
|
||||
17 #if RT_TABLE == NTC_103AT_3435
|
||||
18 U16 code NTC103AT[NTC103AT_ARRAY_LEN]= //103AT,b值为3435
|
||||
19 {
|
||||
20 32950, //-50
|
||||
21 30970, //-49
|
||||
22 29124, //-48
|
||||
23 27404, //-47
|
||||
24 25799, //-46
|
||||
25 24770, //-45
|
||||
26 23335, //-44
|
||||
27 21995, //-43
|
||||
28 20743, //-42
|
||||
29 19572, //-41
|
||||
30 18850, //-40
|
||||
31 17796, //-39
|
||||
32 16810, //-38
|
||||
33 15885, //-37
|
||||
34 15019, //-36
|
||||
35 14410, //-35
|
||||
36 13633, //-34
|
||||
37 12904, //-33
|
||||
38 12219, //-32
|
||||
39 11576, //-31
|
||||
40 11130, //-30
|
||||
41 10550, //-29
|
||||
42 10005, //-28
|
||||
43 9492, //-27
|
||||
44 9009, //-26
|
||||
45 8643, //-25
|
||||
46 8208, //-24
|
||||
47 7798, //-23
|
||||
48 7412, //-22
|
||||
49 7048, //-21
|
||||
50 6777, //-20
|
||||
51 6447, //-19
|
||||
52 6136, //-18
|
||||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 2
|
||||
U16 code NTC103AT[NTC103AT_ARRAY_LEN]= //103AT,b值为3435
|
||||
{
|
||||
32950, //-50
|
||||
30970, //-49
|
||||
29124, //-48
|
||||
27404, //-47
|
||||
25799, //-46
|
||||
24770, //-45
|
||||
23335, //-44
|
||||
21995, //-43
|
||||
20743, //-42
|
||||
19572, //-41
|
||||
18850, //-40
|
||||
17796, //-39
|
||||
16810, //-38
|
||||
15885, //-37
|
||||
15019, //-36
|
||||
14410, //-35
|
||||
13633, //-34
|
||||
12904, //-33
|
||||
12219, //-32
|
||||
11576, //-31
|
||||
11130, //-30
|
||||
10550, //-29
|
||||
10005, //-28
|
||||
9492, //-27
|
||||
9009, //-26
|
||||
8643, //-25
|
||||
8208, //-24
|
||||
7798, //-23
|
||||
7412, //-22
|
||||
7048, //-21
|
||||
6777, //-20
|
||||
6447, //-19
|
||||
6136, //-18
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
53 5842, //-17
|
||||
54 5564, //-16
|
||||
55 5341, //-15
|
||||
56 5090, //-14
|
||||
57 4852, //-13
|
||||
58 4627, //-12
|
||||
59 4414, //-11
|
||||
60 4247, //-10
|
||||
61 4053, //-09
|
||||
62 3870, //-08
|
||||
63 3696, //-07
|
||||
64 3532, //-06
|
||||
65 3390, //-05
|
||||
66 3241, //-04
|
||||
67 3099, //-03
|
||||
68 2964, //-02
|
||||
69 2836, //-01
|
||||
70 2728, //00
|
||||
71 2611, //01
|
||||
72 2501, //02
|
||||
73 2395, //03
|
||||
74 2295, //04
|
||||
75 2205, //05
|
||||
76 2114, //06
|
||||
77 2027, //07
|
||||
78 1944, //08
|
||||
79 1866, //09
|
||||
80 1796, //10
|
||||
81 1724, //11
|
||||
82 1655, //12
|
||||
83 1590, //13
|
||||
84 1527, //14
|
||||
85 1469, //15
|
||||
86 1412, //16
|
||||
87 1357, //17
|
||||
88 1305, //18
|
||||
89 1256, //19
|
||||
90 1209, //20
|
||||
91 1163, //21
|
||||
92 1120, //22
|
||||
93 1078, //23
|
||||
94 1038, //24
|
||||
95 1000, //25
|
||||
96 963, //26
|
||||
97 928, //27
|
||||
98 894, //28
|
||||
99 862, //29
|
||||
100 831, //30
|
||||
101 801, //31
|
||||
102 772, //32
|
||||
103 745, //33
|
||||
104 719, //34
|
||||
105 694, //35
|
||||
106 670, //36
|
||||
107 646, //37
|
||||
108 624, //38
|
||||
109 603, //39
|
||||
110 583, //40
|
||||
111 562, //41
|
||||
112 543, //42
|
||||
113 525, //43
|
||||
114 508, //44
|
||||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 3
|
||||
5842, //-17
|
||||
5564, //-16
|
||||
5341, //-15
|
||||
5090, //-14
|
||||
4852, //-13
|
||||
4627, //-12
|
||||
4414, //-11
|
||||
4247, //-10
|
||||
4053, //-09
|
||||
3870, //-08
|
||||
3696, //-07
|
||||
3532, //-06
|
||||
3390, //-05
|
||||
3241, //-04
|
||||
3099, //-03
|
||||
2964, //-02
|
||||
2836, //-01
|
||||
2728, //00
|
||||
2611, //01
|
||||
2501, //02
|
||||
2395, //03
|
||||
2295, //04
|
||||
2205, //05
|
||||
2114, //06
|
||||
2027, //07
|
||||
1944, //08
|
||||
1866, //09
|
||||
1796, //10
|
||||
1724, //11
|
||||
1655, //12
|
||||
1590, //13
|
||||
1527, //14
|
||||
1469, //15
|
||||
1412, //16
|
||||
1357, //17
|
||||
1305, //18
|
||||
1256, //19
|
||||
1209, //20
|
||||
1163, //21
|
||||
1120, //22
|
||||
1078, //23
|
||||
1038, //24
|
||||
1000, //25
|
||||
963, //26
|
||||
928, //27
|
||||
894, //28
|
||||
862, //29
|
||||
831, //30
|
||||
801, //31
|
||||
772, //32
|
||||
745, //33
|
||||
719, //34
|
||||
694, //35
|
||||
670, //36
|
||||
646, //37
|
||||
624, //38
|
||||
603, //39
|
||||
583, //40
|
||||
562, //41
|
||||
543, //42
|
||||
525, //43
|
||||
508, //44
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
115 491, //45
|
||||
116 474, //46
|
||||
117 459, //47
|
||||
118 444, //48
|
||||
119 430, //49
|
||||
120 416, //50
|
||||
121 402, //51
|
||||
122 389, //52
|
||||
123 377, //53
|
||||
124 365, //54
|
||||
125 354, //55
|
||||
126 342, //56
|
||||
127 331, //57
|
||||
128 321, //58
|
||||
129 311, //59
|
||||
130 302, //60
|
||||
131 292, //61
|
||||
132 283, //62
|
||||
133 275, //63
|
||||
134 267, //64
|
||||
135 259, //65
|
||||
136 251, //66
|
||||
137 243, //67
|
||||
138 236, //68
|
||||
139 229, //69
|
||||
140 223, //70
|
||||
141 216, //71
|
||||
142 210, //72
|
||||
143 204, //73
|
||||
144 198, //74
|
||||
145 192, //75
|
||||
146 186, //76
|
||||
147 181, //77
|
||||
148 176, //78
|
||||
149 171, //79
|
||||
150 167, //80
|
||||
151 162, //81
|
||||
152 157, //82
|
||||
153 153, //83
|
||||
154 149, //84
|
||||
155 145, //85
|
||||
156 141, //86
|
||||
157 137, //87
|
||||
158 133, //88
|
||||
159 130, //89
|
||||
160 127, //90
|
||||
161 123, //91
|
||||
162 120, //92
|
||||
163 117, //93
|
||||
164 114, //94
|
||||
165 111, //95
|
||||
166 108, //96
|
||||
167 105, //97
|
||||
168 102, //98
|
||||
169 100, //99
|
||||
170 97, //100
|
||||
171 95, //101
|
||||
172 92, //102
|
||||
173 90, //103
|
||||
174 88, //104
|
||||
175 86, //105
|
||||
176 83, //106
|
||||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 4
|
||||
491, //45
|
||||
474, //46
|
||||
459, //47
|
||||
444, //48
|
||||
430, //49
|
||||
416, //50
|
||||
402, //51
|
||||
389, //52
|
||||
377, //53
|
||||
365, //54
|
||||
354, //55
|
||||
342, //56
|
||||
331, //57
|
||||
321, //58
|
||||
311, //59
|
||||
302, //60
|
||||
292, //61
|
||||
283, //62
|
||||
275, //63
|
||||
267, //64
|
||||
259, //65
|
||||
251, //66
|
||||
243, //67
|
||||
236, //68
|
||||
229, //69
|
||||
223, //70
|
||||
216, //71
|
||||
210, //72
|
||||
204, //73
|
||||
198, //74
|
||||
192, //75
|
||||
186, //76
|
||||
181, //77
|
||||
176, //78
|
||||
171, //79
|
||||
167, //80
|
||||
162, //81
|
||||
157, //82
|
||||
153, //83
|
||||
149, //84
|
||||
145, //85
|
||||
141, //86
|
||||
137, //87
|
||||
133, //88
|
||||
130, //89
|
||||
127, //90
|
||||
123, //91
|
||||
120, //92
|
||||
117, //93
|
||||
114, //94
|
||||
111, //95
|
||||
108, //96
|
||||
105, //97
|
||||
102, //98
|
||||
100, //99
|
||||
97, //100
|
||||
95, //101
|
||||
92, //102
|
||||
90, //103
|
||||
88, //104
|
||||
86, //105
|
||||
83, //106
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
177 81, //107
|
||||
178 79, //108
|
||||
179 78, //109
|
||||
180 76 //110
|
||||
181 };
|
||||
182
|
||||
183 /*************************************************************************************************
|
||||
184 * 函数名: NTC103AT
|
||||
185 * 参 数: 无
|
||||
186 * 返回值: 无
|
||||
187 * 描 述: b值为3950的NTC阻值表,单位为10 ohms
|
||||
188 *************************************************************************************************/
|
||||
189 #elif RT_TABLE == NTC_103AT_3950
|
||||
81, //107
|
||||
79, //108
|
||||
78, //109
|
||||
76 //110
|
||||
};
|
||||
|
||||
/*************************************************************************************************
|
||||
* 函数名: NTC103AT
|
||||
* 参 数: 无
|
||||
* 返回值: 无
|
||||
* 描 述: b值为3950的NTC阻值表,单位为10 ohms
|
||||
*************************************************************************************************/
|
||||
#elif RT_TABLE == NTC_103AT_3950
|
||||
U16 code NTC103AT[NTC103AT_ARRAY_LEN]= //103AT,b值为3950
|
||||
{
|
||||
65535, //-50
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
4512, //-06
|
||||
4277, //-05
|
||||
4056, //-04
|
||||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 5
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
3848, //-03
|
||||
3652, //-02
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
287, //56
|
||||
276, //57
|
||||
266, //58
|
||||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 6
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 6
|
||||
|
||||
257, //59
|
||||
248, //60
|
||||
|
@ -373,19 +373,42 @@ line level source
|
|||
52, //109
|
||||
50 //110
|
||||
};
|
||||
#else
|
||||
/*************************************************************************************************
|
||||
* 函数名: NTC103AT
|
||||
* 参 数: 无
|
||||
* 返回值: 无
|
||||
* 描 述: SL的NTC阻值表,单位为10 ohms
|
||||
*************************************************************************************************/
|
||||
#elif RT_TABLE == NTC_SL
|
||||
361 U16 code NTC103AT[NTC103AT_ARRAY_LEN]=
|
||||
362 { //温度为索引-20
|
||||
C51 COMPILER V9.01 THERMISTOR 02/08/2025 15:18:21 PAGE 7
|
||||
|
||||
363 // -20℃~100℃共121个温度点,索引0~120
|
||||
364 9534, 9006, 8510, 8044, 7607, 7196, 6809, 6445, 6103, 5780, //-20~-11
|
||||
365 5477, 5191, 4922, 4668, 4429, 4203, 3990, 3789, 3599, 3420, //-10~-1
|
||||
366 3250, 3090, 2939, 2796, 2661, 2533, 2411, 2297, 2188, 2085, //0~9
|
||||
367 1987, 1895, 1807, 1724, 1645, 1570, 1499, 1432, 1368, 1307, //10~19
|
||||
368 1249, 1194, 1142, 1092, 1045, 1000, 957 , 916 , 878 , 841 , //20~29
|
||||
369 805 , 772 , 740 , 709 , 680 , 653 , 626 , 601 , 577 , 554 , //30~39
|
||||
370 532 , 511 , 491 , 471 , 453 , 436 , 419 , 403 , 387 , 373 , //40~49
|
||||
371 359 , 345 , 332 , 320 , 308 , 297 , 286 , 276 , 266 , 256 , //50~59
|
||||
372 247 , 238 , 230 , 222 , 214 , 206 , 199 , 192 , 186 , 179 , //60~69
|
||||
373 173 , 167 , 162 , 156 , 151 , 146 , 141 , 137 , 132 , 128 , //70~79
|
||||
374 124 , 120 , 116 , 112 , 109 , 105 , 102 , 99 , 96 , 93 , //80~89
|
||||
375 90 , 87 , 85 , 82 , 79 , 77 , 75 , 73 , 70 , 68 , 66 //90~100
|
||||
376 };
|
||||
377 #else
|
||||
#error "underfined RT_TABLE!"
|
||||
#endif
|
||||
357
|
||||
358
|
||||
359
|
||||
380
|
||||
381
|
||||
382
|
||||
|
||||
|
||||
MODULE INFORMATION: STATIC OVERLAYABLE
|
||||
C51 COMPILER V9.01 THERMISTOR 02/07/2025 10:36:16 PAGE 7
|
||||
|
||||
CODE SIZE = ---- ----
|
||||
CONSTANT SIZE = 322 ----
|
||||
CONSTANT SIZE = 242 ----
|
||||
XDATA SIZE = ---- ----
|
||||
PDATA SIZE = ---- ----
|
||||
DATA SIZE = ---- ----
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 1
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE TWIIO
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
{
|
||||
U8 i;
|
||||
for(i=0; i<13; i++)
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 2
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
{
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
if(TWI_RD_CLK)
|
||||
{
|
||||
result = 1;
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 3
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
TWI_DAT_HIGH;
|
||||
}
|
||||
else
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 4
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
{
|
||||
TWI_DAT_LOW;
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
{
|
||||
TWI_DAT_LOW;
|
||||
}
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 5
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
else
|
||||
{
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
if(!TwiSendData(SlaveID, 1)) //Send Slave E2ucID
|
||||
{
|
||||
goto WrErr;
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 6
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 6
|
||||
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
TempBuf[0] = SlaveID;
|
||||
TempBuf[1] = (U8)RdAddr;
|
||||
// TempBuf[2] = Length;
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 7
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 7
|
||||
|
||||
TempBuf[2] = SlaveID | 0x01;
|
||||
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
*RdBuf = TempBuf[3+i];
|
||||
RdBuf++;
|
||||
}
|
||||
C51 COMPILER V9.01 TWIIO 02/07/2025 10:36:16 PAGE 8
|
||||
C51 COMPILER V9.01 TWIIO 02/08/2025 15:18:21 PAGE 8
|
||||
|
||||
}
|
||||
}
|
||||
|
|
BIN
output/TwiIO.obj
BIN
output/TwiIO.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 UART 02/07/2025 10:36:16 PAGE 1
|
||||
C51 COMPILER V9.01 UART 02/08/2025 15:18:21 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE UART
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
#elif UART0_DEFINE == 15
|
||||
UART0CR = 0x14;
|
||||
#elif UART0_DEFINE == 16
|
||||
C51 COMPILER V9.01 UART 02/07/2025 10:36:16 PAGE 2
|
||||
C51 COMPILER V9.01 UART 02/08/2025 15:18:21 PAGE 2
|
||||
|
||||
UART0CR = 0x25;
|
||||
#elif UART0_DEFINE == 17
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
110 void InterruptUART0(void) interrupt 4
|
||||
111 {
|
||||
112 1 U8 xdata RxData;
|
||||
C51 COMPILER V9.01 UART 02/07/2025 10:36:16 PAGE 3
|
||||
C51 COMPILER V9.01 UART 02/08/2025 15:18:21 PAGE 3
|
||||
|
||||
113 1
|
||||
114 1 _push_(INSCON);
|
||||
|
@ -136,7 +136,7 @@ line level source
|
|||
118 1 {
|
||||
119 2 RI = 0;
|
||||
120 2 RxData = SBUF;
|
||||
121 2 InterruptUart0AppRx(RxData); //ÖÐÓ±ÐÒé
|
||||
121 2 InterruptUart0AppRx(RxData); //ÖÐÓ±ÐÒé
|
||||
122 2 }
|
||||
123 1
|
||||
124 1 if(TI)
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
UART1CR = 0x14;
|
||||
#elif UART1_DEFINE == 13
|
||||
UART1CR = 0x54;
|
||||
C51 COMPILER V9.01 UART 02/07/2025 10:36:16 PAGE 4
|
||||
C51 COMPILER V9.01 UART 02/08/2025 15:18:21 PAGE 4
|
||||
|
||||
#elif UART1_DEFINE == 14
|
||||
UART1CR = 0x24;
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
* 描 述: UART1接收和发送中断服务程序
|
||||
InterruptUart1AppRx(RxData),调用APP层的接收中断处理函数
|
||||
InterruptUart1AppTx(),调用APP层的发送中断处理函数
|
||||
C51 COMPILER V9.01 UART 02/07/2025 10:36:16 PAGE 5
|
||||
C51 COMPILER V9.01 UART 02/08/2025 15:18:21 PAGE 5
|
||||
|
||||
*************************************************************************************************/
|
||||
void InterruptUart1(void) interrupt 15
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
{
|
||||
U8 xdata RxData;
|
||||
|
||||
C51 COMPILER V9.01 UART 02/07/2025 10:36:16 PAGE 6
|
||||
C51 COMPILER V9.01 UART 02/08/2025 15:18:21 PAGE 6
|
||||
|
||||
_push_(INSCON);
|
||||
McuBank1Sel();
|
||||
|
|
BIN
output/Uart.obj
BIN
output/Uart.obj
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 1
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 1
|
||||
|
||||
|
||||
C51 COMPILER V9.01, COMPILATION OF MODULE UARTAPP
|
||||
|
@ -62,7 +62,7 @@ line level source
|
|||
50 Others: NULL
|
||||
51 *******************************************************************************/
|
||||
52 U16 code Page1WrRdFuncTable[18]=
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 2
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 2
|
||||
|
||||
53 {
|
||||
54 SYS_PARA_MAP_ADDR, //SubClassID 0x00
|
||||
|
@ -126,7 +126,7 @@ line level source
|
|||
112 1 if(ucUart0Buf[2] == 0x00) //Testing equipment is properly
|
||||
113 1 {
|
||||
114 2 Uart0SendAck();
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 3
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 3
|
||||
|
||||
115 2 }
|
||||
116 1 else
|
||||
|
@ -190,7 +190,7 @@ line level source
|
|||
174 1 if(ucUart0Buf[3+ucUart0Buf[UART_LENGTH]] == CRC8cal(&ucUart0Buf, ucUart0Buf[UART_LENGTH]+3))
|
||||
175 1 {
|
||||
176 2 for(i=0; i<ucUart0Buf[UART_LENGTH]; i++)
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 4
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 4
|
||||
|
||||
177 2 {
|
||||
178 3 McuWDTClear();
|
||||
|
@ -254,7 +254,7 @@ line level source
|
|||
if(ucUart2Buf[3+ucUart2Buf[UART_LENGTH]] == CRC8cal(&ucUart2Buf, ucUart2Buf[UART_LENGTH]+3))
|
||||
{
|
||||
for(i=0; i<ucUart2Buf[UART_LENGTH]; i++)
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 5
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 5
|
||||
|
||||
{
|
||||
McuWDTClear();
|
||||
|
@ -318,7 +318,7 @@ line level source
|
|||
for(i=0; i<ucUart1Buf[UART_LENGTH]; i++)
|
||||
{
|
||||
McuWDTClear();
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 6
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 6
|
||||
|
||||
ucUart1Buf[3+i] = *ptr;
|
||||
ptr++;
|
||||
|
@ -382,7 +382,7 @@ line level source
|
|||
360 2 }
|
||||
361 1 else
|
||||
362 1 {
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 7
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 7
|
||||
|
||||
363 2 Uart0SendNack();
|
||||
364 2 }
|
||||
|
@ -446,7 +446,7 @@ line level source
|
|||
}
|
||||
else
|
||||
{
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 8
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 8
|
||||
|
||||
Uart2SendNack();
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ line level source
|
|||
{
|
||||
if(ucUart2Buf[3+ucUart2Buf[UART_LENGTH]] == CRC8cal(&ucUart2Buf, ucUart2Buf[UART_LENGTH]+3))
|
||||
{
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 9
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 9
|
||||
|
||||
ucSubClassID=ucUart2Buf[3];
|
||||
|
||||
|
@ -574,7 +574,7 @@ line level source
|
|||
546 2 Uart0ReadInfo((U8 xdata *)&Info.uiICTempe[1]);
|
||||
547 2 break;
|
||||
548 2
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 10
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 10
|
||||
|
||||
549 2 case FULL_CHG_CAP:
|
||||
550 2 Uart0ReadInfo((U8 xdata *)&Info.ulFCC);
|
||||
|
@ -638,7 +638,7 @@ line level source
|
|||
/*************************************************************************************************
|
||||
* 函数名: Uart0RdCmdProcess
|
||||
* 参 数: 无
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 11
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 11
|
||||
|
||||
* 返回值: 无
|
||||
* 描 述: UART读命令处理函数
|
||||
|
@ -702,7 +702,7 @@ line level source
|
|||
Uart1ReadInfo((U8 xdata *)&Info.uiCycleCount);
|
||||
break;
|
||||
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 12
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 12
|
||||
|
||||
case PACK_STATUS:
|
||||
Uart1ReadInfo((U8 xdata *)&Info.uiPackStatus);
|
||||
|
@ -766,7 +766,7 @@ line level source
|
|||
case CELL5:
|
||||
case CELL6:
|
||||
case CELL7:
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 13
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 13
|
||||
|
||||
case CELL8:
|
||||
case CELL9:
|
||||
|
@ -830,7 +830,7 @@ line level source
|
|||
Uart2ReadInfo((U8 xdata *)&Info.uiManuCommand);
|
||||
break;
|
||||
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 14
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 14
|
||||
|
||||
default: //read extern EEPRom data
|
||||
if(ucUart2Buf[UART_LENGTH] >= 128)
|
||||
|
@ -894,7 +894,7 @@ line level source
|
|||
* 函数名: Uart1CaliCurrent
|
||||
* 参 数: 无
|
||||
* 返回值: 无
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 15
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 15
|
||||
|
||||
* 描 述: UART1通讯发送校准总电压的数据
|
||||
*************************************************************************************************/
|
||||
|
@ -958,7 +958,7 @@ line level source
|
|||
918 * 函数名: Uart0CaliCurrent、Uart0CaliCurOffset
|
||||
919 * 参 数: 无
|
||||
920 * 返回值: 无
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 16
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 16
|
||||
|
||||
921 * 描 述: UART0通讯发送校准电流采集增益&Offset的数据
|
||||
922 *************************************************************************************************/
|
||||
|
@ -1022,7 +1022,7 @@ line level source
|
|||
| ((U32)ucUart1Buf[6]);
|
||||
|
||||
if((!AFE.siCurr) || (!slExtCur))
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 17
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 17
|
||||
|
||||
{
|
||||
Uart1SendNack();
|
||||
|
@ -1086,7 +1086,7 @@ line level source
|
|||
}
|
||||
else
|
||||
{
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 18
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 18
|
||||
|
||||
Uart2SendNack();
|
||||
}
|
||||
|
@ -1150,7 +1150,7 @@ line level source
|
|||
1104 1 }
|
||||
1105 #endif
|
||||
1106
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 19
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 19
|
||||
|
||||
1107 #if (UART1_DEFINE != 0)
|
||||
/*************************************************************************************************
|
||||
|
@ -1214,7 +1214,7 @@ line level source
|
|||
{
|
||||
Uart2SendNack();
|
||||
}
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 20
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 20
|
||||
|
||||
}
|
||||
|
||||
|
@ -1278,7 +1278,7 @@ line level source
|
|||
if(ucUart1Buf[3+ucUart1Buf[UART_LENGTH]] == CRC8cal(&ucUart1Buf, ucUart1Buf[UART_LENGTH]+3))
|
||||
{
|
||||
for(i=0; i<7; i++)
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 21
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 21
|
||||
|
||||
{
|
||||
ucExtRTC[i] = ucUart1Buf[3+i];
|
||||
|
@ -1342,7 +1342,7 @@ line level source
|
|||
1290 2 break;
|
||||
1291 2 case CALI_CUR_COMMAND:
|
||||
1292 2 Uart0CaliCurrent();
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 22
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 22
|
||||
|
||||
1293 2 break;
|
||||
1294 2 case CALI_VOL_COMMAND:
|
||||
|
@ -1406,7 +1406,7 @@ line level source
|
|||
break;
|
||||
case CALI_CUR_COMMAND:
|
||||
Uart1CaliCurrent();
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 23
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 23
|
||||
|
||||
break;
|
||||
case CALI_VOL_COMMAND:
|
||||
|
@ -1470,7 +1470,7 @@ line level source
|
|||
break;
|
||||
case CALI_CUR_COMMAND:
|
||||
Uart2CaliCurrent();
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 24
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 24
|
||||
|
||||
break;
|
||||
case CALI_VOL_COMMAND:
|
||||
|
@ -1534,7 +1534,7 @@ line level source
|
|||
1476 3 }
|
||||
1477 2 else
|
||||
1478 2 {
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 25
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 25
|
||||
|
||||
1479 3 uiReceCheckSum = 0; //帧头判断正确
|
||||
1480 3 ucUartErrCode = 0;
|
||||
|
@ -1598,7 +1598,7 @@ line level source
|
|||
1538 3
|
||||
1539 3 Uart0SendAck();
|
||||
1540 3 }
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 26
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 26
|
||||
|
||||
1541 2 }
|
||||
1542 1 }
|
||||
|
@ -1662,7 +1662,7 @@ line level source
|
|||
if(ucUartErrCode != 0) //如果有错误代码则不执行命令处理
|
||||
{
|
||||
ucUart1Buf[INDEXES] = ucUartErrCode;
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 27
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 27
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1726,7 +1726,7 @@ line level source
|
|||
}
|
||||
if(ucUart2BufPT == (TARGET+1)) //检查ID
|
||||
{
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 28
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 28
|
||||
|
||||
if(ucUart2Buf[TARGET] != IAP_BMSID)
|
||||
{
|
||||
|
@ -1790,7 +1790,7 @@ line level source
|
|||
1724 ucUart0Buf[1]--CMD No.
|
||||
1725 ucUart0Buf[2]--Offset
|
||||
1726 ucUart0Buf[3]--Data Length
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 29
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 29
|
||||
|
||||
1727 ucUart0Buf[4...]--Data
|
||||
1728 *************************************************************************************************/
|
||||
|
@ -1854,7 +1854,7 @@ line level source
|
|||
1785
|
||||
1786 /*************************************************************************************************
|
||||
1787 * 函数名: InterruptUart0AppTx
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 30
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 30
|
||||
|
||||
1788 * 参 数: 无
|
||||
1789 * 返回值: 无
|
||||
|
@ -1918,7 +1918,7 @@ line level source
|
|||
1845 1 {
|
||||
1846 2 ucUart0TimeoutCnt = 0;
|
||||
1847 2 ucUart0BufPT = 0;
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 31
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 31
|
||||
|
||||
1848 2 Uart0RxEn(); //UART允许接收数据
|
||||
1849 2 }
|
||||
|
@ -1982,7 +1982,7 @@ line level source
|
|||
{
|
||||
Uart1WrCmdProcess(); //Write the command peocess
|
||||
bUart1WriteFlg = 0; //PC write MCU communiaction over
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 32
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 32
|
||||
|
||||
ucUart1BufPT = 0;
|
||||
}
|
||||
|
@ -2046,7 +2046,7 @@ line level source
|
|||
|
||||
ucSleepTimerCnt = 0; //UART正常通讯会清零低功耗计数,UART复位计数
|
||||
ucPDTimerCnt = 0;
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 33
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 33
|
||||
|
||||
ucUart1TimeoutCnt = 0;
|
||||
}
|
||||
|
@ -2110,7 +2110,7 @@ line level source
|
|||
else if(ucUart2Buf[HEARD1] != 0x5A) //判断是否为IAP/ISP的起始帧
|
||||
{
|
||||
ucUart2BufPT = 0; //如果帧头错误,则复位指针
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 34
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 34
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2174,7 +2174,7 @@ line level source
|
|||
else if((ucUart2BufPT==0) || (ucUart2BufPT>=ucUart2Buf[UART_LENGTH]+3))
|
||||
{
|
||||
Uart2RxEn(); //UART允许接收数据
|
||||
C51 COMPILER V9.01 UARTAPP 02/07/2025 10:36:15 PAGE 35
|
||||
C51 COMPILER V9.01 UARTAPP 02/08/2025 15:18:20 PAGE 35
|
||||
|
||||
ucUart2BufPT = 0;
|
||||
bUart2ReadFlg = 0;
|
||||
|
|
Binary file not shown.
BIN
sino_ui.cfg
BIN
sino_ui.cfg
Binary file not shown.
Loading…
Reference in New Issue