Refs #789, #1874. Improved timer accuracy and added Modbus RTU support to the Infineon XMC4 port.

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@1150 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2023-12-20 11:06:54 +00:00
parent 19c23de442
commit 9d38e7b8d1
12 changed files with 1068 additions and 187 deletions

View File

@ -25,7 +25,7 @@ if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files\IAR Systems\Embedded Workbench 9.0\common\bin\cspybat" -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.general.xcl" --backend -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.driver.xcl"
"C:\Program Files\IAR Systems\Embedded Workbench 9.2\common\bin\cspybat" -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.general.xcl" --backend -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.driver.xcl"
@echo off
goto end
@ -34,7 +34,7 @@ goto end
@echo on
"C:\Program Files\IAR Systems\Embedded Workbench 9.0\common\bin\cspybat" -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.general.xcl" "--debug_file=%~1" --backend -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.driver.xcl"
"C:\Program Files\IAR Systems\Embedded Workbench 9.2\common\bin\cspybat" -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.general.xcl" "--debug_file=%~1" --backend -f "C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\settings\xmc4700.Debug.driver.xcl"
@echo off
:end

View File

@ -6,7 +6,7 @@
"-p"
"C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\CONFIG\debugger\Infineon\XMC4700-F144x2048.ddf"
"C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\config\debugger\Infineon\XMC4700-F144x2048.ddf"
"--semihosting"

View File

@ -1,14 +1,14 @@
"C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\bin\armPROC.dll"
"C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\bin\armPROC.dll"
"C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\bin\armJLINK.dll"
"C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\bin\armJLINK.dll"
"C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\..\bin\openblt_xmc4700.out"
--plugin="C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\bin\armbat.dll"
--plugin="C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\bin\armbat.dll"
--device_macro="C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\config\debugger\Infineon\XMC4700.dmac"
--device_macro="C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/debugger/Infineon/XMC4700.dmac"
--flash_loader="C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\config\flashloader\Infineon\FlashXMC4700_2048K.board"
--flash_loader="C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/flashloader/Infineon/FlashXMC4700_2048K.board"

View File

