@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: bin/fsw |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Nov 4 07:05:32 2013 | |
|
4 | 4 | # Project: fsw-qt.pro |
|
5 | 5 | # Template: app |
|
6 | 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 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 |
DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4= |
|
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=20 -DPRINT_MESSAGES_ON_CONSOLE | |
|
14 | 14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -7,11 +7,11 CONFIG -= qt | |||
|
7 | 7 | include(./sparc.pri) |
|
8 | 8 | |
|
9 | 9 | # flight software version |
|
10 |
SWVERSION=-0- |
|
|
10 | SWVERSION=-0-20 | |
|
11 | 11 | DEFINES += SW_VERSION_N1=0 |
|
12 | 12 | DEFINES += SW_VERSION_N2=0 |
|
13 | 13 | DEFINES += SW_VERSION_N3=0 |
|
14 |
DEFINES += SW_VERSION_N4= |
|
|
14 | DEFINES += SW_VERSION_N4=20 | |
|
15 | 15 | |
|
16 | 16 | contains( CONFIG, verbose ) { |
|
17 | 17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 2.8.0, 2013-1 |
|
|
3 | <!-- Written by QtCreator 2.8.0, 2013-11-04T07:04:49. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -107,18 +107,20 | |||
|
107 | 107 | |
|
108 | 108 | // FAILURE CODES |
|
109 | 109 | #define ILLEGAL_APID 0 |
|
110 |
#define WRONG_LEN_P |
|
|
110 | #define WRONG_LEN_PKT 1 | |
|
111 | 111 | #define INCOR_CHECKSUM 2 |
|
112 | 112 | #define ILL_TYPE 3 |
|
113 | 113 | #define ILL_SUBTYPE 4 |
|
114 |
#define WRONG_APP_DATA 5 |
|
|
115 | // | |
|
116 | #define CCSDS_TM_VALID 7 | |
|
114 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
|
117 | 115 | #define TC_NOT_EXE 42000 // 0xa4 0x10 |
|
116 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 | |
|
118 | 117 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
119 | 118 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
119 | #define NOT_ALLOWED 42004 // 0xa4 0x14 | |
|
120 | 120 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
121 | #define CCSDS_TM_VALID 7 | |
|
121 | 122 | |
|
123 | // TC SID | |
|
122 | 124 | #define SID_TC_DEFAULT 0 // the default SID for TC sent to the LFR |
|
123 | 125 | #define SID_TC_GROUND 0 |
|
124 | 126 | #define SID_TC_MISSION_TIMELINE 110 |
@@ -61,6 +61,25 struct waveform_picker_regs_str{ | |||
|
61 | 61 | }; |
|
62 | 62 | typedef struct waveform_picker_regs_str waveform_picker_regs_t; |
|
63 | 63 | |
|
64 | struct waveform_picker_regs_str_alt{ | |
|
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 | ||
|
64 | 83 | struct spectral_matrix_regs_str{ |
|
65 | 84 | volatile int config; |
|
66 | 85 | volatile int status; |
@@ -25,6 +25,7 extern volatile int wf_cont_f3[ ]; | |||
|
25 | 25 | extern volatile int wf_cont_f3_bis[ ]; |
|
26 | 26 | extern char wf_cont_f3_light[ ]; |
|
27 | 27 | extern waveform_picker_regs_t *waveform_picker_regs; |
|
28 | extern waveform_picker_regs_t_alt *waveform_picker_regs_alt; | |
|
28 | 29 | extern time_management_regs_t *time_management_regs; |
|
29 | 30 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
30 | 31 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
@@ -37,6 +37,7 gptimer_regs_t *gptimer_regs | |||
|
37 | 37 | #ifdef GSA |
|
38 | 38 | #else |
|
39 | 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; | |
|
40 | 41 | #endif |
|
41 | 42 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; |
|
42 | 43 |
@@ -156,12 +156,6 rtems_task Init( rtems_task_argument ign | |||
|
156 | 156 | PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
157 | 157 | } |
|
158 | 158 | |
|
159 | status = stop_current_mode(); // go in STANDBY mode | |
|
160 | if (status != RTEMS_SUCCESSFUL) | |
|
161 | { | |
|
162 | PRINTF1("in INIT *** ERR in stop_current_mode, code %d", status) | |
|
163 | } | |
|
164 | ||
|
165 | 159 | #ifdef GSA |
|
166 | 160 | // mask IRQ lines |
|
167 | 161 | LEON_Mask_interrupt( IRQ_SM ); |
@@ -288,6 +288,5 void init_housekeeping_parameters( void | |||
|
288 | 288 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; |
|
289 | 289 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; |
|
290 | 290 | |
|
291 | updateLFRCurrentMode(); | |
|
292 | 291 | } |
|
293 | 292 |
@@ -41,7 +41,7 rtems_task spiq_task(rtems_task_argument | |||
|
41 | 41 | rtems_event_receive(SPW_LINKERR_EVENT, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an SPW_LINKERR_EVENT |
|
42 | 42 | PRINTF("in SPIQ *** got SPW_LINKERR_EVENT\n") |
|
43 | 43 | |
|
44 |
// [0] SUSPEND RECV A |
|
|
44 | // [0] SUSPEND RECV AND SEND TASKS | |
|
45 | 45 | rtems_task_suspend( Task_id[ TASKID_RECV ] ); |
|
46 | 46 | rtems_task_suspend( Task_id[ TASKID_SEND ] ); |
|
47 | 47 | |
@@ -82,9 +82,13 rtems_task spiq_task(rtems_task_argument | |||
|
82 | 82 | } |
|
83 | 83 | else // [3.b] the link is not in run state, go in STANDBY mode |
|
84 | 84 | { |
|
85 | status = enter_mode( LFR_MODE_STANDBY, NULL ); // enter the STANDBY mode | |
|
85 | status = stop_current_mode(); | |
|
86 | 86 | if ( status != RTEMS_SUCCESSFUL ) { |
|
87 |
PRINTF1("in SPIQ *** ERR ent |
|
|
87 | PRINTF1("in SPIQ *** ERR stop_current_mode *** code %d\n", status) | |
|
88 | } | |
|
89 | status = enter_standby_mode(); | |
|
90 | if ( status != RTEMS_SUCCESSFUL ) { | |
|
91 | PRINTF1("in SPIQ *** ERR enter_standby_mode *** code %d\n", status) | |
|
88 | 92 | } |
|
89 | 93 | // wake the WTDG task up to wait for the link recovery |
|
90 | 94 | status = rtems_event_send ( Task_id[TASKID_WTDG], RTEMS_EVENT_0 ); |
@@ -148,10 +152,18 rtems_task recv_task( rtems_task_argumen | |||
|
148 | 152 | currentTC_LEN_RCV[ 1 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt ); |
|
149 | 153 | // CHECK THE TC |
|
150 | 154 | parserCode = tc_parser( ¤tTC, currentTC_LEN_RCV_AsUnsignedInt, computed_CRC ) ; |
|
151 |
if ( (parserCode == ILLEGAL_APID) || (parserCode == WRONG_LEN_P |
|
|
152 | | (parserCode == ILL_TYPE) || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA) ) | |
|
155 | if ( (parserCode == ILLEGAL_APID) || (parserCode == WRONG_LEN_PKT) | |
|
156 | || (parserCode == INCOR_CHECKSUM) || (parserCode == ILL_TYPE) | |
|
157 | || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA) | |
|
158 | || (parserCode == WRONG_SRC_ID) ) | |
|
153 | 159 | { // send TM_LFR_TC_EXE_CORRUPTED |
|
154 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, computed_CRC, currentTC_LEN_RCV ); | |
|
160 | if ( !( (currentTC.serviceType==TC_TYPE_TIME) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_TIME) ) | |
|
161 | && | |
|
162 | !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO)) | |
|
163 | ) | |
|
164 | { | |
|
165 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, computed_CRC, currentTC_LEN_RCV ); | |
|
166 | } | |
|
155 | 167 | } |
|
156 | 168 | else |
|
157 | 169 | { // send valid TC to the action launcher |
@@ -19,6 +19,7 unsigned int Crc_opt( unsigned char D, u | |||
|
19 | 19 | * |
|
20 | 20 | * @param D is the current byte of data. |
|
21 | 21 | * @param Chk is the current syndrom value. |
|
22 | * | |
|
22 | 23 | * @return the value of the new syndrome on two bytes. |
|
23 | 24 | * |
|
24 | 25 | */ |
@@ -143,13 +144,13 int tc_parser(ccsdsTelecommandPacket_t * | |||
|
143 | 144 | if (status == CCSDS_TM_VALID) // CHECK THE PACKET LENGTH FIELD AND THE ACTUAL LENGTH COMPLIANCE |
|
144 | 145 | { |
|
145 | 146 | if (length != TC_LEN_RCV ) { |
|
146 |
status = WRONG_LEN_P |
|
|
147 | status = WRONG_LEN_PKT; | |
|
147 | 148 | } |
|
148 | 149 | } |
|
149 | 150 | if (status == CCSDS_TM_VALID) // CHECK THAT THE PACKET DOES NOT EXCEED THE MAX SIZE |
|
150 | 151 | { |
|
151 | 152 | if ( length >= CCSDS_TC_PKT_MAX_SIZE ) { |
|
152 |
status = WRONG_LEN_P |
|
|
153 | status = WRONG_LEN_PKT; | |
|
153 | 154 | } |
|
154 | 155 | } |
|
155 | 156 | if (status == CCSDS_TM_VALID) // CHECK THE TYPE |
@@ -225,7 +226,7 int tc_check_subtype( unsigned char pack | |||
|
225 | 226 | } |
|
226 | 227 | else |
|
227 | 228 | { |
|
228 | status = ILL_TYPE; | |
|
229 | status = ILL_SUBTYPE; | |
|
229 | 230 | } |
|
230 | 231 | |
|
231 | 232 | return status; |
@@ -254,7 +255,7 int tc_check_sid( unsigned char sid ) | |||
|
254 | 255 | } |
|
255 | 256 | else |
|
256 | 257 | { |
|
257 |
status = |
|
|
258 | status = WRONG_SRC_ID; | |
|
258 | 259 | } |
|
259 | 260 | |
|
260 | 261 | return status; |
@@ -279,7 +280,7 int tc_check_length( unsigned char packe | |||
|
279 | 280 | { |
|
280 | 281 | case TC_SUBTYPE_RESET: |
|
281 | 282 | if (length!=(TC_LEN_RESET-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
282 |
status = WRONG_LEN_P |
|
|
283 | status = WRONG_LEN_PKT; | |
|
283 | 284 | } |
|
284 | 285 | else { |
|
285 | 286 | status = CCSDS_TM_VALID; |
@@ -287,7 +288,7 int tc_check_length( unsigned char packe | |||
|
287 | 288 | break; |
|
288 | 289 | case TC_SUBTYPE_LOAD_COMM: |
|
289 | 290 | if (length!=(TC_LEN_LOAD_COMM-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
290 |
status = WRONG_LEN_P |
|
|
291 | status = WRONG_LEN_PKT; | |
|
291 | 292 | } |
|
292 | 293 | else { |
|
293 | 294 | status = CCSDS_TM_VALID; |
@@ -295,7 +296,7 int tc_check_length( unsigned char packe | |||
|
295 | 296 | break; |
|
296 | 297 | case TC_SUBTYPE_LOAD_NORM: |
|
297 | 298 | if (length!=(TC_LEN_LOAD_NORM-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
298 |
status = WRONG_LEN_P |
|
|
299 | status = WRONG_LEN_PKT; | |
|
299 | 300 | } |
|
300 | 301 | else { |
|
301 | 302 | status = CCSDS_TM_VALID; |
@@ -303,7 +304,7 int tc_check_length( unsigned char packe | |||
|
303 | 304 | break; |
|
304 | 305 | case TC_SUBTYPE_LOAD_BURST: |
|
305 | 306 | if (length!=(TC_LEN_LOAD_BURST-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
306 |
status = WRONG_LEN_P |
|
|
307 | status = WRONG_LEN_PKT; | |
|
307 | 308 | } |
|
308 | 309 | else { |
|
309 | 310 | status = CCSDS_TM_VALID; |
@@ -311,7 +312,7 int tc_check_length( unsigned char packe | |||
|
311 | 312 | break; |
|
312 | 313 | case TC_SUBTYPE_LOAD_SBM1: |
|
313 | 314 | if (length!=(TC_LEN_LOAD_SBM1-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
314 |
status = WRONG_LEN_P |
|
|
315 | status = WRONG_LEN_PKT; | |
|
315 | 316 | } |
|
316 | 317 | else { |
|
317 | 318 | status = CCSDS_TM_VALID; |
@@ -319,7 +320,7 int tc_check_length( unsigned char packe | |||
|
319 | 320 | break; |
|
320 | 321 | case TC_SUBTYPE_LOAD_SBM2: |
|
321 | 322 | if (length!=(TC_LEN_LOAD_SBM2-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
322 |
status = WRONG_LEN_P |
|
|
323 | status = WRONG_LEN_PKT; | |
|
323 | 324 | } |
|
324 | 325 | else { |
|
325 | 326 | status = CCSDS_TM_VALID; |
@@ -327,7 +328,7 int tc_check_length( unsigned char packe | |||
|
327 | 328 | break; |
|
328 | 329 | case TC_SUBTYPE_DUMP: |
|
329 | 330 | if (length!=(TC_LEN_DUMP-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
330 |
status = WRONG_LEN_P |
|
|
331 | status = WRONG_LEN_PKT; | |
|
331 | 332 | } |
|
332 | 333 | else { |
|
333 | 334 | status = CCSDS_TM_VALID; |
@@ -335,7 +336,7 int tc_check_length( unsigned char packe | |||
|
335 | 336 | break; |
|
336 | 337 | case TC_SUBTYPE_ENTER: |
|
337 | 338 | if (length!=(TC_LEN_ENTER-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
338 |
status = WRONG_LEN_P |
|
|
339 | status = WRONG_LEN_PKT; | |
|
339 | 340 | } |
|
340 | 341 | else { |
|
341 | 342 | status = CCSDS_TM_VALID; |
@@ -343,7 +344,7 int tc_check_length( unsigned char packe | |||
|
343 | 344 | break; |
|
344 | 345 | case TC_SUBTYPE_UPDT_INFO: |
|
345 | 346 | if (length!=(TC_LEN_UPDT_INFO-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
346 |
status = WRONG_LEN_P |
|
|
347 | status = WRONG_LEN_PKT; | |
|
347 | 348 | } |
|
348 | 349 | else { |
|
349 | 350 | status = CCSDS_TM_VALID; |
@@ -351,7 +352,7 int tc_check_length( unsigned char packe | |||
|
351 | 352 | break; |
|
352 | 353 | case TC_SUBTYPE_EN_CAL: |
|
353 | 354 | if (length!=(TC_LEN_EN_CAL-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
354 |
status = WRONG_LEN_P |
|
|
355 | status = WRONG_LEN_PKT; | |
|
355 | 356 | } |
|
356 | 357 | else { |
|
357 | 358 | status = CCSDS_TM_VALID; |
@@ -359,7 +360,7 int tc_check_length( unsigned char packe | |||
|
359 | 360 | break; |
|
360 | 361 | case TC_SUBTYPE_DIS_CAL: |
|
361 | 362 | if (length!=(TC_LEN_DIS_CAL-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
362 |
status = WRONG_LEN_P |
|
|
363 | status = WRONG_LEN_PKT; | |
|
363 | 364 | } |
|
364 | 365 | else { |
|
365 | 366 | status = CCSDS_TM_VALID; |
@@ -367,7 +368,7 int tc_check_length( unsigned char packe | |||
|
367 | 368 | break; |
|
368 | 369 | case TC_SUBTYPE_UPDT_TIME: |
|
369 | 370 | if (length!=(TC_LEN_UPDT_TIME-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
370 |
status = WRONG_LEN_P |
|
|
371 | status = WRONG_LEN_PKT; | |
|
371 | 372 | } |
|
372 | 373 | else { |
|
373 | 374 | status = CCSDS_TM_VALID; |
@@ -242,7 +242,7 int action_enable_calibration(ccsdsTelec | |||
|
242 | 242 | result = LFR_DEFAULT; |
|
243 | 243 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
244 | 244 | |
|
245 | if ( (lfrMode == LFR_MODE_STANDBY) | (lfrMode == LFR_MODE_BURST) | (lfrMode == LFR_MODE_SBM2) ) { | |
|
245 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { | |
|
246 | 246 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
247 | 247 | result = LFR_DEFAULT; |
|
248 | 248 | } |
@@ -268,7 +268,7 int action_disable_calibration(ccsdsTele | |||
|
268 | 268 | result = LFR_DEFAULT; |
|
269 | 269 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
270 | 270 | |
|
271 | if ( (lfrMode == LFR_MODE_STANDBY) | (lfrMode == LFR_MODE_BURST) | (lfrMode == LFR_MODE_SBM2) ) { | |
|
271 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { | |
|
272 | 272 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
273 | 273 | result = LFR_DEFAULT; |
|
274 | 274 | } |
@@ -415,23 +415,23 int enter_mode(unsigned char mode, ccsds | |||
|
415 | 415 | status = RTEMS_UNSATISFIED; |
|
416 | 416 | |
|
417 | 417 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); |
|
418 |
|
|
|
418 | updateLFRCurrentMode(); | |
|
419 | 419 | |
|
420 | 420 | switch(mode){ |
|
421 | 421 | case LFR_MODE_STANDBY: |
|
422 |
status = enter_standby_mode( |
|
|
422 | status = enter_standby_mode( ); | |
|
423 | 423 | break; |
|
424 | 424 | case LFR_MODE_NORMAL: |
|
425 |
status = enter_normal_mode( |
|
|
425 | status = enter_normal_mode( ); | |
|
426 | 426 | break; |
|
427 | 427 | case LFR_MODE_BURST: |
|
428 |
status = enter_burst_mode( |
|
|
428 | status = enter_burst_mode( ); | |
|
429 | 429 | break; |
|
430 | 430 | case LFR_MODE_SBM1: |
|
431 |
status = enter_sbm1_mode( |
|
|
431 | status = enter_sbm1_mode( ); | |
|
432 | 432 | break; |
|
433 | 433 | case LFR_MODE_SBM2: |
|
434 |
status = enter_sbm2_mode( |
|
|
434 | status = enter_sbm2_mode( ); | |
|
435 | 435 | break; |
|
436 | 436 | default: |
|
437 | 437 | status = RTEMS_UNSATISFIED; |
@@ -448,8 +448,6 int enter_mode(unsigned char mode, ccsds | |||
|
448 | 448 | |
|
449 | 449 | int enter_standby_mode() |
|
450 | 450 | { |
|
451 | reset_waveform_picker_regs(); | |
|
452 | ||
|
453 | 451 | PRINTF1("maxCount = %d\n", maxCount) |
|
454 | 452 | |
|
455 | 453 | #ifdef PRINT_TASK_STATISTICS |
@@ -150,7 +150,7 int action_load_sbm1_par(ccsdsTelecomman | |||
|
150 | 150 | result = LFR_DEFAULT; |
|
151 | 151 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
152 | 152 | |
|
153 | if ( lfrMode == LFR_MODE_SBM1 ) { | |
|
153 | if ( (lfrMode == LFR_MODE_SBM1) || (lfrMode == LFR_MODE_SBM2) ) { | |
|
154 | 154 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
155 | 155 | result = LFR_DEFAULT; |
|
156 | 156 | } |
@@ -179,7 +179,7 int action_load_sbm2_par(ccsdsTelecomman | |||
|
179 | 179 | result = LFR_DEFAULT; |
|
180 | 180 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
181 | 181 | |
|
182 | if ( lfrMode == LFR_MODE_SBM2 ) { | |
|
182 | if ( (lfrMode == LFR_MODE_SBM2) || (lfrMode == LFR_MODE_SBM2) ) { | |
|
183 | 183 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
184 | 184 | result = LFR_DEFAULT; |
|
185 | 185 | } |
@@ -51,7 +51,7 int send_tm_lfr_tc_exe_success( ccsdsTel | |||
|
51 | 51 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
52 | 52 | TM.serviceType = TM_TYPE_TC_EXE; |
|
53 | 53 | TM.serviceSubType = TM_SUBTYPE_EXE_OK; |
|
54 | TM.destinationID = TM_DESTINATION_ID_GROUND; // default destination id | |
|
54 | TM.destinationID = TC->sourceID; | |
|
55 | 55 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
56 | 56 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
57 | 57 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
@@ -1071,20 +1071,41 void reset_waveform_picker_regs() | |||
|
1071 | 1071 | #ifdef GSA |
|
1072 | 1072 | #else |
|
1073 | 1073 | reset_wfp_burst_enable(); |
|
1074 |
set_wfp_ |
|
|
1074 | reset_wfp_status(); | |
|
1075 | // set buffer addresses | |
|
1075 | 1076 | waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // |
|
1076 | 1077 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // |
|
1077 | 1078 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // |
|
1078 | 1079 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // |
|
1080 | // set other parameters | |
|
1081 | set_wfp_data_shaping(); | |
|
1079 | 1082 | set_wfp_delta_snapshot(); // time in seconds between two snapshots |
|
1080 | 1083 | waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes) |
|
1081 | 1084 | waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes) |
|
1082 | 1085 | waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets) |
|
1083 | 1086 | waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1 |
|
1084 | reset_wfp_status(); | |
|
1085 | 1087 | #endif |
|
1086 | 1088 | } |
|
1087 | 1089 | |
|
1090 | void reset_waveform_picker_regs_alt() | |
|
1091 | { | |
|
1092 | waveform_picker_regs_alt->data_shaping = 0x01; // 0x00 00 *** R1 R0 SP1 SP0 BW | |
|
1093 | waveform_picker_regs_alt->run_burst_enable = 0x00; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] | |
|
1094 | waveform_picker_regs_alt->addr_data_f0 = (int) (wf_snap_f0); // 0x08 | |
|
1095 | waveform_picker_regs_alt->addr_data_f1 = (int) (wf_snap_f1); // 0x0c | |
|
1096 | waveform_picker_regs_alt->addr_data_f2 = (int) (wf_snap_f2); // 0x10 | |
|
1097 | waveform_picker_regs_alt->addr_data_f3 = (int) (wf_cont_f3); // 0x14 | |
|
1098 | waveform_picker_regs_alt->status = 0x00; // 0x18 | |
|
1099 | waveform_picker_regs_alt->delta_snapshot = 0x12800; // 0x1c | |
|
1100 | waveform_picker_regs_alt->delta_f0 = 0x3f5; // 0x20 *** 1013 | |
|
1101 | waveform_picker_regs_alt->delta_f0_2 = 0x7; // 0x24 *** 7 | |
|
1102 | waveform_picker_regs_alt->delta_f1 = 0x3c0; // 0x28 *** 960 | |
|
1103 | waveform_picker_regs_alt->delta_f2 = 0x12200; // 0x2c *** 74240 | |
|
1104 | waveform_picker_regs_alt->nb_data_by_buffer = 0x1802; // 0x30 *** 2048 * 3 + 2 | |
|
1105 | waveform_picker_regs_alt->snapshot_param = 0x7ff; // 0x34 *** 2048 -1 | |
|
1106 | waveform_picker_regs_alt->start_date = 0x00; | |
|
1107 | } | |
|
1108 | ||
|
1088 | 1109 | //***************** |
|
1089 | 1110 | // local parameters |
|
1090 | 1111 | void set_local_sbm1_nb_cwf_max() |
General Comments 0
You need to be logged in to leave comments.
Login now