##// END OF EJS Templates
two fields added to the housekeeping parameters:...
paul -
r265:09ea64972ca9 R3a
parent child
Show More
@@ -14,7 +14,6
14 14 #include "fsw_init.h"
15 15
16 16 extern spw_stats grspw_stats;
17 extern spw_stats spw_backup;
18 17 extern rtems_name timecode_timer_name;
19 18 extern rtems_id timecode_timer_id;
20 19
@@ -78,6 +78,3 unsigned short sequenceCounters_TC_EXE[S
78 78 unsigned short sequenceCounters_TM_DUMP[SEQ_CNT_NB_DEST_ID];
79 79 unsigned short sequenceCounterHK;
80 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 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 581 rtems_status_code status;
571 582 spw_stats current;
572 583
@@ -61,13 +61,13 ring_node * getRingNodeForAveraging( uns
61 61 //***********************************************************
62 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 66 unsigned char status;
67 67 rtems_status_code status_code;
68 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 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 124 rtems_status_code status_code;
125 125 unsigned char status;
126 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 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 182 unsigned char status;
183 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 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 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 237 if (statusReg & 0x7c0) // [0111 1100 0000]
228 238 {
229 239 status_code = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_8 );
230 240 }
231 241
232 242 spectral_matrix_regs->status = spectral_matrix_regs->status & 0x7c0;
243
233 244 }
234 245
235 246 rtems_isr spectral_matrices_isr( rtems_vector_number vector )
@@ -240,7 +251,7 rtems_isr spectral_matrices_isr( rtems_v
240 251 // buffer_full ** bad_component_err ** f2_1 ** f2_0 ** f1_1 ** f1_0 ** f0_1 ** f0_0
241 252 // 7 6 5 4 3 2 1 0
242 253
243 unsigned char statusReg;
254 int statusReg;
244 255
245 256 static restartState state = WAIT_FOR_F2;
246 257
@@ -280,6 +280,11 rtems_isr waveforms_isr( rtems_vector_nu
280 280
281 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 288 if ( (waveform_picker_regs->status & 0xff00) != 0x00) // [1111 1111 0000 0000] check the error bits
284 289 {
285 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