@ -186,7 +186,7 @@
<ColumnWidth0>19</ColumnWidth0>
<ColumnWidth1>1851</ColumnWidth1>
<FilterLevel>2</FilterLevel>
<LiveFile></LiveFile>
<LiveFile />
<LiveLogEnabled>0</LiveLogEnabled>
<LiveFilterLevel>-1</LiveFilterLevel>
</IarPane-34048>
@ -243,9 +243,6 @@
<NodeDict>
<ExpandedNode>xmc4700</ExpandedNode>
<ExpandedNode>xmc4700/Boot</ExpandedNode>
<ExpandedNode>xmc4700/Boot/lib</ExpandedNode>
<ExpandedNode>xmc4700/Boot/lib/cmsis</ExpandedNode>
<ExpandedNode>xmc4700/Boot/lib/xmclib</ExpandedNode>
<ExpandedNode>xmc4700/Output</ExpandedNode>
<ExpandedNode>xmc4700/Source</ExpandedNode>
<ExpandedNode>xmc4700/Source/ARMCM4_XMC4</ExpandedNode>
@ -253,7 +250,7 @@
</IarPane-34063>
<ControlBarVersion>
<Major>14</Major>
<Minor>32</Minor>
<Minor>36</Minor>
</ControlBarVersion>
<MFCToolBarParameters>
<Tooltips>1</Tooltips>
@ -267,12 +264,12 @@
</MFCToolBarParameters>
<CommandManager>
<CommandsWithoutImages>09000D8400000F84000008840000FFFFFFFF54840000328100001C8100000984000053840000</CommandsWithoutImages>
<MenuUserImages>0600048400004D000000068400004F00000030840000530000000E840000510000000B810000220000000D81000024000000</MenuUserImages>
<MenuUserImages>0600048400004D000000068400004F0000000E8400005100000030840000530000000B8100001E0000000D81000020000000</MenuUserImages>
</CommandManager>
<Pane-59393>
<ID>0</ID>
<RectRecentFloat>0A0000000A0000006E0000006E000000</RectRecentFloat>
<RectRecentDocked>00000000F00300008007000003040000</RectRecentDocked>
<RectRecentDocked>00000000F20300008007000003040000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -299,7 +296,7 @@
<Pane--1>
<ID>4294967295</ID>
<RectRecentFloat>00000000EB0200008007000025040000</RectRecentFloat>
<RectRecentDocked>00000000B602000080070000F0030000</RectRecentDocked>
<RectRecentDocked>00000000B802000080070000F2030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -312,7 +309,7 @@
<Pane-34052>
<ID>34052</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -335,20 +332,20 @@
<item>_I0</item>
</col-names>
<col-widths>
<item>607</item>
<item>606</item>
<item>40</item>
<item>1222</item>
<item>1223</item>
<item>20</item>
</col-widths>
<BuildLogLevel>2</BuildLogLevel>
<LiveFile>C:\Work\software\OpenBLT\Target\Demo\ARMCM4_XMC4_XMC4700_Relax_Kit_IAR\Boot\ide\BuildLog.log</LiveFile>
<LiveFile>$WS_DIR$\BuildLog.log</LiveFile>
<LiveLogEnabled>0</LiveLogEnabled>
<LiveFilterLevel>-1</LiveFilterLevel>
</IarPane-34052>
<Pane-34048>
<ID>34048</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -361,7 +358,7 @@
<Pane-34056>
<ID>34056</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -376,14 +373,14 @@
<ColumnWidth1>95</ColumnWidth1>
<ColumnWidth2>1142</ColumnWidth2>
<FilterLevel>2</FilterLevel>
<LiveFile></LiveFile>
<LiveFile />
<LiveLogEnabled>0</LiveLogEnabled>
<LiveFilterLevel>-1</LiveFilterLevel>
</IarPane-34056>
<Pane-34057>
<ID>34057</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -398,14 +395,14 @@
<ColumnWidth1>95</ColumnWidth1>
<ColumnWidth2>1142</ColumnWidth2>
<FilterLevel>2</FilterLevel>
<LiveFile></LiveFile>
<LiveFile />
<LiveLogEnabled>0</LiveLogEnabled>
<LiveFilterLevel>-1</LiveFilterLevel>
</IarPane-34057>
<Pane-34058>
<ID>34058</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -419,7 +416,7 @@
<Pane-34059>
<ID>34059</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -434,14 +431,14 @@
<ColumnWidth1>95</ColumnWidth1>
<ColumnWidth2>1142</ColumnWidth2>
<FilterLevel>2</FilterLevel>
<LiveFile></LiveFile>
<LiveFile />
<LiveLogEnabled>0</LiveLogEnabled>
<LiveFilterLevel>-1</LiveFilterLevel>
</IarPane-34059>
<Pane-34062>
<ID>34062</ID>
<RectRecentFloat>000000003500000022010000E6000000</RectRecentFloat>
<RectRecentDocked>04000000CE0200007C070000D6030000</RectRecentDocked>
<RectRecentDocked>04000000D00200007C070000D8030000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -453,7 +450,7 @@
</BasePane-34062>
<IarPane-34062>
<FilterLevel>2</FilterLevel>
<LiveFile></LiveFile>
<LiveFile />
<LiveLogEnabled>0</LiveLogEnabled>
<LiveFilterLevel>-1</LiveFilterLevel>
</IarPane-34062>
@ -475,16 +472,16 @@
<item>2</item>
</cg_type>
<cg_symbol>
<item></item>
<item />
</cg_symbol>
<cg_user>
<item></item>
<item />
</cg_user>
<cg_display>
<item>&lt;Right-click on a symbol in the editor to show a call graph&gt;</item>
</cg_display>
<cg_def_file>
<item></item>
<item />
</cg_def_file>
<cg_def_line>
<item>0</item>
@ -493,7 +490,7 @@
<item>0</item>
</cg_def_col>
<cg_call_file>
<item></item>
<item />
</cg_call_file>
<cg_call_line>
<item>0</item>
@ -613,7 +610,7 @@
<Pane-34063>
<ID>34063</ID>
<RectRecentFloat>00000000350000000601000096010000</RectRecentFloat>
<RectRecentDocked>000000003200000006010000B2020000</RectRecentDocked>
<RectRecentDocked>000000003200000006010000B4020000</RectRecentDocked>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<IsFloating>0</IsFloating>
@ -624,11 +621,11 @@
<IsVisible>1</IsVisible>
</BasePane-34063>
<DockingManager-256>
<DockingPaneAndPaneDividers>0000000010000000000000000010000001000000FFFFFFFFFFFFFFFF06010000320000000A010000B20200000100000002000010040000000100000000000000000000000F85000000000000000000000000000000000000010000000F850000010000000F850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000D85000000000000000000000000000000000000010000000D850000010000000D850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000C85000000000000000000000000000000000000010000000C850000010000000C850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000078500000000000000000000000000000000000001000000078500000100000007850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000068500000000000000000000000000000000000001000000068500000100000006850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000058500000000000000000000000000000000000001000000058500000100000005850000000000000080000001000000FFFFFFFFFFFFFFFF00000000B202000080070000B602000001000000010000100400000001000000FCFCFFFF6F000000FFFFFFFF07000000048500000085000008850000098500000A8500000B8500000E850000FFFF02000B004354616262656450616E65008000000100000000000000EB020000800700002504000000000000B602000080070000F0030000000000004080005607000000FFFEFF054200750069006C006400010000000485000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700010000000085000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300000000000885000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000985000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000A85000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000B85000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000E85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0485000001000000FFFFFFFF04850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000038500000000000000000000000000000000000001000000038500000100000003850000000000000000000000000000</DockingPaneAndPaneDividers>
<DockingPaneAndPaneDividers>0000000010000000000000000010000001000000FFFFFFFFFFFFFFFF06010000320000000A010000B40200000100000002000010040000000100000000000000000000000F85000000000000000000000000000000000000010000000F850000010000000F850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000D85000000000000000000000000000000000000010000000D850000010000000D850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000C85000000000000000000000000000000000000010000000C850000010000000C850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000078500000000000000000000000000000000000001000000078500000100000007850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000068500000000000000000000000000000000000001000000068500000100000006850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000058500000000000000000000000000000000000001000000058500000100000005850000000000000080000001000000FFFFFFFFFFFFFFFF00000000B402000080070000B802000001000000010000100400000001000000FCFCFFFF6F000000FFFFFFFF07000000048500000085000008850000098500000A8500000B8500000E850000FFFF02000B004354616262656450616E65008000000100000000000000EB020000800700002504000000000000B802000080070000F2030000000000004080005607000000FFFEFF054200750069006C006400010000000485000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700010000000085000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300000000000885000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000985000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000A85000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000B85000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000E85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0485000001000000FFFFFFFF04850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000038500000000000000000000000000000000000001000000038500000100000003850000000000000000000000000000</DockingPaneAndPaneDividers>
</DockingManager-256>
<MFCToolBar-34049>
<Name>CMSIS-Pack</Name>
<Buttons>00200000010000000100FFFF01001100434D4643546F6F6C426172427574746F6ED1840000020000000A000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF0A43004D005300490053002D005000610063006B0018000000</Buttons>
<Buttons>00200000010000000100FFFF01001100434D4643546F6F6C426172427574746F6ED18400000200000008000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF0A43004D005300490053002D005000610063006B0018000000</Buttons>
</MFCToolBar-34049>
<Pane-34049>
<ID>34049</ID>
@ -699,7 +696,7 @@
</IarPane-34064>
<MFCToolBar-34064>
<Name>Main</Name>
<Buttons>00200000010000002000FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000036000000FFFEFF000000000000000000000000000100000001000000018001E100000000000037000000FFFEFF000000000000000000000000000100000001000000018003E100000000000039000000FFFEFF000000000000000000000000000100000001000000018000810000000000001D000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E10000000000003C000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E10000000004003E000000FFFEFF000000000000000000000000000100000001000000018022E10000000004003D000000FFFEFF000000000000000000000000000100000001000000018025E100000000040040000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE100000000040043000000FFFEFF00000000000000000000000000010000000100000001802CE100000000040044000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01000D005061737465436F6D626F426F784281000000000000FFFFFFFFFFFEFF0001000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000000018021810000000004002F000000FFFEFF000000000000000000000000000100000001000000018024E10000000000003F000000FFFEFF000000000000000000000000000100000001000000018028E100000000040041000000FFFEFF000000000000000000000000000100000001000000018029E100000000000042000000FFFEFF000000000000000000000000000100000001000000018002810000000000001E000000FFFEFF0000000000000000000000000001000000010000000180298100000000000033000000FFFEFF0000000000000000000000000001000000010000000180278100000000000031000000FFFEFF0000000000000000000000000001000000010000000180288100000000000032000000FFFEFF00000000000000000000000000010000000100000001801D810000000000002B000000FFFEFF00000000000000000000000000010000000100000001801E810000000004002C000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B8100000200000022000000FFFEFF00000000000000000000000000010000000100000001800C8100000200000023000000FFFEFF00000000000000000000000000010000000100000001805F8600000000000035000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800E8100000200000025000000FFFEFF00000000000000000000000000010000000100000001800F8100000200000026000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00E8020000</Buttons>
<Buttons>00200000010000002000FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000039000000FFFEFF000000000000000000000000000100000001000000018001E10000000000003A000000FFFEFF000000000000000000000000000100000001000000018003E10000000004003C000000FFFEFF0000000000000000000000000001000000010000000180008100000000000019000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E10000000004003F000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E100000000000041000000FFFEFF000000000000000000000000000100000001000000018022E100000000040040000000FFFEFF000000000000000000000000000100000001000000018025E100000000000042000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE100000000040043000000FFFEFF00000000000000000000000000010000000100000001802CE100000000040044000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01000D005061737465436F6D626F426F784281000000000400FFFFFFFFFFFEFF0000000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000000018021810000000004002B000000FFFEFF000000000000000000000000000100000001000000018024E100000000040034000000FFFEFF000000000000000000000000000100000001000000018028E100000000040033000000FFFEFF000000000000000000000000000100000001000000018029E100000000040035000000FFFEFF000000000000000000000000000100000001000000018002810000000004001A000000FFFEFF000000000000000000000000000100000001000000018029810000000004002F000000FFFEFF000000000000000000000000000100000001000000018027810000000004002D000000FFFEFF000000000000000000000000000100000001000000018028810000000004002E000000FFFEFF00000000000000000000000000010000000100000001801D8100000000040027000000FFFEFF00000000000000000000000000010000000100000001801E8100000000040028000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B810000020004001E000000FFFEFF00000000000000000000000000010000000100000001800C810000020000001F000000FFFEFF00000000000000000000000000010000000100000001805F8600000200040032000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800E8100000200000021000000FFFEFF00000000000000000000000000010000000100000001800F8100000200000022000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00E8020000</Buttons>
</MFCToolBar-34064>
<Pane-34064>
<ID>34064</ID>
@ -751,7 +748,7 @@
</ChildIdMap>
<MDIWindows>
<MDIClientArea-0>
<MDITabsState>010000000300000001000000000000000000000001000000010000000200000000000000010000000100000000000000280000002800000001000000020000000000000001000000FFFEFF122400570053005F0044004900520024005C002E002E005C006D00610069006E002E00630001000000FFFF010014004966436F6E74656E7453746F72616765496D706CFFFEFF00FFFEFFFF27013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00330034003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0032003600330031003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0032003600330031003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF066D00610069006E002E00630000000000FFFFFFFFFFFFFFFFFFFEFF2F2400570053005F0044004900520024005C002E002E005C006C00690062005C00460061007400460053005C00530044004D004D0043005F0042004C004F0043004B005C00730064006D006D0063005F0062006C006F0063006B002E006800010000000180FFFEFF00FFFEFFFF27013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00360031003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0033003200340039003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0033003200340039003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0D730064006D006D0063005F0062006C006F0063006B002E00680000000000FFFFFFFFFFFFFFFF0000000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000001000000020000000A0100006700000080070000E7020000</MDITabsState>
<MDITabsState>010000000300000001000000000000000000000001000000010000000200000000000000010000000100000000000000280000002800000000000000</MDITabsState>
</MDIClientArea-0>
</MDIWindows>
</WindowStorage>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>3</fileVersion>
<fileVersion>4</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
@ -11,7 +11,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>32</version>
<version>33</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -44,7 +44,7 @@
</option>
<option>
<name>MemFile</name>
<state>$TOOLKIT_DIR$\CONFIG\debugger\Infineon\XMC4700-F144x2048.ddf</state>
<state>$TOOLKIT_DIR$\config\debugger\Infineon\XMC4700-F144x2048.ddf</state>
</option>
<option>
<name>RunToEnable</name>
@ -88,7 +88,7 @@
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state>9.10.2.39304</state>
<state>9.40.2.67586</state>
</option>
<option>
<name>UseFlashLoader</name>
@ -112,7 +112,7 @@
</option>
<option>
<name>FlashLoadersV3</name>
<state>$TOOLKIT_DIR$\config\flashloader\Infineon\FlashXMC4700_2048K.board</state>
<state>$TOOLKIT_DIR$/config/flashloader/Infineon/FlashXMC4700_2048K.board</state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
@ -222,6 +222,38 @@
<name>OCTpiuBaseOption</name>
<state>1</state>
</option>
<option>
<name>OCOverrideSlave</name>
<state>0</state>
</option>
<option>
<name>OCOverrideSlavePath</name>
<state></state>
</option>
<option>
<name>C_32_64Device</name>
<state>1</state>
</option>
<option>
<name>AuthEnable</name>
<state>0</state>
</option>
<option>
<name>AuthSdmSelection</name>
<state>1</state>
</option>
<option>
<name>AuthSdmManifest</name>
<state></state>
</option>
<option>
<name>AuthSdmExplicitLib</name>
<state></state>
</option>
<option>
<name>AuthEnforce</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@ -457,6 +489,39 @@
</option>
</data>
</settings>
<settings>
<name>E2_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>E2PowerFromProbe</name>
<state>1</state>
</option>
<option>
<name>CE2UsbSerialNo</name>
<state></state>
</option>
<option>
<name>CE2IdCodeEditB</name>
<state>0xFFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF</state>
</option>
<option>
<name>CE2LogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CE2LogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>GDBSERVER_ID</name>
<archiveVersion>2</archiveVersion>
@ -1072,7 +1137,7 @@
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>7</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -1187,9 +1252,17 @@
</option>
<option>
<name>CCSTLinkProbeList</name>
<version>1</version>
<version>2</version>
<state>2</state>
</option>
<option>
<name>CCSTLinkTargetVccEnable</name>
<state>1</state>
</option>
<option>
<name>CCSTLinkTargetVoltage</name>
<state>###Uninitialized###</state>
</option>
</data>
</settings>
<settings>
@ -1292,7 +1365,7 @@
<name>XDS100_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>8</version>
<version>9</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -1417,7 +1490,7 @@
</option>
<option>
<name>CCXds100ResetList</name>
<version>0</version>
<version>1</version>
<state>0</state>
</option>
<option>
@ -1466,6 +1539,10 @@
<name>OCXDSDigitalStatesConfigFile</name>
<state>1</state>
</option>
<option>
<name>OCSelectedCoreName</name>
<state>1</state>
</option>
</data>
</settings>
<debuggerPlugins>
@ -1502,17 +1579,25 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9a.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
@ -1537,7 +1622,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>32</version>
<version>33</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1748,6 +1833,38 @@
<name>OCTpiuBaseOption</name>
<state>1</state>
</option>
<option>
<name>OCOverrideSlave</name>
<state>0</state>
</option>
<option>
<name>OCOverrideSlavePath</name>
<state></state>
</option>
<option>
<name>C_32_64Device</name>
<state>1</state>
</option>
<option>
<name>AuthEnable</name>
<state>0</state>
</option>
<option>
<name>AuthSdmSelection</name>
<state>1</state>
</option>
<option>
<name>AuthSdmManifest</name>
<state></state>
</option>
<option>
<name>AuthSdmExplicitLib</name>
<state></state>
</option>
<option>
<name>AuthEnforce</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@ -1983,6 +2100,39 @@
</option>
</data>
</settings>
<settings>
<name>E2_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>E2PowerFromProbe</name>
<state>1</state>
</option>
<option>
<name>CE2UsbSerialNo</name>
<state></state>
</option>
<option>
<name>CE2IdCodeEditB</name>
<state>0xFFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF</state>
</option>
<option>
<name>CE2LogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CE2LogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>GDBSERVER_ID</name>
<archiveVersion>2</archiveVersion>
@ -2598,7 +2748,7 @@
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>7</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -2713,9 +2863,17 @@
</option>
<option>
<name>CCSTLinkProbeList</name>
<version>1</version>
<version>2</version>
<state>2</state>
</option>
<option>
<name>CCSTLinkTargetVccEnable</name>
<state>1</state>
</option>
<option>
<name>CCSTLinkTargetVoltage</name>
<state>###Uninitialized###</state>
</option>
</data>
</settings>
<settings>
@ -2818,7 +2976,7 @@
<name>XDS100_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>8</version>
<version>9</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -2943,7 +3101,7 @@
</option>
<option>
<name>CCXds100ResetList</name>
<version>0</version>
<version>1</version>
<state>0</state>
</option>
<option>
@ -2992,6 +3150,10 @@
<name>OCXDSDigitalStatesConfigFile</name>
<state>1</state>
</option>
<option>
<name>OCSelectedCoreName</name>
<state>1</state>
</option>
</data>
</settings>
<debuggerPlugins>
@ -3028,17 +3190,25 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9a.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>3</fileVersion>
<fileVersion>4</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
@ -11,7 +11,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>33</version>
<version>36</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -70,7 +70,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>9.10.2.39304</state>
<state>9.40.2.67586</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
@ -98,7 +98,7 @@
</option>
<option>
<name>GBECoreSlave</name>
<version>30</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -115,7 +115,7 @@
</option>
<option>
<name>CoreVariant</name>
<version>30</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -138,7 +138,7 @@
</option>
<option>
<name>GFPUCoreSlave2</name>
<version>30</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -199,13 +199,30 @@
<name>OG_32_64Device</name>
<state>0</state>
</option>
<option>
<name>BuildFilesPath</name>
<state>Debug</state>
</option>
<option>
<name>PointerAuthentication</name>
<state>0</state>
</option>
<option>
<name>FPU64</name>
<state>1</state>
</option>
<option>
<name>OG_32_64DeviceCoreSlave</name>
<version>33</version>
<state>39</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>37</version>
<version>38</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -462,13 +479,21 @@
<name>CCStackProtection</name>
<state>0</state>
</option>
<option>
<name>CCPointerAutentiction</name>
<state>0</state>
</option>
<option>
<name>CCBranchTargetIdentification</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>11</version>
<version>12</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -628,6 +653,10 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>A_32_64Device</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -670,19 +699,11 @@
<buildSequence>inputOutputBased</buildSequence>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>25</version>
<version>27</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -1034,6 +1055,22 @@
<name>IlinkDemangle</name>
<state>0</state>
</option>
<option>
<name>IlinkWrapperFileEnable</name>
<state>0</state>
</option>
<option>
<name>IlinkWrapperFile</name>
<state></state>
</option>
<option>
<name>IlinkProcessor</name>
<state>1</state>
</option>
<option>
<name>IlinkFpuProcessor</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -1057,6 +1094,11 @@
</option>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>2</archiveVersion>
<data />
</settings>
</configuration>
<configuration>
<name>Release</name>
@ -1068,7 +1110,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>33</version>
<version>36</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1127,7 +1169,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state></state>
<state>9.40.2.67586</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
@ -1155,7 +1197,7 @@
</option>
<option>
<name>GBECoreSlave</name>
<version>30</version>
<version>33</version>
<state>38</state>
</option>
<option>
@ -1172,7 +1214,7 @@
</option>
<option>
<name>CoreVariant</name>
<version>30</version>
<version>33</version>
<state>38</state>
</option>
<option>
@ -1195,7 +1237,7 @@
</option>
<option>
<name>GFPUCoreSlave2</name>
<version>30</version>
<version>33</version>
<state>38</state>
</option>
<option>
@ -1256,13 +1298,30 @@
<name>OG_32_64Device</name>
<state>0</state>
</option>
<option>
<name>BuildFilesPath</name>
<state>Release</state>
</option>
<option>
<name>PointerAuthentication</name>
<state>0</state>
</option>
<option>
<name>FPU64</name>
<state>1</state>
</option>
<option>
<name>OG_32_64DeviceCoreSlave</name>
<version>33</version>
<state>38</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>37</version>
<version>38</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1504,13 +1563,21 @@
<name>CCStackProtection</name>
<state>0</state>
</option>
<option>
<name>CCPointerAutentiction</name>
<state>0</state>
</option>
<option>
<name>CCBranchTargetIdentification</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>11</version>
<version>12</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1670,6 +1737,10 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>A_32_64Device</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -1712,19 +1783,11 @@
<buildSequence>inputOutputBased</buildSequence>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>25</version>
<version>27</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -2076,6 +2139,22 @@
<name>IlinkDemangle</name>
<state>0</state>
</option>
<option>
<name>IlinkWrapperFileEnable</name>
<state>0</state>
</option>
<option>
<name>IlinkWrapperFile</name>
<state></state>
</option>
<option>
<name>IlinkProcessor</name>
<state>1</state>
</option>
<option>
<name>IlinkFpuProcessor</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -2099,6 +2178,11 @@
</option>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>2</archiveVersion>
<data />
</settings>
</configuration>
<group>
<name>Boot</name>
@ -2566,6 +2650,9 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM4_XMC4\flash.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM4_XMC4\mbrtu.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM4_XMC4\nvm.c</name>
</file>
@ -2699,6 +2786,12 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\file.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\mb.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\mb.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\net.c</name>
</file>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>3</fileVersion>
<fileVersion>4</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
@ -9,9 +9,9 @@
<debug>1</debug>
<settings>
<name>C-STAT</name>
<archiveVersion>515</archiveVersion>
<archiveVersion>517</archiveVersion>
<data>
<version>515</version>
<version>517</version>
<cstatargs>
<useExtraArgs>0</useExtraArgs>
<extraArgs></extraArgs>
@ -25,7 +25,7 @@
<outputDir>Debug\C-STAT</outputDir>
</cstatargs>
<cstat_settings>
<cstat_version>2.3.1</cstat_version>
<cstat_version>2.5.2</cstat_version>
<checks_tree>
<package enabled="true" name="STDCHECKS">
<group enabled="true" name="ARR">
@ -356,6 +356,7 @@
<check enabled="true" name="CERT-ERR30-C_b" />
<check enabled="true" name="CERT-ERR30-C_c" />
<check enabled="true" name="CERT-ERR30-C_d" />
<check enabled="true" name="CERT-ERR30-C_e" />
<check enabled="true" name="CERT-ERR32-C" />
<check enabled="true" name="CERT-ERR33-C_a" />
<check enabled="true" name="CERT-ERR33-C_b" />
@ -798,6 +799,7 @@
<check enabled="false" name="MISRAC2012-Dir-4.11_h" />
<check enabled="false" name="MISRAC2012-Dir-4.11_i" />
<check enabled="false" name="MISRAC2012-Dir-4.12" />
<check enabled="false" name="MISRAC2012-Dir-4.13_a" />
<check enabled="true" name="MISRAC2012-Dir-4.13_b" />
<check enabled="true" name="MISRAC2012-Dir-4.13_c" />
<check enabled="true" name="MISRAC2012-Dir-4.13_d" />
@ -830,6 +832,7 @@
<check enabled="true" name="MISRAC2012-Rule-1.3_i" />
<check enabled="true" name="MISRAC2012-Rule-1.3_j" />
<check enabled="true" name="MISRAC2012-Rule-1.3_k" />
<check enabled="true" name="MISRAC2012-Rule-1.3_l" />
<check enabled="true" name="MISRAC2012-Rule-1.3_m" />
<check enabled="true" name="MISRAC2012-Rule-1.3_n" />
<check enabled="true" name="MISRAC2012-Rule-1.3_o" />
@ -840,7 +843,8 @@
<check enabled="true" name="MISRAC2012-Rule-1.3_t" />
<check enabled="true" name="MISRAC2012-Rule-1.3_u" />
<check enabled="true" name="MISRAC2012-Rule-1.3_v" />
<check enabled="true" name="MISRAC2012-Rule-1.3_w" />
<check enabled="true" name="MISRAC2012-Rule-1.4_a" />
<check enabled="true" name="MISRAC2012-Rule-1.4_b" />
</group>
<group enabled="true" name="MISRAC2012-Rule-2">
<check enabled="true" name="MISRAC2012-Rule-2.1_a" />
@ -946,6 +950,7 @@
<check enabled="false" name="MISRAC2012-Rule-12.1" />
<check enabled="true" name="MISRAC2012-Rule-12.2" />
<check enabled="false" name="MISRAC2012-Rule-12.3" />
<check enabled="false" name="MISRAC2012-Rule-12.4" />
<check enabled="true" name="MISRAC2012-Rule-12.5" />
</group>
<group enabled="true" name="MISRAC2012-Rule-13">
@ -1063,6 +1068,7 @@
<check enabled="true" name="MISRAC2012-Rule-21.19_a" />
<check enabled="true" name="MISRAC2012-Rule-21.19_b" />
<check enabled="true" name="MISRAC2012-Rule-21.20" />
<check enabled="true" name="MISRAC2012-Rule-21.21" />
</group>
<group enabled="true" name="MISRAC2012-Rule-22">
<check enabled="true" name="MISRAC2012-Rule-22.1_a" />
@ -1428,9 +1434,9 @@
<debug>0</debug>
<settings>
<name>C-STAT</name>
<archiveVersion>515</archiveVersion>
<archiveVersion>517</archiveVersion>
<data>
<version>515</version>
<version>517</version>
<cstatargs>
<useExtraArgs>0</useExtraArgs>
<extraArgs></extraArgs>
@ -1444,7 +1450,7 @@
<outputDir>Release\C-STAT</outputDir>
</cstatargs>
<cstat_settings>
<cstat_version>2.3.1</cstat_version>
<cstat_version>2.5.2</cstat_version>
<checks_tree>
<package enabled="true" name="STDCHECKS">
<group enabled="true" name="ARR">
@ -1775,6 +1781,7 @@
<check enabled="true" name="CERT-ERR30-C_b" />
<check enabled="true" name="CERT-ERR30-C_c" />
<check enabled="true" name="CERT-ERR30-C_d" />
<check enabled="true" name="CERT-ERR30-C_e" />
<check enabled="true" name="CERT-ERR32-C" />
<check enabled="true" name="CERT-ERR33-C_a" />
<check enabled="true" name="CERT-ERR33-C_b" />
@ -2217,6 +2224,7 @@
<check enabled="false" name="MISRAC2012-Dir-4.11_h" />
<check enabled="false" name="MISRAC2012-Dir-4.11_i" />
<check enabled="false" name="MISRAC2012-Dir-4.12" />
<check enabled="false" name="MISRAC2012-Dir-4.13_a" />
<check enabled="true" name="MISRAC2012-Dir-4.13_b" />
<check enabled="true" name="MISRAC2012-Dir-4.13_c" />
<check enabled="true" name="MISRAC2012-Dir-4.13_d" />
@ -2249,6 +2257,7 @@
<check enabled="true" name="MISRAC2012-Rule-1.3_i" />
<check enabled="true" name="MISRAC2012-Rule-1.3_j" />
<check enabled="true" name="MISRAC2012-Rule-1.3_k" />
<check enabled="true" name="MISRAC2012-Rule-1.3_l" />
<check enabled="true" name="MISRAC2012-Rule-1.3_m" />
<check enabled="true" name="MISRAC2012-Rule-1.3_n" />
<check enabled="true" name="MISRAC2012-Rule-1.3_o" />
@ -2259,7 +2268,8 @@
<check enabled="true" name="MISRAC2012-Rule-1.3_t" />
<check enabled="true" name="MISRAC2012-Rule-1.3_u" />
<check enabled="true" name="MISRAC2012-Rule-1.3_v" />
<check enabled="true" name="MISRAC2012-Rule-1.3_w" />
<check enabled="true" name="MISRAC2012-Rule-1.4_a" />
<check enabled="true" name="MISRAC2012-Rule-1.4_b" />
</group>
<group enabled="true" name="MISRAC2012-Rule-2">
<check enabled="true" name="MISRAC2012-Rule-2.1_a" />
@ -2365,6 +2375,7 @@
<check enabled="false" name="MISRAC2012-Rule-12.1" />
<check enabled="true" name="MISRAC2012-Rule-12.2" />
<check enabled="false" name="MISRAC2012-Rule-12.3" />
<check enabled="false" name="MISRAC2012-Rule-12.4" />
<check enabled="true" name="MISRAC2012-Rule-12.5" />
</group>
<group enabled="true" name="MISRAC2012-Rule-13">
@ -2482,6 +2493,7 @@
<check enabled="true" name="MISRAC2012-Rule-21.19_a" />
<check enabled="true" name="MISRAC2012-Rule-21.19_b" />
<check enabled="true" name="MISRAC2012-Rule-21.20" />
<check enabled="true" name="MISRAC2012-Rule-21.21" />
</group>
<group enabled="true" name="MISRAC2012-Rule-22">
<check enabled="true" name="MISRAC2012-Rule-22.1_a" />
@ -3305,6 +3317,9 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM4_XMC4\flash.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM4_XMC4\mbrtu.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM4_XMC4\nvm.c</name>
</file>
@ -3438,6 +3453,12 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\file.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\mb.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\mb.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\net.c</name>
</file>

