@@ -1,2 +1,2 | |||
|
1 | 1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters |
|
2 | bb9afa759d57093f7646d3be18f4a9923a4cbf84 header/lfr_common_headers | |
|
2 | a0ca246cc2057880086d028aab3cf35be244efbc header/lfr_common_headers |
@@ -2,7 +2,7 TEMPLATE = app | |||
|
2 | 2 | # CONFIG += console v8 sim |
|
3 | 3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch |
|
4 | 4 | # lpp_dpu_destid |
|
5 | CONFIG += console verbose lpp_dpu_destid | |
|
5 | CONFIG += console verbose lpp_dpu_destid stack_report | |
|
6 | 6 | CONFIG -= qt |
|
7 | 7 | |
|
8 | 8 | include(./sparc.pri) |
@@ -18,6 +18,7 | |||
|
18 | 18 | |
|
19 | 19 | extern rtems_name Task_name[20]; /* array of task names */ |
|
20 | 20 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
21 | extern unsigned char pa_bia_status_info; | |
|
21 | 22 | |
|
22 | 23 | // RTEMS TASKS |
|
23 | 24 | rtems_task Init( rtems_task_argument argument); |
@@ -38,6 +38,7 void get_temperatures( unsigned char *te | |||
|
38 | 38 | void get_v_e1_e2_f3( unsigned char *spacecraft_potential ); |
|
39 | 39 | void get_cpu_load( unsigned char *resource_statistics ); |
|
40 | 40 | void set_hk_lfr_sc_potential_flag( bool state ); |
|
41 | void set_hk_lfr_mag_fields_flag( bool state ); | |
|
41 | 42 | void set_hk_lfr_calib_enable( bool state ); |
|
42 | 43 | |
|
43 | 44 |
@@ -29,6 +29,7 rtems_id Task_id[20]; /* arra | |||
|
29 | 29 | int fdSPW = 0; |
|
30 | 30 | int fdUART = 0; |
|
31 | 31 | unsigned char lfrCurrentMode; |
|
32 | unsigned char pa_bia_status_info; | |
|
32 | 33 | |
|
33 | 34 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes = 24584 |
|
34 | 35 | // 97 * 256 = 24832 => delta = 248 bytes = 62 words |
@@ -138,6 +138,7 rtems_task Init( rtems_task_argument ign | |||
|
138 | 138 | init_k_coefficients_prc0(); |
|
139 | 139 | init_k_coefficients_prc1(); |
|
140 | 140 | init_k_coefficients_prc2(); |
|
141 | pa_bia_status_info = 0x00; | |
|
141 | 142 | |
|
142 | 143 | // waveform picker initialization |
|
143 | 144 | WFP_init_rings(); // initialize the waveform rings |
@@ -248,6 +249,8 rtems_task Init( rtems_task_argument ign | |||
|
248 | 249 | |
|
249 | 250 | BOOT_PRINTF("delete INIT\n") |
|
250 | 251 | |
|
252 | set_hk_lfr_sc_potential_flag( true ); | |
|
253 | ||
|
251 | 254 | status = rtems_task_delete(RTEMS_SELF); |
|
252 | 255 | |
|
253 | 256 | } |
@@ -538,6 +538,18 void set_hk_lfr_sc_potential_flag( bool | |||
|
538 | 538 | } |
|
539 | 539 | } |
|
540 | 540 | |
|
541 | void set_hk_lfr_mag_fields_flag( bool state ) | |
|
542 | { | |
|
543 | if (state == true) | |
|
544 | { | |
|
545 | housekeeping_packet.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1] | 0x20; // [0010 0000] | |
|
546 | } | |
|
547 | else | |
|
548 | { | |
|
549 | housekeeping_packet.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1] & 0xd7; // [1101 1111] | |
|
550 | } | |
|
551 | } | |
|
552 | ||
|
541 | 553 | void set_hk_lfr_calib_enable( bool state ) |
|
542 | 554 | { |
|
543 | 555 | if (state == true) |
@@ -549,3 +561,4 void set_hk_lfr_calib_enable( bool state | |||
|
549 | 561 | housekeeping_packet.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1] & 0xf7; // [1111 0111] |
|
550 | 562 | } |
|
551 | 563 | } |
|
564 |
@@ -814,6 +814,7 int spw_send_waveform_CWF( ring_node *ri | |||
|
814 | 814 | |
|
815 | 815 | header->packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_336 >> 8); |
|
816 | 816 | header->packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_336 ); |
|
817 | header->hkBIA = pa_bia_status_info; | |
|
817 | 818 | header->sy_lfr_common_parameters = parameter_dump_packet.sy_lfr_common_parameters; |
|
818 | 819 | header->blkNr[0] = (unsigned char) (BLK_NR_CWF >> 8); |
|
819 | 820 | header->blkNr[1] = (unsigned char) (BLK_NR_CWF ); |
@@ -897,6 +898,7 int spw_send_waveform_SWF( ring_node *ri | |||
|
897 | 898 | dataPtr = (int*) ring_node_to_send->buffer_address; |
|
898 | 899 | sid = ring_node_to_send->sid; |
|
899 | 900 | |
|
901 | header->hkBIA = pa_bia_status_info; | |
|
900 | 902 | header->sy_lfr_common_parameters = parameter_dump_packet.sy_lfr_common_parameters; |
|
901 | 903 | |
|
902 | 904 | for (i=0; i<7; i++) // send waveform |
@@ -988,6 +990,7 int spw_send_waveform_CWF3_light( ring_n | |||
|
988 | 990 | |
|
989 | 991 | header->packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_672 >> 8); |
|
990 | 992 | header->packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_672 ); |
|
993 | header->hkBIA = pa_bia_status_info; | |
|
991 | 994 | header->sy_lfr_common_parameters = parameter_dump_packet.sy_lfr_common_parameters; |
|
992 | 995 | header->blkNr[0] = (unsigned char) (BLK_NR_CWF_SHORT_F3 >> 8); |
|
993 | 996 | header->blkNr[1] = (unsigned char) (BLK_NR_CWF_SHORT_F3 ); |
@@ -1049,6 +1052,7 void spw_send_asm_f0( ring_node *ring_no | |||
|
1049 | 1052 | coarseTime = ring_node_to_send->coarseTime; |
|
1050 | 1053 | fineTime = ring_node_to_send->fineTime; |
|
1051 | 1054 | |
|
1055 | header->biaStatusInfo = pa_bia_status_info; | |
|
1052 | 1056 | header->sy_lfr_common_parameters = parameter_dump_packet.sy_lfr_common_parameters; |
|
1053 | 1057 | |
|
1054 | 1058 | for (i=0; i<3; i++) |
@@ -1128,6 +1132,7 void spw_send_asm_f1( ring_node *ring_no | |||
|
1128 | 1132 | coarseTime = ring_node_to_send->coarseTime; |
|
1129 | 1133 | fineTime = ring_node_to_send->fineTime; |
|
1130 | 1134 | |
|
1135 | header->biaStatusInfo = pa_bia_status_info; | |
|
1131 | 1136 | header->sy_lfr_common_parameters = parameter_dump_packet.sy_lfr_common_parameters; |
|
1132 | 1137 | |
|
1133 | 1138 | for (i=0; i<3; i++) |
@@ -1207,6 +1212,7 void spw_send_asm_f2( ring_node *ring_no | |||
|
1207 | 1212 | coarseTime = ring_node_to_send->coarseTime; |
|
1208 | 1213 | fineTime = ring_node_to_send->fineTime; |
|
1209 | 1214 | |
|
1215 | header->biaStatusInfo = pa_bia_status_info; | |
|
1210 | 1216 | header->sy_lfr_common_parameters = parameter_dump_packet.sy_lfr_common_parameters; |
|
1211 | 1217 | |
|
1212 | 1218 | for (i=0; i<3; i++) |
@@ -253,6 +253,17 int action_update_info(ccsdsTelecommandP | |||
|
253 | 253 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); |
|
254 | 254 | } |
|
255 | 255 | |
|
256 | // pa_bia_status_info | |
|
257 | // => pa_bia_mode_mux_set 3 bits | |
|
258 | // => pa_bia_mode_hv_enabled 1 bit | |
|
259 | // => pa_bia_mode_bias1_enabled 1 bit | |
|
260 | // => pa_bia_mode_bias2_enabled 1 bit | |
|
261 | // => pa_bia_mode_bias3_enabled 1 bit | |
|
262 | // => pa_bia_on_off (cp_dpu_bias_on_off) | |
|
263 | pa_bia_status_info = bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET2 ] & 0xfe; // [1111 1110] | |
|
264 | pa_bia_status_info = pa_bia_status_info | |
|
265 | | (bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET1 ] & 0x1); | |
|
266 | ||
|
256 | 267 | result = status; |
|
257 | 268 | |
|
258 | 269 | return result; |
General Comments 0
You need to be logged in to leave comments.
Login now