##// END OF EJS Templates
two fields added to the housekeeping parameters:...
paul -
r265:09ea64972ca9 R3a
parent child
Show More
@@ -14,7 +14,6
14 #include "fsw_init.h"
14 #include "fsw_init.h"
15
15
16 extern spw_stats grspw_stats;
16 extern spw_stats grspw_stats;
17 extern spw_stats spw_backup;
18 extern rtems_name timecode_timer_name;
17 extern rtems_name timecode_timer_name;
19 extern rtems_id timecode_timer_id;
18 extern rtems_id timecode_timer_id;
20
19
@@ -78,6 +78,3 unsigned short sequenceCounters_TC_EXE[S
78 unsigned short sequenceCounters_TM_DUMP[SEQ_CNT_NB_DEST_ID];
78 unsigned short sequenceCounters_TM_DUMP[SEQ_CNT_NB_DEST_ID];
79 unsigned short sequenceCounterHK;
79 unsigned short sequenceCounterHK;
80 spw_stats grspw_stats;
80 spw_stats grspw_stats;
81 spw_stats spw_backup;
82
83
@@ -567,6 +567,17 void spacewire_set_RE( unsigned char val
567
567
568 void spacewire_read_statistics( void )
568 void spacewire_read_statistics( void )
569 {
569 {
570 /** This function reads the SpaceWire statistics from the grspw RTEMS driver.
571 *
572 * @param void
573 *
574 * @return void
575 *
576 * Once they are read, the counters are stored in a global variable used during the building of the
577 * HK packets.
578 *
579 */
580
570 rtems_status_code status;
581 rtems_status_code status;
571 spw_stats current;
582 spw_stats current;
572
583
@@ -61,13 +61,13 ring_node * getRingNodeForAveraging( uns
61 //***********************************************************
61 //***********************************************************
62 // Interrupt Service Routine for spectral matrices processing
62 // Interrupt Service Routine for spectral matrices processing
63
63
64 void spectral_matrices_isr_f0( unsigned char statusReg )
64 void spectral_matrices_isr_f0( int statusReg )
65 {
65 {
66 unsigned char status;
66 unsigned char status;
67 rtems_status_code status_code;
67 rtems_status_code status_code;
68 ring_node *full_ring_node;
68 ring_node *full_ring_node;
69
69
70 status = statusReg & 0x03; // [0011] get the status_ready_matrix_f0_x bits
70 status = (unsigned char) (statusReg & 0x03); // [0011] get the status_ready_matrix_f0_x bits
71
71
72 switch(status)
72 switch(status)
73 {
73 {
@@ -119,13 +119,13 void spectral_matrices_isr_f0( unsigned
119 }
119 }
120 }
120 }
121
121
122 void spectral_matrices_isr_f1( unsigned char statusReg )
122 void spectral_matrices_isr_f1( int statusReg )
123 {
123 {
124 rtems_status_code status_code;
124 rtems_status_code status_code;
125 unsigned char status;
125 unsigned char status;
126 ring_node *full_ring_node;
126 ring_node *full_ring_node;
127
127
128 status = (statusReg & 0x0c) >> 2; // [1100] get the status_ready_matrix_f1_x bits
128 status = (unsigned char) ((statusReg & 0x0c) >> 2); // [1100] get the status_ready_matrix_f1_x bits
129
129
130 switch(status)
130 switch(status)
131 {
131 {
@@ -177,12 +177,12 void spectral_matrices_isr_f1( unsigned
177 }
177 }
178 }
178 }
179
179
180 void spectral_matrices_isr_f2( unsigned char statusReg )
180 void spectral_matrices_isr_f2( int statusReg )
181 {
181 {
182 unsigned char status;
182 unsigned char status;
183 rtems_status_code status_code;
183 rtems_status_code status_code;
184
184
185 status = (statusReg & 0x30) >> 4; // [0011 0000] get the status_ready_matrix_f2_x bits
185 status = (unsigned char) ((statusReg & 0x30) >> 4); // [0011 0000] get the status_ready_matrix_f2_x bits
186
186
187 switch(status)
187 switch(status)
188 {
188 {
@@ -220,16 +220,27 void spectral_matrices_isr_f2( unsigned
220 }
220 }
221 }
221 }
222
222
223 void spectral_matrix_isr_error_handler( unsigned char statusReg )
223 void spectral_matrix_isr_error_handler( int statusReg )
224 {
224 {
225 // STATUS REGISTER
226 // input_fifo_write(2) *** input_fifo_write(1) *** input_fifo_write(0)
227 // 10 9 8
228 // buffer_full ** bad_component_err ** f2_1 ** f2_0 ** f1_1 ** f1_0 ** f0_1 ** f0_0
229 // 7 6 5 4 3 2 1 0
230
225 rtems_status_code status_code;
231 rtems_status_code status_code;
226
232
233 //***************************************************
234 // the ASM status register is copied in the HK packet
235 housekeeping_packet.hk_lfr_vhdl_aa_sm = (unsigned char) (statusReg & 0x7c0 >> 6); // [0111 1100 0000]
236
227 if (statusReg & 0x7c0) // [0111 1100 0000]
237 if (statusReg & 0x7c0) // [0111 1100 0000]
228 {
238 {
229 status_code = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_8 );
239 status_code = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_8 );
230 }
240 }
231
241
232 spectral_matrix_regs->status = spectral_matrix_regs->status & 0x7c0;
242 spectral_matrix_regs->status = spectral_matrix_regs->status & 0x7c0;
243
233 }
244 }
234
245
235 rtems_isr spectral_matrices_isr( rtems_vector_number vector )
246 rtems_isr spectral_matrices_isr( rtems_vector_number vector )
@@ -240,7 +251,7 rtems_isr spectral_matrices_isr( rtems_v
240 // buffer_full ** bad_component_err ** f2_1 ** f2_0 ** f1_1 ** f1_0 ** f0_1 ** f0_0
251 // buffer_full ** bad_component_err ** f2_1 ** f2_0 ** f1_1 ** f1_0 ** f0_1 ** f0_0
241 // 7 6 5 4 3 2 1 0
252 // 7 6 5 4 3 2 1 0
242
253
243 unsigned char statusReg;
254 int statusReg;
244
255
245 static restartState state = WAIT_FOR_F2;
256 static restartState state = WAIT_FOR_F2;
246
257
@@ -280,6 +280,11 rtems_isr waveforms_isr( rtems_vector_nu
280
280
281 waveforms_isr_f3();
281 waveforms_isr_f3();
282
282
283 //*************************************************
284 // copy the status bits in the housekeeping packets
285 housekeeping_packet.hk_lfr_vhdl_iir_cal =
286 (unsigned char) ((waveform_picker_regs->status & 0xff00) >> 8);
287
283 if ( (waveform_picker_regs->status & 0xff00) != 0x00) // [1111 1111 0000 0000] check the error bits
288 if ( (waveform_picker_regs->status & 0xff00) != 0x00) // [1111 1111 0000 0000] check the error bits
284 {
289 {
285 spare_status = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_10 );
290 spare_status = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_10 );
General Comments 0
You need to be logged in to leave comments. Login now