View File

@ -1547,7 +1547,7 @@
<Group>
<GroupName>Lib/TinyUSB</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -2239,6 +2239,30 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>165</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\Source\mb.c</PathWithFileName>
<FilenameWithoutPath>mb.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>166</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\Source\mb.h</PathWithFileName>
<FilenameWithoutPath>mb.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -2249,7 +2273,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>165</FileNumber>
<FileNumber>167</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2261,7 +2285,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>166</FileNumber>
<FileNumber>168</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2273,7 +2297,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>167</FileNumber>
<FileNumber>169</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2285,7 +2309,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>168</FileNumber>
<FileNumber>170</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2297,7 +2321,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>169</FileNumber>
<FileNumber>171</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2309,7 +2333,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>170</FileNumber>
<FileNumber>172</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2321,7 +2345,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>171</FileNumber>
<FileNumber>173</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2333,7 +2357,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>172</FileNumber>
<FileNumber>174</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2345,7 +2369,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>173</FileNumber>
<FileNumber>175</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2357,7 +2381,7 @@
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>174</FileNumber>
<FileNumber>176</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2367,6 +2391,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>177</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\Source\ARMCM4_XMC4\mbrtu.c</PathWithFileName>
<FilenameWithoutPath>mbrtu.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -2377,7 +2413,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>10</GroupNumber>
<FileNumber>175</FileNumber>
<FileNumber>178</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2389,7 +2425,7 @@
</File>
<File>
<GroupNumber>10</GroupNumber>
<FileNumber>176</FileNumber>
<FileNumber>179</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2401,7 +2437,7 @@
</File>
<File>
<GroupNumber>10</GroupNumber>
<FileNumber>177</FileNumber>
<FileNumber>180</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2413,7 +2449,7 @@
</File>
<File>
<GroupNumber>10</GroupNumber>
<FileNumber>178</FileNumber>
<FileNumber>181</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2425,7 +2461,7 @@
</File>
<File>
<GroupNumber>10</GroupNumber>
<FileNumber>179</FileNumber>
<FileNumber>182</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2445,7 +2481,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>180</FileNumber>
<FileNumber>183</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2457,7 +2493,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>181</FileNumber>
<FileNumber>184</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2469,7 +2505,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>182</FileNumber>
<FileNumber>185</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2481,7 +2517,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>183</FileNumber>
<FileNumber>186</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2493,7 +2529,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>184</FileNumber>
<FileNumber>187</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2505,7 +2541,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>185</FileNumber>
<FileNumber>188</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2517,7 +2553,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>186</FileNumber>
<FileNumber>189</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2529,7 +2565,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>187</FileNumber>
<FileNumber>190</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2541,7 +2577,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>188</FileNumber>
<FileNumber>191</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2553,7 +2589,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>189</FileNumber>
<FileNumber>192</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2565,7 +2601,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>190</FileNumber>
<FileNumber>193</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2577,7 +2613,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>191</FileNumber>
<FileNumber>194</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2589,7 +2625,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>192</FileNumber>
<FileNumber>195</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2601,7 +2637,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>193</FileNumber>
<FileNumber>196</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2613,7 +2649,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>194</FileNumber>
<FileNumber>197</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2625,7 +2661,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>195</FileNumber>
<FileNumber>198</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -2637,7 +2673,7 @@
</File>
<File>
<GroupNumber>11</GroupNumber>
<FileNumber>196</FileNumber>
<FileNumber>199</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -1289,6 +1289,16 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\xcp.h</FilePath>
</File>
<File>
<FileName>mb.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\mb.c</FilePath>
</File>
<File>
<FileName>mb.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\mb.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1395,6 +1405,11 @@
</FileArmAds>
</FileOption>
</File>
<File>
<FileName>mbrtu.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\ARMCM4_XMC4\mbrtu.c</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -0,0 +1,542 @@
/************************************************************************************//**
* \file Source/ARMCM4_XMC4/mbrtu.c
* \brief Bootloader Modbus RTU communication interface source file.
* \ingroup Target_ARMCM4_XMC4
* \internal
*----------------------------------------------------------------------------------------
* C O P Y R I G H T
*----------------------------------------------------------------------------------------
* Copyright (c) 2023 by Feaser http://www.feaser.com All rights reserved
*
*----------------------------------------------------------------------------------------
* L I C E N S E
*----------------------------------------------------------------------------------------
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You have received a copy of the GNU General Public License along with OpenBLT. It
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy.
*
* \endinternal
****************************************************************************************/
/****************************************************************************************
* Include files
****************************************************************************************/
#include "boot.h" /* bootloader generic header */
#if (BOOT_COM_MBRTU_ENABLE > 0)
#include "xmc_uart.h" /* UART driver header */
/****************************************************************************************
* Macro definitions
****************************************************************************************/
/** \brief Timeout for transmitting a byte in milliseconds. */
#define MBRTU_BYTE_TX_TIMEOUT_MS (10u)
/** \brief Macro for accessing the UART channel handle in the format that is expected
* by the XMClib UART driver.
*/
#define MBRTU_CHANNEL ((XMC_USIC_CH_t *)(mbrtuChannelMap[BOOT_COM_MBRTU_CHANNEL_INDEX]))
/****************************************************************************************
* Local constant declarations
****************************************************************************************/
/** \brief Helper array to quickly convert the channel index, as specific in the boot-
* loader's configuration header, to the associated channel handle that the
* XMClib's UART driver requires.
*/
static const XMC_USIC_CH_t *mbrtuChannelMap[] =
{
XMC_UART0_CH0, /* BOOT_COM_MBRTU_CHANNEL_INDEX = 0 */
XMC_UART0_CH1, /* BOOT_COM_MBRTU_CHANNEL_INDEX = 1 */
XMC_UART1_CH0, /* BOOT_COM_MBRTU_CHANNEL_INDEX = 2 */
XMC_UART1_CH1, /* BOOT_COM_MBRTU_CHANNEL_INDEX = 3 */
XMC_UART2_CH0, /* BOOT_COM_MBRTU_CHANNEL_INDEX = 4 */
XMC_UART2_CH1 /* BOOT_COM_MBRTU_CHANNEL_INDEX = 5 */
};
/****************************************************************************************
* Local data declarations
****************************************************************************************/
/** \brief Stores the number of free running counter ticks that represents the 3.5
* character delay time (T3_5) for Modbus RTU.
*/
static blt_int16u mbRtuT3_5Ticks;
/****************************************************************************************
* Function prototypes
****************************************************************************************/
static blt_bool MbRtuReceiveByte(blt_int8u *data);
static void MbRtuTransmitByte(blt_int8u data, blt_bool end_of_packet);
/************************************************************************************//**
** \brief Initializes the Modbus RTU communication interface.
** \attention It is the application's responsibility to initialize a timer peripheral
** to have an upwards counting free running counter, which runs at 100 kHz.
** \return none.
**
****************************************************************************************/
void MbRtuInit(void)
{
blt_int16u startTimeTicks;
blt_int16u deltaTimeTicks;
blt_int16u currentTimeTicks;
blt_int8u rxDummy;
XMC_UART_CH_CONFIG_t uart_config;
/* the current implementation supports XMC_UART0_CH0 to XMC_UART2_CH1. throw an
* assertion error in case a different UART channel is configured.
*/
ASSERT_CT((BOOT_COM_MBRTU_CHANNEL_INDEX >= 0) && (BOOT_COM_MBRTU_CHANNEL_INDEX <= 5));
/* calculate the 3.5 character delay time in free running counter ticks. note that
* the free running counter runs at 100 kHz, so one tick is 10 us. For baudrates >
* 19200 bps, it can be fixed to 1750 us.
*/
if (BOOT_COM_MBRTU_BAUDRATE > 19200)
{
/* set T3_5 time to a fixed value of 1750 us. */
mbRtuT3_5Ticks = 175;
}
/* calculate the T3_5 time, because the baudrate is <= 19200 bps. */
else
{
/* T3_5 [us * 10] = 3.5 * Tchar = 3.5 * 11 * 100000 / baudrate = 3850000 / baudrate.
* make sure to do integer round up though. Make sure to add 1 to adjust for 10us
* timer resolution inaccuracy.
*/
mbRtuT3_5Ticks = (blt_int16u)(((3850000UL + (BOOT_COM_MBRTU_BAUDRATE - 1U)) /
BOOT_COM_MBRTU_BAUDRATE) + 1);
}
/* set configuration and initialize UART channel */
uart_config.baudrate = BOOT_COM_MBRTU_BAUDRATE;
uart_config.data_bits = 8;
uart_config.frame_length = 8;
uart_config.stop_bits = BOOT_COM_MBRTU_STOPBITS;
uart_config.oversampling = 16;
uart_config.parity_mode = XMC_USIC_CH_PARITY_MODE_NONE;
/* odd parity enabled? */
#if (BOOT_COM_MBRTU_PARITY == 1)
uart_config.parity_mode = XMC_USIC_CH_PARITY_MODE_ODD;
#endif
/* even parity enabled? */
#if (BOOT_COM_MBRTU_PARITY == 2)
uart_config.parity_mode = XMC_USIC_CH_PARITY_MODE_EVEN;
#endif
XMC_UART_CH_Init(MBRTU_CHANNEL, &uart_config);
/* configure small transmit and receive FIFO */
XMC_USIC_CH_TXFIFO_Configure(MBRTU_CHANNEL, 16U, XMC_USIC_CH_FIFO_SIZE_16WORDS, 1U);
XMC_USIC_CH_RXFIFO_Configure(MBRTU_CHANNEL, 0U, XMC_USIC_CH_FIFO_SIZE_16WORDS, 1U);
/* configure RCIM bits to make sure it detects the parity error (PERR) as RCI[4]. */
MBRTU_CHANNEL->RBCTR |= USIC_CH_RBCTR_RCIM_Msk;
/* start UART */
XMC_UART_CH_Start(MBRTU_CHANNEL);
/* enable the receiver output to be able to receive. */
MbRtuDriverOutputControlHook(BLT_FALSE);
/* wait for idle line detection. This is T3_5 time after reception of the last byte. */
startTimeTicks = MbRtuFreeRunningCounterGet();
do
{
/* service the watchdog. */
CopService();
/* get the current value of the free running counter. */
currentTimeTicks = MbRtuFreeRunningCounterGet();
/* check if a byte was received while waiting for the idle line. */
if (MbRtuReceiveByte(&rxDummy) == BLT_TRUE)
{
/* restart the idle line detection. */
startTimeTicks = currentTimeTicks;
}
/* calculate the number of ticks that elapsed since the start or since the last
* byte reception. Note that this calculation works, even if the free running counter
* overflowed.
*/
deltaTimeTicks = currentTimeTicks - startTimeTicks;
}
while (deltaTimeTicks < mbRtuT3_5Ticks);
} /*** end of MbRtuInit ***/
/************************************************************************************//**
** \brief Transmits a packet formatted for the communication interface.
** \param data Pointer to byte array with data that it to be transmitted.
** \param len Number of bytes that are to be transmitted.
** \return none.
**
****************************************************************************************/
void MbRtuTransmitPacket(blt_int8u *data, blt_int8u len)
{
blt_int16u data_index;
blt_int16u checksum;
blt_bool endOfPacket = BLT_FALSE;
/* Made static to lower stack load and +5 for Modbus RTU packet overhead. */
static blt_int8u txPacket[BOOT_COM_MBRTU_TX_MAX_DATA + 5];
/* On Modbus RTU, there must always be a T3_5 time separation between packet trans-
* missions.
*
* This bootloader uses XCP packets embedded in Modbus RTU packets. The XCP
* communication is always request / response based. That means that this packet is
* a response packet and it will only be sent, after the reception of a request packet.
*
* A response packet is only deemed valid, after the T3_5 idle time. This module
* implements the T3_5 end-of-packet time event detection. Consequently, it is already
* guaranteed that there is T3_5 between subsequent packet transmissions. As such, no
* further T3_5 wait time is needed here.
*/
/* verify validity of the len-parameter */
ASSERT_RT(len <= BOOT_COM_MBRTU_TX_MAX_DATA);
/* construct the Modbus RTU packet. start by adding the slave address. */
txPacket[0] = BOOT_COM_MBRTU_NODE_ID;
/* add the user-defined function code for embedding XCP packets. */
txPacket[1] = BOOT_COM_MBRTU_FCT_CODE_USER_XCP;
/* add the XCP packet length. */
txPacket[2] = len;
/* copy the XCP packet data. */
CpuMemCopy((blt_int32u)&txPacket[3], (blt_int32u)data, len);
/* calculate the checksum for the packet, including slave address, function code and
* extra XCP length.
*/
checksum = MbRtuCrcCalculate(&txPacket[0], len + 3);
/* add the checksum at the end of the packet */
txPacket[len + 3] = (blt_int8u)(checksum & 0xff);
txPacket[len + 4] = (blt_int8u)(checksum >> 8);
/* enable the driver output to be able to send. just make sure to wait a little around
* the togglng of the DE/NRE pin.
*/
MbRtuDelay(BOOT_COM_MBRTU_DRIVER_OUTPUT_ENABLE_DELAY_US);
MbRtuDriverOutputControlHook(BLT_TRUE);
MbRtuDelay(BOOT_COM_MBRTU_DRIVER_OUTPUT_ENABLE_DELAY_US);
/* transmit all the packet bytes one-by-one */
for (data_index = 0; data_index < (len + 5); data_index++)
{
/* keep the watchdog happy */
CopService();
/* last byte of the packet? */
if (data_index == ((len + 5) - 1))
{
/* update the end of packet flag. */
endOfPacket = BLT_TRUE;
}
/* write byte */
MbRtuTransmitByte(txPacket[data_index], endOfPacket);
}
/* enable the receiver output to be able to receive again. just make sure to wait a
* little around the togglng of the DE/NRE pin.
*/
MbRtuDelay(BOOT_COM_MBRTU_DRIVER_OUTPUT_DISABLE_DELAY_US);
MbRtuDriverOutputControlHook(BLT_FALSE);
MbRtuDelay(BOOT_COM_MBRTU_DRIVER_OUTPUT_DISABLE_DELAY_US);
} /*** end of MbRtuTransmitPacket ***/
/************************************************************************************//**
** \brief Receives a communication interface packet if one is present.
** \param data Pointer to byte array where the data is to be stored.
** \param len Pointer where the length of the packet is to be stored.
** \return BLT_TRUE if a packet was received, BLT_FALSE otherwise.
**
****************************************************************************************/
blt_bool MbRtuReceivePacket(blt_int8u *data, blt_int8u *len)
{
blt_bool result = BLT_FALSE;
blt_int8u rxByte;
blt_int16u currentTimeTicks;
blt_int16u deltaTimeTicks;
blt_int16u checksumCalculated;
blt_int16u checksumReceived;
/* Made static to lower stack load and +5 for Modbus RTU packet overhead. */
static blt_int8u rxPacket[BOOT_COM_MBRTU_RX_MAX_DATA + 5];
static blt_int8u rxLength = 0;
static blt_bool packetRxInProgress = BLT_FALSE;
static blt_int16u lastRxByteTimeTicks = 0;
/* get the current value of the free running counter. */
currentTimeTicks = MbRtuFreeRunningCounterGet();
/* check for a newly received byte. */
if (MbRtuReceiveByte(&rxByte) == BLT_TRUE)
{
/* store the time at which the byte was received. */
lastRxByteTimeTicks = currentTimeTicks;
/* is this the potential start of a new packet? */
if (packetRxInProgress == BLT_FALSE)
{
/* initialize the reception of a new packet. */
rxLength = 0;
packetRxInProgress = BLT_TRUE;
}
/* store the newly received byte in the buffer, with buffer overrun protection. */
if (rxLength < (sizeof(rxPacket)/sizeof(rxPacket[0])))
{
rxPacket[rxLength] = rxByte;
rxLength++;
}
/* buffer overrun occurred. received packet was longer than supported so discard
* the packet to try and sync to the next one.
*/
else
{
/* discard the partially received packet. */
packetRxInProgress = BLT_FALSE;
}
}
/* only attempt to detect the end of packet, when a reception is in progress. */
if (packetRxInProgress == BLT_TRUE)
{
/* calculate the number of ticks that elapsed since the last byte reception. note
* that this calculation works, even if the free running counter overflowed.
*/
deltaTimeTicks = currentTimeTicks - lastRxByteTimeTicks;
/* packet reception is assumed complete after T3_5 of not receiving new data. */
if (deltaTimeTicks >= mbRtuT3_5Ticks)
{
/* a Modbus RTU packet consists of at least the address field, function code and
* 16-bit CRC. Validate the packet length based on this info.
*/
if (rxLength >= 4)
{
/* calculate the packet checksum. */
checksumCalculated = MbRtuCrcCalculate(&rxPacket[0], rxLength - 2);
/* extract the checksum received with the packet. */
checksumReceived = rxPacket[rxLength - 2] | (rxPacket[rxLength - 1] << 8);
/* only continue with packet processing if the checksums match. */
if (checksumCalculated == checksumReceived)
{
/* we are only interested in Modbus RTU packets that are addressed to us and
* have an XCP packet embedded.
*/
if ( (rxPacket[0] == BOOT_COM_MBRTU_NODE_ID) &&
(rxPacket[1] == BOOT_COM_MBRTU_FCT_CODE_USER_XCP) )
{
/* An XCP packet embedded in a Modbus RTU packet has an extra XCP packet
* length value. Use it to double-check that the packet length is valid.
*/
if (rxPacket[2] == (rxLength - 5))
{
/* copy the packet's XCP data. */
CpuMemCopy((blt_int32u)data, (blt_int32u)&rxPacket[3], rxLength - 5);
/* set the packet's XCP length. */
*len = rxLength - 5;
/* update the result to success to indicate that this XCP packet is ready
* for processing.
*/
result = BLT_TRUE;
}
}
}
}
/* reset the packet reception in progress flag, to be able to receive the next. */
packetRxInProgress = BLT_FALSE;
}
}
/* give the result back to the caller. */
return result;
} /*** end of MbRtuReceivePacket ***/
/************************************************************************************//**
** \brief Receives a communication interface byte if one is present.
** \param data Pointer to byte where the data is to be stored.
** \return BLT_TRUE if a byte was received, BLT_FALSE otherwise.
**
****************************************************************************************/
static blt_bool MbRtuReceiveByte(blt_int8u *data)
{
blt_bool result = BLT_FALSE;
blt_int32u data_and_status;
/* wait for the reception of a new byte. */
if (XMC_USIC_CH_RXFIFO_IsEmpty(MBRTU_CHANNEL) == 0)
{
/* update the result */
result = BLT_TRUE;
/* read out the newly received data, including its PERR status flags */
data_and_status = MBRTU_CHANNEL->OUTR;
/* check for a frame error. the frame error check is important because it can detect
* a missing stopbit. on an RS485 bus without bias resistors, the A-B differential
* voltage is 0. for an RS485 transceiver this is neither a 0 nor a 1 bit, so
* undefined. most RS485 transceivers feature a reception failsafe function to drive
* the Rx output (going to the UART Rx) to a defined state of logic 1. in case the
* used RS485 transceiver doesn't have such a feature, it typically leaves the Rx
* output in a logic 0 state. this means that after the stop bit of the last packet
* byte, the UART Rx input sees a logic 0, and assumes it is a start bit. the
* remaining data bits will always be 0 and, most importantly no stop bit is
* present, causing a framing error. Long story short: if you don't check for the
* framing error flag, you might receive an extra byte with value 0, which is not
* actually transmitted on the RS485 bus. you can catch and ignore this byte by doing
* a frame error check.
*/
if( (XMC_UART_CH_GetStatusFlag(MBRTU_CHANNEL) &
(XMC_UART_CH_STATUS_FLAG_FORMAT_ERROR_IN_STOP_BIT_0 |
XMC_UART_CH_STATUS_FLAG_FORMAT_ERROR_IN_STOP_BIT_1)) != 0)
{
/* clear the error flags. */
XMC_UART_CH_ClearStatusFlag(MBRTU_CHANNEL,
XMC_UART_CH_STATUS_FLAG_FORMAT_ERROR_IN_STOP_BIT_0 |
XMC_UART_CH_STATUS_FLAG_FORMAT_ERROR_IN_STOP_BIT_1);
/* ignore the byte because of a detected frame error. */
result = BLT_FALSE;
}
#if (BOOT_COM_MBRTU_PARITY > 0)
/* check if a parity error was detected (PERR is RCI[4]). */
if ((data_and_status & 0x00100000UL) != 0)
{
/* ignore the byte because of a detected parity error. */
result = BLT_FALSE;
}
#endif
/* store the newly received byte by casting it to exclude the status flags. */
*data = (blt_int8u)data_and_status;
}
/* give the result back to the caller */
return result;
} /*** end of MbRtuReceiveByte ***/
/************************************************************************************//**
** \brief Transmits a communication interface byte.
** \param data Value of byte that is to be transmitted.
** \param end_of_packet BLT_TRUE if this is the last byte of the packet, BLT_FALSE
** otherwise.
** \return none.
**
****************************************************************************************/
static void MbRtuTransmitByte(blt_int8u data, blt_bool end_of_packet)
{
blt_int32u timeout;
/* clear the status flag that indicates that a frame (byte) finished transmission. */
XMC_UART_CH_ClearStatusFlag(MBRTU_CHANNEL, XMC_UART_CH_STATUS_FLAG_TRANSMITTER_FRAME_FINISHED);
/* submit data for transmission. it will be placed in the Tx FIFO and will
* automatically be moved to the transmit shift register, when this one is no longer
* busy.
*/
XMC_UART_CH_Transmit(MBRTU_CHANNEL, data);
/* set timeout time to wait for transmit completion. */
timeout = TimerGet() + MBRTU_BYTE_TX_TIMEOUT_MS;
/* not the last byte of the packet? */
if (end_of_packet == BLT_FALSE)
{
/* wait for the Tx FIFO fill level to be below its configured limit of 1. this
* means the Tx FIFO is empty and the to-be-transmitted byte is now in the transmit
* shift register.
*/
while( (XMC_USIC_CH_TXFIFO_GetEvent(MBRTU_CHANNEL) & XMC_USIC_CH_TXFIFO_EVENT_STANDARD) == 0)
{
/* keep the watchdog happy. */
CopService();
/* break loop upon timeout. this would indicate a hardware failure. */
if (TimerGet() > timeout)
{
break;
}
}
/* reset event */
XMC_USIC_CH_TXFIFO_ClearEvent(MBRTU_CHANNEL, XMC_USIC_CH_TXFIFO_EVENT_STANDARD);
}
/* this is the last byte of a packet. */
else
{
/* wait for transmit frame finished flag to be set, indicating that the last byte has
* left the transmit shift register, including the stopbit(s). this is needed for the
* last byte, otherwise the transceiver's transmit output gets disabled with
* MbRtuDriverOutputControlHook() before the byte reception completes.
*/
while( (XMC_UART_CH_GetStatusFlag(MBRTU_CHANNEL) & XMC_UART_CH_STATUS_FLAG_TRANSMITTER_FRAME_FINISHED) == 0)
{
/* keep the watchdog happy. */
CopService();
/* break loop upon timeout. this would indicate a hardware failure. */
if (TimerGet() > timeout)
{
break;
}
}
}
} /*** end of MbRtuTransmitByte ***/
/************************************************************************************//**
** \brief Obtains the counter value of the 100 kHz free running counter. Note that
** each count represent 10 us. The Modbus RTU communication module uses this
** free running counter for Modbus RTU packet timing related purposes. The
** already available 1 ms timer does not have the needed resolution for this
** purpose.
** \return Current value of the free running counter.
**
****************************************************************************************/
blt_int16u MbRtuFreeRunningCounterGet(void)
{
static blt_bool initialized = BLT_FALSE;
static blt_int32u counts_per_ten_us = 0;
static blt_int32u free_running_counter_last = 0;
static blt_int16u ten_us_tick_counter = 0;
blt_int32u free_running_counter_now;
blt_int32u delta_counts;
blt_int32u ten_us_ticks;
/* perform one-time initialization.*/
if (initialized == BLT_FALSE)
{
/* set the flag to make sure that this part only runs once. */
initialized = BLT_TRUE;
/* calculate how many counts of the SysTick's free running counter equals 10us,
* because one count of a 100 kHz counter equals that. Note that the timer module
* already initialized and enable the SysTick.
*/
counts_per_ten_us = SystemCoreClock / 100000U;
/* initialize current value of the timer's free running counter. */
free_running_counter_last = (SysTick->VAL & SysTick_VAL_CURRENT_Msk);
}
/* get the current value of the free running counter. */
free_running_counter_now = (SysTick->VAL & SysTick_VAL_CURRENT_Msk);
/* Calculate the number of counts that passed since the detection of the last
* millisecond event. Keep in mind that the SysTick has a down-counting 24-bit free
* running counter. Note that this calculation also works, in case the free running
* counter overflowed, thanks to integer math.
*/
delta_counts = free_running_counter_last - free_running_counter_now;
delta_counts &= SysTick_VAL_CURRENT_Msk;
/* did one or more ten microsecond counts pass since the last event? */
if (delta_counts >= counts_per_ten_us)
{
/* calculate how many ten microsecond counts passed. */
ten_us_ticks = delta_counts / counts_per_ten_us;
/* update the counter. */
ten_us_tick_counter += ten_us_ticks;
/* store the counter value of the last event to detect the next one. */
free_running_counter_last -= (ten_us_ticks * counts_per_ten_us);
free_running_counter_last &= SysTick_VAL_CURRENT_Msk;
}
/* return the current value of the 100 kHz free running counter to the caller. */
return ten_us_tick_counter;
} /*** end of MbRtuFreeRunningCounterGet ***/
#endif /* BOOT_COM_MBRTU_ENABLE > 0 */
/*********************************** end of mbrtu.c ************************************/

