##// END OF EJS Templates
Minor modifications to meet Logiscope requirements
paul -
r77:4928e8d9328f VHDLib206
parent child
Show More
@@ -0,0 +1,22
1 #ifndef TM_BYTE_POSITIONS_H
2 #define TM_BYTE_POSITIONS_H
3
4 #define BYTE_POS_CP_LFR_MODE 11
5
6 // TC_LFR_LOAD_COMMON_PAR
7
8 // TC_LFR_LOAD_NORMAL_PAR
9 #define BYTE_POS_SY_LFR_N_SWF_L 0
10 #define BYTE_POS_SY_LFR_N_SWF_P 2
11 #define BYTE_POS_SY_LFR_N_ASM_P 4
12 #define BYTE_POS_SY_LFR_N_BP_P0 6
13 #define BYTE_POS_SY_LFR_N_BP_P1 7
14
15 // TC_LFR_LOAD_BURST_PAR
16
17 // TC_LFR_LOAD_SBM1_PAR
18
19 // TC_LFR_LOAD_SBM2_PAR
20
21
22 #endif // TM_BYTE_POSITIONS_H
@@ -1,6 +1,6
1 #############################################################################
1 #############################################################################
2 # Makefile for building: bin/fsw
2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 12:02:16 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 15 07:55:16 2013
4 # Project: fsw-qt.pro
4 # Project: fsw-qt.pro
5 # Template: app
5 # Template: app
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
@@ -10,7 +10,7
10
10
11 CC = sparc-rtems-gcc
11 CC = sparc-rtems-gcc
12 CXX = sparc-rtems-g++
12 CXX = sparc-rtems-g++
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=23 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=24 -DPRINT_MESSAGES_ON_CONSOLE
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
@@ -7,11 +7,11 CONFIG -= qt
7 include(./sparc.pri)
7 include(./sparc.pri)
8
8
9 # flight software version
9 # flight software version
10 SWVERSION=-0-23
10 SWVERSION=-0-24
11 DEFINES += SW_VERSION_N1=0
11 DEFINES += SW_VERSION_N1=0
12 DEFINES += SW_VERSION_N2=0
12 DEFINES += SW_VERSION_N2=0
13 DEFINES += SW_VERSION_N3=0
13 DEFINES += SW_VERSION_N3=0
14 DEFINES += SW_VERSION_N4=23
14 DEFINES += SW_VERSION_N4=24
15
15
16 contains( CONFIG, verbose ) {
16 contains( CONFIG, verbose ) {
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
@@ -74,5 +74,6 HEADERS += \
74 ../header/tm_byte_positions.h \
74 ../header/tm_byte_positions.h \
75 ../header/tc_load_dump_parameters.h \
75 ../header/tc_load_dump_parameters.h \
76 ../header/tm_lfr_tc_exe.h \
76 ../header/tm_lfr_tc_exe.h \
77 ../header/tc_acceptance.h
77 ../header/tc_acceptance.h \
78 ../header/fsw_params_nb_bytes.h
78
79
@@ -1,6 +1,6
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE QtCreatorProject>
2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.1, 2013-11-14T11:59:15. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-15T09:52:17. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -51,12 +51,12
51 <data>
51 <data>
52 <variable>ProjectExplorer.Project.Target.0</variable>
52 <variable>ProjectExplorer.Project.Target.0</variable>
53 <valuemap type="QVariantMap">
53 <valuemap type="QVariantMap">
54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value>
54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.3 in PATH (System)</value>
55 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value>
55 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.3 in PATH (System)</value>
56 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value>
56 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{be73cf6a-f9d8-4d5a-8adf-adc2d83e2e44}</value>
57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
61 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
61 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
62 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
62 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
@@ -65,7 +65,7
65 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
65 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
66 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
66 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
67 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
67 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
68 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
68 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
69 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
69 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
70 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
70 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
71 </valuemap>
71 </valuemap>
@@ -79,7 +79,7
79 <value type="QString">-r</value>
79 <value type="QString">-r</value>
80 </valuelist>
80 </valuelist>
81 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
81 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
82 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value>
82 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
83 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
83 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
84 </valuemap>
84 </valuemap>
85 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
85 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
@@ -98,7 +98,7
98 <value type="QString">-r</value>
98 <value type="QString">-r</value>
99 </valuelist>
99 </valuelist>
100 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
100 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
101 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value>
101 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
102 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
102 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
103 </valuemap>
103 </valuemap>
104 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
104 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
@@ -109,73 +109,14
109 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
109 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
110 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
110 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
111 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
111 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value>
112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
113 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
113 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
114 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
114 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
115 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
115 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
116 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
116 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/admin/opt/DEV_PLE/FSW-qt</value>
117 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
117 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
118 </valuemap>
118 </valuemap>
119 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
119 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
120 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
121 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
122 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
123 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
124 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
125 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
126 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
127 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
128 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
129 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
130 </valuemap>
131 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
132 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
133 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
134 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
135 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
136 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
137 <value type="QString">-w</value>
138 <value type="QString">-r</value>
139 </valuelist>
140 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
141 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value>
142 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
143 </valuemap>
144 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
145 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
146 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
147 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
148 </valuemap>
149 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
150 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
151 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
152 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
153 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
154 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
155 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
156 <value type="QString">-w</value>
157 <value type="QString">-r</value>
158 </valuelist>
159 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
160 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value>
161 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
162 </valuemap>
163 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
164 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
165 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
166 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
167 </valuemap>
168 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
169 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
170 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
171 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value>
172 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
173 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
174 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
175 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
176 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
177 </valuemap>
178 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
179 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
120 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
180 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
121 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
181 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
122 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
@@ -184,7 +125,7
184 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
125 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
185 </valuemap>
126 </valuemap>
186 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
127 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
187 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value>
128 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
188 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
129 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
189 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
130 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
190 </valuemap>
131 </valuemap>
@@ -226,7 +167,7
226 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
167 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
227 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
168 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
228 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
169 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
229 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
170 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/admin/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
230 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
171 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
231 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
172 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
232 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
173 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
@@ -237,57 +178,9
237 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
178 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
238 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
179 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
239 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
180 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
240 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
241 </valuemap>
242 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
243 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
244 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
245 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
246 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
247 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
248 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
249 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
250 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
251 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
252 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
253 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
254 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
255 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
256 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
257 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
258 <value type="int">0</value>
259 <value type="int">1</value>
260 <value type="int">2</value>
261 <value type="int">3</value>
262 <value type="int">4</value>
263 <value type="int">5</value>
264 <value type="int">6</value>
265 <value type="int">7</value>
266 <value type="int">8</value>
267 <value type="int">9</value>
268 <value type="int">10</value>
269 <value type="int">11</value>
270 <value type="int">12</value>
271 <value type="int">13</value>
272 <value type="int">14</value>
273 </valuelist>
274 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
275 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
276 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
277 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value>
278 <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value>
279 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value>
280 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value>
281 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
282 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
283 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
284 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
285 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
286 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
287 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
288 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
181 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
289 </valuemap>
182 </valuemap>
290 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
183 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
291 </valuemap>
184 </valuemap>
292 </data>
185 </data>
293 <data>
186 <data>
@@ -296,7 +189,7
296 </data>
189 </data>
297 <data>
190 <data>
298 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
191 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
299 <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
192 <value type="QByteArray">{cdbf9cdc-1e84-406e-889b-c4feef49e75c}</value>
300 </data>
193 </data>
301 <data>
194 <data>
302 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
195 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
@@ -226,45 +226,7 enum TM_TYPE{
226 TM_LFR_PAR_DUMP
226 TM_LFR_PAR_DUMP
227 };
227 };
228
228
229 struct TMHeader_str
229 typedef struct {
230 {
231 unsigned char targetLogicalAddress;
232 unsigned char protocolIdentifier;
233 unsigned char reserved;
234 unsigned char userApplication;
235 unsigned char packetID[2];
236 unsigned char packetSequenceControl[2];
237 unsigned char packetLength[2];
238 // DATA FIELD HEADER
239 unsigned char spare1_pusVersion_spare2;
240 unsigned char serviceType;
241 unsigned char serviceSubType;
242 unsigned char destinationID;
243 unsigned char time[6];
244 };
245 typedef struct TMHeader_str TMHeader_t;
246
247 struct Packet_TM_LFR_TC_EXE_str
248 {
249 unsigned char targetLogicalAddress;
250 unsigned char protocolIdentifier;
251 unsigned char reserved;
252 unsigned char userApplication;
253 unsigned char packetID[2];
254 unsigned char packetSequenceControl[2];
255 unsigned char packetLength[2];
256 // DATA FIELD HEADER
257 unsigned char spare1_pusVersion_spare2;
258 unsigned char serviceType;
259 unsigned char serviceSubType;
260 unsigned char destinationID;
261 unsigned char time[6];
262 unsigned char data[LENGTH_TM_LFR_TC_EXE_MAX - 10 + 1];
263 };
264 typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t;
265
266 struct Packet_TM_LFR_TC_EXE_SUCCESS_str
267 {
268 unsigned char targetLogicalAddress;
230 unsigned char targetLogicalAddress;
269 unsigned char protocolIdentifier;
231 unsigned char protocolIdentifier;
270 unsigned char reserved;
232 unsigned char reserved;
@@ -282,11 +244,9 struct Packet_TM_LFR_TC_EXE_SUCCESS_str
282 //
244 //
283 unsigned char telecommand_pkt_id[2];
245 unsigned char telecommand_pkt_id[2];
284 unsigned char pkt_seq_control[2];
246 unsigned char pkt_seq_control[2];
285 };
247 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
286 typedef struct Packet_TM_LFR_TC_EXE_SUCCESS_str Packet_TM_LFR_TC_EXE_SUCCESS_t;
287
248
288 struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str
249 typedef struct {
289 {
290 unsigned char targetLogicalAddress;
250 unsigned char targetLogicalAddress;
291 unsigned char protocolIdentifier;
251 unsigned char protocolIdentifier;
292 unsigned char reserved;
252 unsigned char reserved;
@@ -309,11 +269,9 struct Packet_TM_LFR_TC_EXE_INCONSISTENT
309 unsigned char tc_subtype;
269 unsigned char tc_subtype;
310 unsigned char byte_position;
270 unsigned char byte_position;
311 unsigned char rcv_value;
271 unsigned char rcv_value;
312 };
272 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
313 typedef struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
314
273
315 struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str
274 typedef struct {
316 {
317 unsigned char targetLogicalAddress;
275 unsigned char targetLogicalAddress;
318 unsigned char protocolIdentifier;
276 unsigned char protocolIdentifier;
319 unsigned char reserved;
277 unsigned char reserved;
@@ -335,11 +293,9 struct Packet_TM_LFR_TC_EXE_NOT_EXECUTAB
335 unsigned char tc_service;
293 unsigned char tc_service;
336 unsigned char tc_subtype;
294 unsigned char tc_subtype;
337 unsigned char lfr_status_word[2];
295 unsigned char lfr_status_word[2];
338 };
296 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
339 typedef struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
340
297
341 struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str
298 typedef struct {
342 {
343 unsigned char targetLogicalAddress;
299 unsigned char targetLogicalAddress;
344 unsigned char protocolIdentifier;
300 unsigned char protocolIdentifier;
345 unsigned char reserved;
301 unsigned char reserved;
@@ -360,11 +316,9 struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMEN
360 unsigned char pkt_seq_control[2];
316 unsigned char pkt_seq_control[2];
361 unsigned char tc_service;
317 unsigned char tc_service;
362 unsigned char tc_subtype;
318 unsigned char tc_subtype;
363 };
319 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
364 typedef struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
365
320
366 struct Packet_TM_LFR_TC_EXE_ERROR_str
321 typedef struct {
367 {
368 unsigned char targetLogicalAddress;
322 unsigned char targetLogicalAddress;
369 unsigned char protocolIdentifier;
323 unsigned char protocolIdentifier;
370 unsigned char reserved;
324 unsigned char reserved;
@@ -385,11 +339,9 struct Packet_TM_LFR_TC_EXE_ERROR_str
385 unsigned char pkt_seq_control[2];
339 unsigned char pkt_seq_control[2];
386 unsigned char tc_service;
340 unsigned char tc_service;
387 unsigned char tc_subtype;
341 unsigned char tc_subtype;
388 };
342 } Packet_TM_LFR_TC_EXE_ERROR_t;
389 typedef struct Packet_TM_LFR_TC_EXE_ERROR_str Packet_TM_LFR_TC_EXE_ERROR_t;
390
343
391 struct Packet_TM_LFR_TC_EXE_CORRUPTED_str
344 typedef struct {
392 {
393 unsigned char targetLogicalAddress;
345 unsigned char targetLogicalAddress;
394 unsigned char protocolIdentifier;
346 unsigned char protocolIdentifier;
395 unsigned char reserved;
347 unsigned char reserved;
@@ -414,11 +366,9 struct Packet_TM_LFR_TC_EXE_CORRUPTED_st
414 unsigned char pkt_datafieldsize_cnt[2];
366 unsigned char pkt_datafieldsize_cnt[2];
415 unsigned char rcv_crc[2];
367 unsigned char rcv_crc[2];
416 unsigned char computed_crc[2];
368 unsigned char computed_crc[2];
417 };
369 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
418 typedef struct Packet_TM_LFR_TC_EXE_CORRUPTED_str Packet_TM_LFR_TC_EXE_CORRUPTED_t;
419
370
420 struct Header_TM_LFR_SCIENCE_SWF_str
371 typedef struct {
421 {
422 unsigned char targetLogicalAddress;
372 unsigned char targetLogicalAddress;
423 unsigned char protocolIdentifier;
373 unsigned char protocolIdentifier;
424 unsigned char reserved;
374 unsigned char reserved;
@@ -439,11 +389,9 struct Header_TM_LFR_SCIENCE_SWF_str
439 unsigned char pktNr;
389 unsigned char pktNr;
440 unsigned char acquisitionTime[6];
390 unsigned char acquisitionTime[6];
441 unsigned char blkNr[2];
391 unsigned char blkNr[2];
442 };
392 } Header_TM_LFR_SCIENCE_SWF_t;
443 typedef struct Header_TM_LFR_SCIENCE_SWF_str Header_TM_LFR_SCIENCE_SWF_t;
444
393
445 struct Header_TM_LFR_SCIENCE_CWF_str
394 typedef struct {
446 {
447 unsigned char targetLogicalAddress;
395 unsigned char targetLogicalAddress;
448 unsigned char protocolIdentifier;
396 unsigned char protocolIdentifier;
449 unsigned char reserved;
397 unsigned char reserved;
@@ -462,11 +410,9 struct Header_TM_LFR_SCIENCE_CWF_str
462 unsigned char hkBIA;
410 unsigned char hkBIA;
463 unsigned char acquisitionTime[6];
411 unsigned char acquisitionTime[6];
464 unsigned char blkNr[2];
412 unsigned char blkNr[2];
465 };
413 } Header_TM_LFR_SCIENCE_CWF_t;
466 typedef struct Header_TM_LFR_SCIENCE_CWF_str Header_TM_LFR_SCIENCE_CWF_t;
467
414
468 struct Header_TM_LFR_SCIENCE_ASM_str
415 typedef struct {
469 {
470 unsigned char targetLogicalAddress;
416 unsigned char targetLogicalAddress;
471 unsigned char protocolIdentifier;
417 unsigned char protocolIdentifier;
472 unsigned char reserved;
418 unsigned char reserved;
@@ -487,12 +433,10 struct Header_TM_LFR_SCIENCE_ASM_str
487 unsigned char nrASM;
433 unsigned char nrASM;
488 unsigned char acquisitionTime[6];
434 unsigned char acquisitionTime[6];
489 unsigned char blkNr[2];
435 unsigned char blkNr[2];
490 };
436 } Header_TM_LFR_SCIENCE_ASM_t;
491 typedef struct Header_TM_LFR_SCIENCE_ASM_str Header_TM_LFR_SCIENCE_ASM_t;
492
437
493 struct ccsdsTelecommandPacket_str
438 typedef struct {
494 {
439 //targetLogicalAddress is removed by the grspw module
495 //unsigned char targetLogicalAddress; // removed by the grspw module
496 unsigned char protocolIdentifier;
440 unsigned char protocolIdentifier;
497 unsigned char reserved;
441 unsigned char reserved;
498 unsigned char userApplication;
442 unsigned char userApplication;
@@ -505,11 +449,9 struct ccsdsTelecommandPacket_str
505 unsigned char serviceSubType;
449 unsigned char serviceSubType;
506 unsigned char sourceID;
450 unsigned char sourceID;
507 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
451 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
508 };
452 } ccsdsTelecommandPacket_t;
509 typedef struct ccsdsTelecommandPacket_str ccsdsTelecommandPacket_t;
510
453
511 struct Packet_TM_LFR_HK_str
454 typedef struct {
512 {
513 unsigned char targetLogicalAddress;
455 unsigned char targetLogicalAddress;
514 unsigned char protocolIdentifier;
456 unsigned char protocolIdentifier;
515 unsigned char reserved;
457 unsigned char reserved;
@@ -607,11 +549,9 struct Packet_TM_LFR_HK_str
607 unsigned char hk_lfr_cpu_data_exception;
549 unsigned char hk_lfr_cpu_data_exception;
608 unsigned char hk_lfr_cpu_div_exception;
550 unsigned char hk_lfr_cpu_div_exception;
609 unsigned char hk_lfr_cpu_arith_overflow;
551 unsigned char hk_lfr_cpu_arith_overflow;
610 };
552 } Packet_TM_LFR_HK_t;
611 typedef struct Packet_TM_LFR_HK_str Packet_TM_LFR_HK_t;
612
553
613 struct Packet_TM_LFR_PARAMETER_DUMP_str
554 typedef struct {
614 {
615 unsigned char targetLogicalAddress;
555 unsigned char targetLogicalAddress;
616 unsigned char protocolIdentifier;
556 unsigned char protocolIdentifier;
617 unsigned char reserved;
557 unsigned char reserved;
@@ -654,8 +594,7 struct Packet_TM_LFR_PARAMETER_DUMP_str
654 // SBM2 PARAMETERS
594 // SBM2 PARAMETERS
655 unsigned char sy_lfr_s2_bp_p0;
595 unsigned char sy_lfr_s2_bp_p0;
656 unsigned char sy_lfr_s2_bp_p1;
596 unsigned char sy_lfr_s2_bp_p1;
657 };
597 } Packet_TM_LFR_PARAMETER_DUMP_t;
658 typedef struct Packet_TM_LFR_PARAMETER_DUMP_str Packet_TM_LFR_PARAMETER_DUMP_t;
659
598
660
599
661 #endif // CCSDS_TYPES_H_INCLUDED
600 #endif // CCSDS_TYPES_H_INCLUDED
@@ -12,22 +12,6
12
12
13 #include "fsw_spacewire.h"
13 #include "fsw_spacewire.h"
14
14
15 extern rtems_name misc_name[5];
16 extern rtems_id misc_id[5];
17 extern rtems_name Task_name[20]; /* array of task names */
18 extern rtems_id Task_id[20]; /* array of task ids */
19 extern unsigned int maxCount;
20 extern int fdSPW; // grspw file descriptor
21 extern int fdUART; // uart file descriptor
22 extern unsigned char lfrCurrentMode;
23
24 // MODE PARAMETERS
25 extern struct param_local_str param_local;
26 extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
27 extern unsigned short sequenceCounters_SCIENCE_NORMAL_BURST;
28 extern unsigned short sequenceCounters_SCIENCE_SBM1_SBM2;
29 extern unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID];
30
31 // RTEMS TASKS
15 // RTEMS TASKS
32 rtems_task Init( rtems_task_argument argument);
16 rtems_task Init( rtems_task_argument argument);
33
17
@@ -47,6 +31,5 extern int rtems_cpu_usage_reset( void )
47 extern void rtems_stack_checker_report_usage( void );
31 extern void rtems_stack_checker_report_usage( void );
48
32
49 extern int sched_yield( void );
33 extern int sched_yield( void );
50 extern int errno;
51
34
52 #endif // FSW_INIT_H_INCLUDED
35 #endif // FSW_INIT_H_INCLUDED
@@ -11,15 +11,15
11 rtems_name name_hk_rate_monotonic; // name of the HK rate monotonic
11 rtems_name name_hk_rate_monotonic; // name of the HK rate monotonic
12 rtems_id HK_id; // id of the HK rate monotonic period
12 rtems_id HK_id; // id of the HK rate monotonic period
13
13
14 extern rtems_name misc_name[5];
14 //extern rtems_name misc_name[5];
15 time_management_regs_t *time_management_regs;
15 //time_management_regs_t *time_management_regs;
16 extern Packet_TM_LFR_HK_t housekeeping_packet;
16 //extern Packet_TM_LFR_HK_t housekeeping_packet;
17
17
18 int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
18 void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
19 unsigned char interrupt_level, rtems_isr (*timer_isr)() );
19 unsigned char interrupt_level, rtems_isr (*timer_isr)() );
20 int timer_start( gptimer_regs_t *gptimer_regs, unsigned char timer );
20 void timer_start( gptimer_regs_t *gptimer_regs, unsigned char timer );
21 int timer_stop( gptimer_regs_t *gptimer_regs, unsigned char timer );
21 void timer_stop( gptimer_regs_t *gptimer_regs, unsigned char timer );
22 int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider);
22 void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider);
23
23
24 // SERIAL LINK
24 // SERIAL LINK
25 int send_console_outputs_on_apbuart_port( void );
25 int send_console_outputs_on_apbuart_port( void );
@@ -3,8 +3,6
3
3
4 #define NB_BINS_PER_SM 128
4 #define NB_BINS_PER_SM 128
5 #define NB_VALUES_PER_SM 25
5 #define NB_VALUES_PER_SM 25
6 //#define TOTAL_SIZE_SM (NB_BINS_PER_SM * NB_VALUES_PER_SM)
7 //#define SM_HEADER 4
8 #define TOTAL_SIZE_SM 0
6 #define TOTAL_SIZE_SM 0
9 #define SM_HEADER 0
7 #define SM_HEADER 0
10
8
@@ -15,7 +13,7
15 #define NB_AVERAGE_NORMAL_f0 96*4
13 #define NB_AVERAGE_NORMAL_f0 96*4
16 #define NB_SM_TO_RECEIVE_BEFORE_AVF0 8
14 #define NB_SM_TO_RECEIVE_BEFORE_AVF0 8
17
15
18 struct BP1_str{
16 typedef struct {
19 volatile unsigned char PE[2];
17 volatile unsigned char PE[2];
20 volatile unsigned char PB[2];
18 volatile unsigned char PB[2];
21 volatile unsigned char V0;
19 volatile unsigned char V0;
@@ -23,7 +21,6 struct BP1_str{
23 volatile unsigned char V2_ELLIP_DOP;
21 volatile unsigned char V2_ELLIP_DOP;
24 volatile unsigned char SZ;
22 volatile unsigned char SZ;
25 volatile unsigned char VPHI;
23 volatile unsigned char VPHI;
26 };
24 } BP1_t;
27 typedef struct BP1_str BP1_t;
28
25
29 #endif // FSW_PARAMS_PROCESSING_H
26 #endif // FSW_PARAMS_PROCESSING_H
@@ -11,7 +11,6
11 #include "fsw_params.h"
11 #include "fsw_params.h"
12 #include "fsw_spacewire.h"
12 #include "fsw_spacewire.h"
13
13
14
15 extern volatile int spec_mat_f0_0[ ];
14 extern volatile int spec_mat_f0_0[ ];
16 extern volatile int spec_mat_f0_1[ ];
15 extern volatile int spec_mat_f0_1[ ];
17 extern volatile int spec_mat_f0_a[ ];
16 extern volatile int spec_mat_f0_a[ ];
@@ -14,8 +14,6
14
14
15 extern spw_stats spacewire_stats;
15 extern spw_stats spacewire_stats;
16 extern spw_stats spacewire_stats_backup;
16 extern spw_stats spacewire_stats_backup;
17 extern Packet_TM_LFR_HK_t housekeeping_packet;
18 extern rtems_id Task_id[20]; /* array of task ids */
19
17
20 // RTEMS TASK
18 // RTEMS TASK
21 rtems_task spiq_task( rtems_task_argument argument );
19 rtems_task spiq_task( rtems_task_argument argument );
@@ -18,34 +18,29 struct ahbuart_regs_str{
18 volatile unsigned int scaler;
18 volatile unsigned int scaler;
19 };
19 };
20
20
21 struct timer_regs_str
21 typedef struct {
22 {
23 volatile unsigned int counter;
22 volatile unsigned int counter;
24 volatile unsigned int reload;
23 volatile unsigned int reload;
25 volatile unsigned int ctrl;
24 volatile unsigned int ctrl;
26 volatile unsigned int unused;
25 volatile unsigned int unused;
27 };
26 } timer_regs_t;
28 typedef struct timer_regs_str timer_regs_t;
29
27
30 struct gptimer_regs_str
28 typedef struct {
31 {
32 volatile unsigned int scaler_value;
29 volatile unsigned int scaler_value;
33 volatile unsigned int scaler_reload;
30 volatile unsigned int scaler_reload;
34 volatile unsigned int conf;
31 volatile unsigned int conf;
35 volatile unsigned int unused0;
32 volatile unsigned int unused0;
36 timer_regs_t timer[NB_GPTIMER];
33 timer_regs_t timer[NB_GPTIMER];
37 };
34 } gptimer_regs_t;
38 typedef struct gptimer_regs_str gptimer_regs_t;
39
35
40 struct time_management_regs_str{
36 typedef struct {
41 volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time
37 volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time
42 volatile int coarse_time_load;
38 volatile int coarse_time_load;
43 volatile int coarse_time;
39 volatile int coarse_time;
44 volatile int fine_time;
40 volatile int fine_time;
45 };
41 } time_management_regs_t;
46 typedef struct time_management_regs_str time_management_regs_t;
47
42
48 struct waveform_picker_regs_str{
43 typedef struct {
49 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
44 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
50 volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0
45 volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0
51 volatile int addr_data_f0; // 0x08 10 ***
46 volatile int addr_data_f0; // 0x08 10 ***
@@ -58,36 +53,15 struct waveform_picker_regs_str{
58 volatile int delta_f2_f0; // 0x24 0001 ***
53 volatile int delta_f2_f0; // 0x24 0001 ***
59 volatile int nb_burst_available;// 0x28 0010 ***
54 volatile int nb_burst_available;// 0x28 0010 ***
60 volatile int nb_snapshot_param; // 0x2c 0011 ***
55 volatile int nb_snapshot_param; // 0x2c 0011 ***
61 };
56 } waveform_picker_regs_t;
62 typedef struct waveform_picker_regs_str waveform_picker_regs_t;
63
57
64 struct waveform_picker_regs_str_alt{
58 typedef struct {
65 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
66 volatile int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
67 volatile int addr_data_f0; // 0x08
68 volatile int addr_data_f1; // 0x0c
69 volatile int addr_data_f2; // 0x10
70 volatile int addr_data_f3; // 0x14
71 volatile int status; // 0x18
72 volatile int delta_snapshot; // 0x1c
73 volatile int delta_f0; // 0x20
74 volatile int delta_f0_2;
75 volatile int delta_f1;
76 volatile int delta_f2;
77 volatile int nb_data_by_buffer;
78 volatile int snapshot_param;
79 volatile int start_date;
80 };
81 typedef struct waveform_picker_regs_str_alt waveform_picker_regs_t_alt;
82
83 struct spectral_matrix_regs_str{
84 volatile int config;
59 volatile int config;
85 volatile int status;
60 volatile int status;
86 volatile int matrixF0_Address0;
61 volatile int matrixF0_Address0;
87 volatile int matrixFO_Address1;
62 volatile int matrixFO_Address1;
88 volatile int matrixF1_Address;
63 volatile int matrixF1_Address;
89 volatile int matrixF2_Address;
64 volatile int matrixF2_Address;
90 };
65 } spectral_matrix_regs_t;
91 typedef struct spectral_matrix_regs_str spectral_matrix_regs_t;
92
66
93 #endif // GRLIB_REGS_H_INCLUDED
67 #endif // GRLIB_REGS_H_INCLUDED
@@ -10,17 +10,8
10 #include "wf_handler.h"
10 #include "wf_handler.h"
11
11
12 // MODE PARAMETERS
12 // MODE PARAMETERS
13 extern struct param_sbm1_str param_sbm1;
14 extern struct param_sbm2_str param_sbm2;
15 extern time_management_regs_t *time_management_regs;
16 extern waveform_picker_regs_t *waveform_picker_regs;
17 extern gptimer_regs_t *gptimer_regs;
18 extern rtems_name misc_name[5];
19 extern rtems_id Task_id[20]; /* array of task ids */
20 extern unsigned char lfrCurrentMode;
21 extern unsigned int maxCount;
13 extern unsigned int maxCount;
22
14
23
24 //****
15 //****
25 // ISR
16 // ISR
26 rtems_isr commutation_isr1( rtems_vector_number vector );
17 rtems_isr commutation_isr1( rtems_vector_number vector );
@@ -42,7 +33,7 int action_update_time(ccsdsTelecommandP
42 // mode transition
33 // mode transition
43 int transition_validation(unsigned char requestedMode);
34 int transition_validation(unsigned char requestedMode);
44 int stop_current_mode();
35 int stop_current_mode();
45 int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC);
36 int enter_mode(unsigned char mode);
46 int enter_standby_mode();
37 int enter_standby_mode();
47 int enter_normal_mode();
38 int enter_normal_mode();
48 int enter_burst_mode();
39 int enter_burst_mode();
@@ -9,11 +9,6
9 #include "tm_lfr_tc_exe.h"
9 #include "tm_lfr_tc_exe.h"
10 #include "fsw_misc.h"
10 #include "fsw_misc.h"
11
11
12 extern int fdSPW;
13 extern unsigned char lfrCurrentMode;
14 extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
15 extern Packet_TM_LFR_HK_t housekeeping_packet;
16
17 int action_load_common_par( ccsdsTelecommandPacket_t *TC );
12 int action_load_common_par( ccsdsTelecommandPacket_t *TC );
18 int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
13 int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
19 int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
14 int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
@@ -7,8 +7,6
7 #include "fsw_params.h"
7 #include "fsw_params.h"
8 #include "fsw_spacewire.h"
8 #include "fsw_spacewire.h"
9
9
10 extern time_management_regs_t *time_management_regs;
11 extern Packet_TM_LFR_HK_t housekeeping_packet;
12 extern unsigned short sequenceCounters_TC_EXE[];
10 extern unsigned short sequenceCounters_TC_EXE[];
13
11
14 int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
12 int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
@@ -27,7 +27,6 extern volatile int wf_cont_f3[ ];
27 extern volatile int wf_cont_f3_bis[ ];
27 extern volatile int wf_cont_f3_bis[ ];
28 extern char wf_cont_f3_light[ ];
28 extern char wf_cont_f3_light[ ];
29 extern waveform_picker_regs_t *waveform_picker_regs;
29 extern waveform_picker_regs_t *waveform_picker_regs;
30 extern waveform_picker_regs_t_alt *waveform_picker_regs_alt;
31 extern time_management_regs_t *time_management_regs;
30 extern time_management_regs_t *time_management_regs;
32 extern Packet_TM_LFR_HK_t housekeeping_packet;
31 extern Packet_TM_LFR_HK_t housekeeping_packet;
33 extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
32 extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
@@ -77,11 +76,11 void reset_waveform_picker_regs();
77
76
78 //*****************
77 //*****************
79 // local parameters
78 // local parameters
80 void set_local_sbm1_nb_cwf_max();
79 void set_local_sbm1_nb_cwf_max( void );
81 void set_local_sbm2_nb_cwf_max();
80 void set_local_sbm2_nb_cwf_max( void );
82 void set_local_nb_interrupt_f0_MAX();
81 void set_local_nb_interrupt_f0_MAX( void );
83 void reset_local_sbm1_nb_cwf_sent();
82 void reset_local_sbm1_nb_cwf_sent( void );
84 void reset_local_sbm2_nb_cwf_sent();
83 void reset_local_sbm2_nb_cwf_sent( void );
85
84
86 void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid );
85 void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid );
87
86
@@ -37,7 +37,6 gptimer_regs_t *gptimer_regs
37 #ifdef GSA
37 #ifdef GSA
38 #else
38 #else
39 waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER;
39 waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER;
40 waveform_picker_regs_t_alt *waveform_picker_regs_alt = (waveform_picker_regs_t_alt*) REGS_ADDR_WAVEFORM_PICKER;
41 #endif
40 #endif
42 spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX;
41 spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX;
43
42
@@ -7,16 +7,16
7
7
8 #include "fsw_misc.h"
8 #include "fsw_misc.h"
9
9
10 char *DumbMessages[7] = {"in DUMB *** default", // RTEMS_EVENT_0
10 //char *DumbMessages[7] = {"in DUMB *** default", // RTEMS_EVENT_0
11 "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1
11 // "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1
12 "in DUMB *** waveforms_isr", // RTEMS_EVENT_2
12 // "in DUMB *** waveforms_isr", // RTEMS_EVENT_2
13 "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3
13 // "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3
14 "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4
14 // "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4
15 "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5
15 // "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5
16 "ERR HK" // RTEMS_EVENT_6
16 // "ERR HK" // RTEMS_EVENT_6
17 };
17 //};
18
18
19 int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
19 void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
20 unsigned char interrupt_level, rtems_isr (*timer_isr)() )
20 unsigned char interrupt_level, rtems_isr (*timer_isr)() )
21 {
21 {
22 /** This function configures a GPTIMER timer instantiated in the VHDL design.
22 /** This function configures a GPTIMER timer instantiated in the VHDL design.
@@ -27,8 +27,6 int configure_timer(gptimer_regs_t *gpti
27 * @param interrupt_level is the interrupt level that the timer drives.
27 * @param interrupt_level is the interrupt level that the timer drives.
28 * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer.
28 * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer.
29 *
29 *
30 * @return
31 *
32 * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76
30 * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76
33 *
31 *
34 */
32 */
@@ -43,19 +41,15 int configure_timer(gptimer_regs_t *gpti
43 }
41 }
44
42
45 timer_set_clock_divider( gptimer_regs, timer, clock_divider);
43 timer_set_clock_divider( gptimer_regs, timer, clock_divider);
46
47 return 1;
48 }
44 }
49
45
50 int timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer)
46 void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer)
51 {
47 {
52 /** This function starts a GPTIMER timer.
48 /** This function starts a GPTIMER timer.
53 *
49 *
54 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
50 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
55 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
51 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
56 *
52 *
57 * @return 1
58 *
59 */
53 */
60
54
61 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
55 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
@@ -63,29 +57,23 int timer_start(gptimer_regs_t *gptimer_
63 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer
57 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer
64 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart
58 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart
65 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable
59 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable
66
67 return 1;
68 }
60 }
69
61
70 int timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer)
62 void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer)
71 {
63 {
72 /** This function stops a GPTIMER timer.
64 /** This function stops a GPTIMER timer.
73 *
65 *
74 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
66 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
75 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
67 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
76 *
68 *
77 * @return 1
78 *
79 */
69 */
80
70
81 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer
71 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer
82 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable
72 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable
83 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
73 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
84
85 return 1;
86 }
74 }
87
75
88 int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider)
76 void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider)
89 {
77 {
90 /** This function sets the clock divider of a GPTIMER timer.
78 /** This function sets the clock divider of a GPTIMER timer.
91 *
79 *
@@ -93,13 +81,9 int timer_set_clock_divider(gptimer_regs
93 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
81 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
94 * @param clock_divider is the divider of the 1 MHz clock that will be configured.
82 * @param clock_divider is the divider of the 1 MHz clock that will be configured.
95 *
83 *
96 * @return 1
97 *
98 */
84 */
99
85
100 gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz
86 gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz
101
102 return 1;
103 }
87 }
104
88
105 int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port
89 int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port
@@ -247,6 +231,15 rtems_task dumb_task( rtems_task_argumen
247 unsigned int fine_time = 0;
231 unsigned int fine_time = 0;
248 rtems_event_set event_out;
232 rtems_event_set event_out;
249
233
234 char *DumbMessages[7] = {"in DUMB *** default", // RTEMS_EVENT_0
235 "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1
236 "in DUMB *** waveforms_isr", // RTEMS_EVENT_2
237 "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3
238 "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4
239 "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5
240 "ERR HK" // RTEMS_EVENT_6
241 };
242
250 BOOT_PRINTF("in DUMB *** \n")
243 BOOT_PRINTF("in DUMB *** \n")
251
244
252 while(1){
245 while(1){
@@ -296,6 +289,12 void init_housekeeping_parameters( void
296
289
297 void increment_seq_counter( unsigned char *packet_sequence_control)
290 void increment_seq_counter( unsigned char *packet_sequence_control)
298 {
291 {
292 /** This function increment the sequence counter psased in argument.
293 *
294 * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0.
295 *
296 */
297
299 unsigned short sequence_cnt;
298 unsigned short sequence_cnt;
300 unsigned short segmentation_grouping_flag;
299 unsigned short segmentation_grouping_flag;
301 unsigned short new_packet_sequence_control;
300 unsigned short new_packet_sequence_control;
@@ -323,6 +322,10 void increment_seq_counter( unsigned cha
323
322
324 void getTime( unsigned char *time)
323 void getTime( unsigned char *time)
325 {
324 {
325 /** This function write the current local time in the time buffer passed in argument.
326 *
327 */
328
326 time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
329 time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
327 time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
330 time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
328 time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
331 time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
@@ -11,7 +11,6
11
11
12 #include "fsw_processing_globals.c"
12 #include "fsw_processing_globals.c"
13
13
14 unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ];
15 BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ];
14 BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ];
16 float averaged_spec_mat_f0[ TOTAL_SIZE_SM ];
15 float averaged_spec_mat_f0[ TOTAL_SIZE_SM ];
17 char averaged_spec_mat_f0_char[ TOTAL_SIZE_SM * 2 ];
16 char averaged_spec_mat_f0_char[ TOTAL_SIZE_SM * 2 ];
@@ -119,26 +118,6 rtems_task smiq_task(rtems_task_argument
119 }
118 }
120 }
119 }
121
120
122 //rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ
123 //{
124 // rtems_event_set event_out;
125 // unsigned int nb_interrupt_f0 = 0;
126
127 // PRINTF("in SMIQ *** \n")
128
129 // while(1){
130 // rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0
131 // nb_interrupt_f0 = nb_interrupt_f0 + 1;
132 // if (nb_interrupt_f0 == param_local.local_nb_interrupt_f0_MAX ){
133 // if (rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL)
134 // {
135 // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 );
136 // }
137 // nb_interrupt_f0 = 0;
138 // }
139 // }
140 //}
141
142 rtems_task spw_bppr_task(rtems_task_argument argument)
121 rtems_task spw_bppr_task(rtems_task_argument argument)
143 {
122 {
144 rtems_status_code status;
123 rtems_status_code status;
@@ -188,6 +167,7 rtems_task avf0_task(rtems_task_argument
188 rtems_task bpf0_task(rtems_task_argument argument)
167 rtems_task bpf0_task(rtems_task_argument argument)
189 {
168 {
190 rtems_event_set event_out;
169 rtems_event_set event_out;
170 static unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ];
191
171
192 BOOT_PRINTF("in BPFO *** \n")
172 BOOT_PRINTF("in BPFO *** \n")
193
173
@@ -195,7 +175,6 rtems_task bpf0_task(rtems_task_argument
195 rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0
175 rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0
196 matrix_compression(averaged_spec_mat_f0, 0, compressed_spec_mat_f0);
176 matrix_compression(averaged_spec_mat_f0, 0, compressed_spec_mat_f0);
197 BP1_set(compressed_spec_mat_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0);
177 BP1_set(compressed_spec_mat_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0);
198 //PRINTF("IN TASK BPF0 *** Matrix compressed, parameters calculated\n")
199 }
178 }
200 }
179 }
201
180
@@ -237,10 +216,10 rtems_task matr_task(rtems_task_argument
237
216
238 void matrix_reset(volatile float *averaged_spec_mat)
217 void matrix_reset(volatile float *averaged_spec_mat)
239 {
218 {
240 // int i;
219 int i;
241 // for(i=0; i<TOTAL_SIZE_SM; i++){
220 for(i=0; i<TOTAL_SIZE_SM; i++){
242 // averaged_spec_mat_f0[i] = 0;
221 averaged_spec_mat[i] = 0;
243 // }
222 }
244 }
223 }
245
224
246 void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat)
225 void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat)
@@ -13,14 +13,6
13
13
14 #include "fsw_spacewire.h"
14 #include "fsw_spacewire.h"
15
15
16 char *lstates[6] = {"Error-reset",
17 "Error-wait",
18 "Ready",
19 "Started",
20 "Connecting",
21 "Run"
22 };
23
24 rtems_name semq_name;
16 rtems_name semq_name;
25 rtems_id semq_id;
17 rtems_id semq_id;
26
18
@@ -45,18 +37,24 rtems_task spiq_task(rtems_task_argument
45 PRINTF("in SPIQ *** got SPW_LINKERR_EVENT\n")
37 PRINTF("in SPIQ *** got SPW_LINKERR_EVENT\n")
46
38
47 // [0] SUSPEND RECV AND SEND TASKS
39 // [0] SUSPEND RECV AND SEND TASKS
48 rtems_task_suspend( Task_id[ TASKID_RECV ] );
40 status = rtems_task_suspend( Task_id[ TASKID_RECV ] );
49 rtems_task_suspend( Task_id[ TASKID_SEND ] );
41 if ( status != RTEMS_SUCCESSFUL ) {
42 PRINTF("in SPIQ *** ERR suspending RECV Task\n")
43 }
44 status = rtems_task_suspend( Task_id[ TASKID_SEND ] );
45 if ( status != RTEMS_SUCCESSFUL ) {
46 PRINTF("in SPIQ *** ERR suspending SEND Task\n")
47 }
50
48
51 // [1] CHECK THE LINK
49 // [1] CHECK THE LINK
52 ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (1)
50 status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (1)
53 if ( linkStatus != 5) {
51 if ( linkStatus != 5) {
54 PRINTF1("in SPIQ *** linkStatus %d, wait...\n", linkStatus)
52 PRINTF1("in SPIQ *** linkStatus %d, wait...\n", linkStatus)
55 rtems_task_wake_after( SY_LFR_DPU_CONNECT_TIMEOUT ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 1000 ms
53 status = rtems_task_wake_after( SY_LFR_DPU_CONNECT_TIMEOUT ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 1000 ms
56 }
54 }
57
55
58 // [2] RECHECK THE LINK AFTER SY_LFR_DPU_CONNECT_TIMEOUT
56 // [2] RECHECK THE LINK AFTER SY_LFR_DPU_CONNECT_TIMEOUT
59 ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (2)
57 status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (2)
60 if ( linkStatus != 5 ) // [2.a] not in run state, reset the link
58 if ( linkStatus != 5 ) // [2.a] not in run state, reset the link
61 {
59 {
62 spacewire_compute_stats_offsets();
60 spacewire_compute_stats_offsets();
@@ -95,7 +93,7 rtems_task spiq_task(rtems_task_argument
95 }
93 }
96 // wake the WTDG task up to wait for the link recovery
94 // wake the WTDG task up to wait for the link recovery
97 status = rtems_event_send ( Task_id[TASKID_WTDG], RTEMS_EVENT_0 );
95 status = rtems_event_send ( Task_id[TASKID_WTDG], RTEMS_EVENT_0 );
98 rtems_task_suspend( RTEMS_SELF );
96 status = rtems_task_suspend( RTEMS_SELF );
99 }
97 }
100 }
98 }
101 }
99 }
@@ -278,11 +276,11 rtems_task wtdg_task( rtems_task_argumen
278 rtems_event_receive( RTEMS_EVENT_0,
276 rtems_event_receive( RTEMS_EVENT_0,
279 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
277 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
280 PRINTF("in WTDG *** wait for the link\n")
278 PRINTF("in WTDG *** wait for the link\n")
281 ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status
279 status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status
282 while( linkStatus != 5) // wait for the link
280 while( linkStatus != 5) // wait for the link
283 {
281 {
284 rtems_task_wake_after( 10 );
282 rtems_task_wake_after( 10 );
285 ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status
283 status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status
286 }
284 }
287
285
288 status = spacewire_stop_start_link( fdSPW );
286 status = spacewire_stop_start_link( fdSPW );
@@ -599,7 +597,7 rtems_timer_service_routine user_routine
599 int linkStatus;
597 int linkStatus;
600 rtems_status_code status;
598 rtems_status_code status;
601
599
602 ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status
600 status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status
603
601
604 if ( linkStatus == 5) {
602 if ( linkStatus == 5) {
605 PRINTF("in spacewire_reset_link *** link is running\n")
603 PRINTF("in spacewire_reset_link *** link is running\n")
@@ -57,7 +57,10 rtems_task actn_task( rtems_task_argumen
57 status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size,
57 status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size,
58 RTEMS_WAIT, RTEMS_NO_TIMEOUT);
58 RTEMS_WAIT, RTEMS_NO_TIMEOUT);
59 getTime( time ); // set time to the current time
59 getTime( time ); // set time to the current time
60 if (status!=RTEMS_SUCCESSFUL) PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status)
60 if (status!=RTEMS_SUCCESSFUL)
61 {
62 PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status)
63 }
61 else
64 else
62 {
65 {
63 subtype = TC.serviceSubType;
66 subtype = TC.serviceSubType;
@@ -190,7 +193,7 int action_enter_mode(ccsdsTelecommandPa
190 {
193 {
191 PRINTF("ERR *** in action_enter *** stop_current_mode\n")
194 PRINTF("ERR *** in action_enter *** stop_current_mode\n")
192 }
195 }
193 status = enter_mode(requestedMode, TC);
196 status = enter_mode( requestedMode );
194 }
197 }
195 else
198 else
196 {
199 {
@@ -313,6 +316,16 int action_update_time(ccsdsTelecommandP
313
316
314 int transition_validation(unsigned char requestedMode)
317 int transition_validation(unsigned char requestedMode)
315 {
318 {
319 /** This function checks the validity of the transition requested by the TC_LFR_ENTER_MODE.
320 *
321 * @param requestedMode is the mode requested by the TC_LFR_ENTER_MODE
322 *
323 * @return LFR directive status codes:
324 * - LFR_SUCCESSFUL - the transition is authorized
325 * - LFR_DEFAULT - the transition is not authorized
326 *
327 */
328
316 int status;
329 int status;
317
330
318 switch (requestedMode)
331 switch (requestedMode)
@@ -410,8 +423,18 int stop_current_mode()
410 return status;
423 return status;
411 }
424 }
412
425
413 int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC )
426 int enter_mode(unsigned char mode )
414 {
427 {
428 /** This function is launched after a mode transition validation.
429 *
430 * @param mode is the mode in which LFR will be put.
431 *
432 * @return RTEMS directive status codes:
433 * - RTEMS_SUCCESSFUL - the mode has been entered successfully
434 * - RTEMS_NOT_SATISFIED - the mode has not been entered successfully
435 *
436 */
437
415 rtems_status_code status;
438 rtems_status_code status;
416
439
417 status = RTEMS_UNSATISFIED;
440 status = RTEMS_UNSATISFIED;
@@ -450,6 +473,13 int enter_mode(unsigned char mode, ccsds
450
473
451 int enter_standby_mode()
474 int enter_standby_mode()
452 {
475 {
476 /** This function is used to enter the STANDBY mode.
477 *
478 * @return RTEMS directive status codes:
479 * - RTEMS_SUCCESSFUL - the mode has been entered successfully
480 *
481 */
482
453 PRINTF1("maxCount = %d\n", maxCount)
483 PRINTF1("maxCount = %d\n", maxCount)
454
484
455 #ifdef PRINT_TASK_STATISTICS
485 #ifdef PRINT_TASK_STATISTICS
@@ -494,6 +524,16 int enter_normal_mode()
494
524
495 int enter_burst_mode()
525 int enter_burst_mode()
496 {
526 {
527 /** This function is used to enter the STANDBY mode.
528 *
529 * @return RTEMS directive status codes:
530 * - RTEMS_SUCCESSFUL - the mode has been entered successfully
531 * - RTEMS_INVALID_ID - task id invalid
532 * - RTEMS_INCORRECT_STATE - task never started
533 * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task
534 *
535 */
536
497 rtems_status_code status;
537 rtems_status_code status;
498
538
499 status = restart_science_tasks();
539 status = restart_science_tasks();
@@ -512,6 +552,16 int enter_burst_mode()
512
552
513 int enter_sbm1_mode()
553 int enter_sbm1_mode()
514 {
554 {
555 /** This function is used to enter the SBM1 mode.
556 *
557 * @return RTEMS directive status codes:
558 * - RTEMS_SUCCESSFUL - the mode has been entered successfully
559 * - RTEMS_INVALID_ID - task id invalid
560 * - RTEMS_INCORRECT_STATE - task never started
561 * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task
562 *
563 */
564
515 rtems_status_code status;
565 rtems_status_code status;
516
566
517 status = restart_science_tasks();
567 status = restart_science_tasks();
@@ -527,10 +577,6 int enter_sbm1_mode()
527 set_wfp_burst_enable_register(LFR_MODE_SBM1);
577 set_wfp_burst_enable_register(LFR_MODE_SBM1);
528 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
578 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
529 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
579 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
530 // SM simulation
531 // timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR );
532 // LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board
533 // LEON_Unmask_interrupt( IRQ_SM );
534 #endif
580 #endif
535
581
536 return status;
582 return status;
@@ -538,6 +584,16 int enter_sbm1_mode()
538
584
539 int enter_sbm2_mode()
585 int enter_sbm2_mode()
540 {
586 {
587 /** This function is used to enter the SBM2 mode.
588 *
589 * @return RTEMS directive status codes:
590 * - RTEMS_SUCCESSFUL - the mode has been entered successfully
591 * - RTEMS_INVALID_ID - task id invalid
592 * - RTEMS_INCORRECT_STATE - task never started
593 * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task
594 *
595 */
596
541 rtems_status_code status;
597 rtems_status_code status;
542
598
543 status = restart_science_tasks();
599 status = restart_science_tasks();
@@ -560,6 +616,18 int enter_sbm2_mode()
560
616
561 int restart_science_tasks()
617 int restart_science_tasks()
562 {
618 {
619 /** This function is used to restart all science tasks.
620 *
621 * @return RTEMS directive status codes:
622 * - RTEMS_SUCCESSFUL - task restarted successfully
623 * - RTEMS_INVALID_ID - task id invalid
624 * - RTEMS_INCORRECT_STATE - task never started
625 * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task
626 *
627 * Science tasks are AVF0, BPF0, WFRM, CWF3, CW2, CWF1
628 *
629 */
630
563 rtems_status_code status[6];
631 rtems_status_code status[6];
564 rtems_status_code ret;
632 rtems_status_code ret;
565
633
@@ -681,6 +749,13 int suspend_science_tasks()
681 // CLOSING ACTIONS
749 // CLOSING ACTIONS
682 void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time)
750 void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time)
683 {
751 {
752 /** This function is used to update the HK packets statistics after a successful TC execution.
753 *
754 * @param TC points to the TC being processed
755 * @param time is the time used to date the TC execution
756 *
757 */
758
684 housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0];
759 housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0];
685 housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1];
760 housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1];
686 housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00;
761 housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00;
@@ -697,6 +772,13 void update_last_TC_exe(ccsdsTelecommand
697
772
698 void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time)
773 void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time)
699 {
774 {
775 /** This function is used to update the HK packets statistics after a TC rejection.
776 *
777 * @param TC points to the TC being processed
778 * @param time is the time used to date the TC rejection
779 *
780 */
781
700 housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0];
782 housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0];
701 housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1];
783 housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1];
702 housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00;
784 housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00;
@@ -713,6 +795,15 void update_last_TC_rej(ccsdsTelecommand
713
795
714 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id, unsigned char *time)
796 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id, unsigned char *time)
715 {
797 {
798 /** This function is the last step of the TC execution workflow.
799 *
800 * @param TC points to the TC being processed
801 * @param result is the result of the TC execution (LFR_SUCCESSFUL / LFR_DEFAULT)
802 * @param queue_id is the id of the RTEMS message queue used to send TM packets
803 * @param time is the time used to date the TC execution
804 *
805 */
806
716 unsigned int val = 0;
807 unsigned int val = 0;
717
808
718 if (result == LFR_SUCCESSFUL)
809 if (result == LFR_SUCCESSFUL)
@@ -416,6 +416,15 int send_tm_lfr_tc_exe_corrupted(ccsdsTe
416
416
417 void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id )
417 void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id )
418 {
418 {
419 /** This function increment the packet sequence control parameter of a TC, depending on its destination ID.
420 *
421 * @param packet_sequence_control points to the packet sequence control which will be incremented
422 * @param destination_id is the destination ID of the TM, there is one counter by destination ID
423 *
424 * If the destination ID is not known, a dedicated counter is incremented.
425 *
426 */
427
419 unsigned short sequence_cnt;
428 unsigned short sequence_cnt;
420 unsigned short segmentation_grouping_flag;
429 unsigned short segmentation_grouping_flag;
421 unsigned short new_packet_sequence_control;
430 unsigned short new_packet_sequence_control;
@@ -1095,7 +1095,7 void reset_waveform_picker_regs()
1095
1095
1096 //*****************
1096 //*****************
1097 // local parameters
1097 // local parameters
1098 void set_local_sbm1_nb_cwf_max()
1098 void set_local_sbm1_nb_cwf_max( void )
1099 {
1099 {
1100 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1100 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1101 *
1101 *
@@ -1109,7 +1109,7 void set_local_sbm1_nb_cwf_max()
1109 + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2
1109 + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2
1110 }
1110 }
1111
1111
1112 void set_local_sbm2_nb_cwf_max()
1112 void set_local_sbm2_nb_cwf_max(void)
1113 {
1113 {
1114 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1114 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1115 *
1115 *
@@ -1123,7 +1123,7 void set_local_sbm2_nb_cwf_max()
1123 + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8;
1123 + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8;
1124 }
1124 }
1125
1125
1126 void set_local_nb_interrupt_f0_MAX()
1126 void set_local_nb_interrupt_f0_MAX( void )
1127 {
1127 {
1128 /** This function sets the value of the nb_interrupt_f0_MAX local parameter.
1128 /** This function sets the value of the nb_interrupt_f0_MAX local parameter.
1129 *
1129 *
@@ -1137,7 +1137,7 void set_local_nb_interrupt_f0_MAX()
1137 + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100;
1137 + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100;
1138 }
1138 }
1139
1139
1140 void reset_local_sbm1_nb_cwf_sent()
1140 void reset_local_sbm1_nb_cwf_sent( void )
1141 {
1141 {
1142 /** This function resets the value of the sbm1_nb_cwf_sent local parameter.
1142 /** This function resets the value of the sbm1_nb_cwf_sent local parameter.
1143 *
1143 *
@@ -1149,7 +1149,7 void reset_local_sbm1_nb_cwf_sent()
1149 param_local.local_sbm1_nb_cwf_sent = 0;
1149 param_local.local_sbm1_nb_cwf_sent = 0;
1150 }
1150 }
1151
1151
1152 void reset_local_sbm2_nb_cwf_sent()
1152 void reset_local_sbm2_nb_cwf_sent( void )
1153 {
1153 {
1154 /** This function resets the value of the sbm2_nb_cwf_sent local parameter.
1154 /** This function resets the value of the sbm2_nb_cwf_sent local parameter.
1155 *
1155 *
General Comments 0
You need to be logged in to leave comments. Login now