View File

@ -30,10 +30,10 @@
* Include files
****************************************************************************************/
#include "boot.h" /* bootloader generic header */
#if (BOOT_COM_RS232_ENABLE > 0)
#include "xmc_uart.h" /* UART driver header */
#if (BOOT_COM_RS232_ENABLE > 0)
/****************************************************************************************
* Macro definitions
****************************************************************************************/
@ -86,7 +86,7 @@ void Rs232Init(void)
XMC_UART_CH_CONFIG_t uart_config;
/* the current implementation supports XMC_UART0_CH0 to XMC_UART2_CH1. throw an
* assertion error in case a different CAN channel is configured.
* assertion error in case a different UART channel is configured.
*/
ASSERT_CT((BOOT_COM_RS232_CHANNEL_INDEX >= 0) && (BOOT_COM_RS232_CHANNEL_INDEX <= 5));

View File

@ -30,29 +30,7 @@
* Include files
****************************************************************************************/
#include "boot.h" /* bootloader generic header */
/****************************************************************************************
* Type definitions
****************************************************************************************/
/** \brief Systick registers. */
typedef struct
{
volatile blt_int32u CTRL; /**< SysTick Control and Status Register */
volatile blt_int32u LOAD; /**< SysTick Reload Value Register */
volatile blt_int32u VAL; /**< SysTick Current Value Register */
} tSysTickRegs;
/****************************************************************************************
* Macro definitions
****************************************************************************************/
/** \brief CLKSOURCE bit of the system tick. */
#define SYSTICK_BIT_CLKSOURCE ((blt_int32u)0x00000004)
/** \brief ENABLE bit of the system tick. */
#define SYSTICK_BIT_ENABLE ((blt_int32u)0x00000001)
/** \brief COUNTERFLAG bit of the system tick. */
#define SYSTICK_BIT_COUNTERFLAG ((blt_int32u)0x00010000)
#include "xmc_common.h" /* common vendor library definitions */
/****************************************************************************************
@ -63,31 +41,41 @@ typedef struct
*/
static blt_int32u millisecond_counter;
/** \brief Buffer for storing the last value of the free running counter. */
static blt_int32u free_running_counter_last;
/****************************************************************************************
* Register definitions
****************************************************************************************/
/** \brief Macro to access the system tick registers. */
#define SYSTICK ((tSysTickRegs *) (blt_int32u)0xE000E010)
/** \brief Stores the number of counts of the free running counter that equals one
* millisecond.
*/
static blt_int32u counts_per_millisecond;
/************************************************************************************//**
** \brief Initializes the polling based millisecond timer driver.
** \details Ideally a 100 kHz free running counter is used as the foundation for the
** timer modules, as this gives 10us ticks that can be reused by other
** modules. The XMC4 timers unfortunately do not offer a flexible prescaler
** for their timers to realize such a 100 kHz free running counter. For this
** reason, the SysTick counter is used instead. Its 24-bit free running
** down-counter runs at the system speed.
** \return none.
**
****************************************************************************************/
void TimerInit(void)
{
/* reset the timer configuration */
/* Reset the timer configuration. */
TimerReset();
/* configure the systick frequency as a 1 ms event generator */
SYSTICK->LOAD = BOOT_CPU_SYSTEM_SPEED_KHZ - 1;
/* reset the current counter value */
SYSTICK->VAL = 0;
/* select core clock as source and enable the timer */
SYSTICK->CTRL = SYSTICK_BIT_CLKSOURCE | SYSTICK_BIT_ENABLE;
/* reset the millisecond counter value */
/* Configure the reload value such that the full 24-bit range is used. */
SysTick->LOAD = (0xFFFFFFFFUL & SysTick_LOAD_RELOAD_Msk);
/* Reset the current counter value. */
SysTick->VAL = 0UL;
/* Select core clock as source and enable the timer. */
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
/* Calculate how many counts equal 1 millisecond. */
counts_per_millisecond = SystemCoreClock/1000U;
/* Initialize remaining locals. */
millisecond_counter = 0;
free_running_counter_last = (SysTick->VAL & SysTick_VAL_CURRENT_Msk);
} /*** end of TimerInit ***/
@ -99,11 +87,11 @@ void TimerInit(void)
****************************************************************************************/
void TimerReset(void)
{
/* set the systick's registers back into the default reset value */
SYSTICK->CTRL = 0;
SYSTICK->LOAD = 0;
SYSTICK->VAL = 0;
} /* end of TimerReset */
/* Set the systick's registers back into the default reset value. */
SysTick->CTRL = 0UL;
SysTick->LOAD = 0UL;
SysTick->VAL = 0UL;
} /*** end of TimerReset ***/
/************************************************************************************//**
@ -113,11 +101,30 @@ void TimerReset(void)
****************************************************************************************/
void TimerUpdate(void)
{
/* check if the millisecond event occurred */
if ((SYSTICK->CTRL & SYSTICK_BIT_COUNTERFLAG) != 0)
blt_int32u free_running_counter_now;
blt_int32u delta_counts;
blt_int32u ms_counts;
/* Get the current value of the free running counter. */
free_running_counter_now = (SysTick->VAL & SysTick_VAL_CURRENT_Msk);
/* Calculate the number of counts that passed since the detection of the last
* millisecond event. Keep in mind that the SysTick has a down-counting 24-bit free
* running counter. Note that this calculation also works, in case the free running
* counter overflowed, thanks to integer math.
*/
delta_counts = free_running_counter_last - free_running_counter_now;
delta_counts &= SysTick_VAL_CURRENT_Msk;
/* Did one or more milliseconds pass since the last event? */
if (delta_counts >= counts_per_millisecond)
{
/* increment the millisecond counter */
millisecond_counter++;
/* Calculate how many milliseconds passed. */
ms_counts = delta_counts / counts_per_millisecond;
/* Update the millisecond counter. */
millisecond_counter += ms_counts;
/* Store the counter value of the last millisecond event, to detect the next one. */
free_running_counter_last -= (ms_counts * counts_per_millisecond);
free_running_counter_last &= SysTick_VAL_CURRENT_Msk;
}
} /*** end of TimerUpdate ***/
@ -129,11 +136,11 @@ void TimerUpdate(void)
****************************************************************************************/
blt_int32u TimerGet(void)
{
/* updating timer here allows this function to be called in a loop with timeout
/* Updating timer here allows this function to be called in a loop with timeout
* detection.
*/
TimerUpdate();
/* read and return the amount of milliseconds that passed since initialization */
/* Read and return the amount of milliseconds that passed since initialization. */
return millisecond_counter;
} /*** end of TimerGet ***/