##// END OF EJS Templates
Commit to nov2013 branch
Commit to nov2013 branch

File last commit:

r63:82d0f7d680ce default
r67:1e5c5864272a default
Show More
wf_handler.c
1225 lines | 47.7 KiB | text/x-c | CLexer
paul
Header files inclusion reworked...
r40 /** Functions and tasks related to waveform packet generation.
*
* @file
* @author P. LEROY
*
* A group of functions to handle waveforms, in snapshot or continuous format.\n
*
*/
#include "wf_handler.h"
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul
Commit before working on the ERR 4 due to message queue...
r34 // SWF
Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7];
Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7];
Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7];
// CWF
paul
packet emission task added...
r33 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7];
paul
Commit before working on the ERR 4 due to message queue...
r34 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7];
paul
packet emission task added...
r33 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7];
paul
CWF_F3 packets are now compliant with the ICD...
r38 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7];
paul
packet emission task added...
r33
unsigned char doubleSendCWF1 = 0;
unsigned char doubleSendCWF2 = 0;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 rtems_isr waveforms_isr( rtems_vector_number vector )
{
paul
Minor changes in .h inclusion
r45 /** This is the interrupt sub routine called by the waveform picker core.
*
* This ISR launch different actions depending mainly on two pieces of information:
* 1. the values read in the registers of the waveform picker.
* 2. the current LFR mode.
*
*/
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21
paul
last version before VHDL design upgrade...
r53 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff00f; // clear new_err and full_err
paul
sy_lfr_n_swf_p implemented...
r32 #ifdef GSA
#else
paul
packet emission task added...
r33 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
|| (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) )
paul
sy_lfr_n_swf_p implemented...
r32 { // in modes other than STANDBY and BURST, send the CWF_F3 data
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ((new_waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full
paul
sy_lfr_n_swf_p implemented...
r32 // (1) change the receiving buffer for the waveform picker
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if (new_waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis);
paul
sy_lfr_n_swf_p implemented...
r32 }
else {
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3);
paul
sy_lfr_n_swf_p implemented...
r32 }
// (2) send an event for the waveforms transmission
paul
packet emission task added...
r33 if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
paul
sy_lfr_n_swf_p implemented...
r32 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
paul
sy_lfr_n_swf_p implemented...
r32 }
}
#endif
paul
packet emission task added...
r33 switch(lfrCurrentMode)
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 {
//********
// STANDBY
case(LFR_MODE_STANDBY):
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21
//******
// NORMAL
case(LFR_MODE_NORMAL):
#ifdef GSA
paul
packet emission task added...
r33 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 #else
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ( (new_waveform_picker_regs->run_burst_enable & 0x7) == 0x0 ){ // if no channel is enable
paul
Last commit before release 0-13...
r35 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
else {
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ( (new_waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full
new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable & 0x08;
paul
Last commit before release 0-13...
r35 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 // new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0x00;
new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff888;
new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x07; // [0111] enable f2 f1 f0
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 }
paul
Last commit before release 0-13...
r35 }
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 #endif
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21
//******
// BURST
case(LFR_MODE_BURST):
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 #ifdef GSA
paul
packet emission task added...
r33 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 #else
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ((new_waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
paul
packet emission task added...
r33 // (1) change the receiving buffer for the waveform picker
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
paul
packet emission task added...
r33 }
else {
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 }
paul
packet emission task added...
r33 // (2) send an event for the waveforms transmission
if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
paul
packet emission task added...
r33 }
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 #endif
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 //*****
// SBM1
case(LFR_MODE_SBM1):
#ifdef GSA
paul
packet emission task added...
r33 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 #else
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ((new_waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit
paul
packet emission task added...
r33 // (1) change the receiving buffer for the waveform picker
if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) )
{
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm);
paul
packet emission task added...
r33 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 else if ( new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm )
paul
packet emission task added...
r33 {
doubleSendCWF1 = 1;
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
paul
packet emission task added...
r33 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 else if ( new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) {
new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis);
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 }
paul
packet emission task added...
r33 else {
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
paul
packet emission task added...
r33 }
// (2) send an event for the waveforms transmission
if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0
paul
packet emission task added...
r33 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ( ( (new_waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit
paul
packet emission task added...
r33 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0
paul
packet emission task added...
r33 reset_local_sbm1_nb_cwf_sent();
}
paul
sy_lfr_n_swf_p implemented...
r32
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 #endif
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
//*****
// SBM2
case(LFR_MODE_SBM2):
#ifdef GSA
paul
packet emission task added...
r33 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 #else
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ((new_waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
paul
packet emission task added...
r33 // (1) change the receiving buffer for the waveform picker
paul
Commit before working on the ERR 4 due to message queue...
r34 if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) )
{
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm);
paul
Commit before working on the ERR 4 due to message queue...
r34 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 else if ( new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) {
new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
paul
Commit before working on the ERR 4 due to message queue...
r34 doubleSendCWF2 = 1;
if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
reset_local_sbm2_nb_cwf_sent();
}
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 else if ( new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) {
new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
paul
packet emission task added...
r33 }
else {
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
paul
packet emission task added...
r33 }
// (2) send an event for the waveforms transmission
if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
paul
packet emission task added...
r33 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if ( ( (new_waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full
paul
packet emission task added...
r33 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
paul
packet emission task added...
r33 }
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 #endif
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 //********
// DEFAULT
default:
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 }
}
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18 rtems_isr waveforms_simulator_isr( rtems_vector_number vector )
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 {
paul
Minor changes in .h inclusion
r45 /** This is the interrupt sub routine called by the waveform picker simulator.
*
* This ISR is for debug purpose only.
*
*/
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 unsigned char lfrMode;
lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 switch(lfrMode) {
case (LFR_MODE_STANDBY):
break;
case (LFR_MODE_NORMAL):
if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
paul
SOLVED: compatibility of fsw-gsa with the WF simulator interruption
r30 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 );
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 }
break;
case (LFR_MODE_BURST):
break;
case (LFR_MODE_SBM1):
break;
case (LFR_MODE_SBM2):
break;
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18 }
}
rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packets are sent by this task:
* - TM_LFR_SCIENCE_NORMAL_SWF_F0
* - TM_LFR_SCIENCE_NORMAL_SWF_F1
* - TM_LFR_SCIENCE_NORMAL_SWF_F2
*
*/
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul
Commit before working on the ERR 4 due to message queue...
r34 init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 );
init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 );
init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 );
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18 init_waveforms();
paul
Ignore doc files...
r46 queue_id = get_pkts_queue_id();
paul
Last commit before release 0-13...
r35
BOOT_PRINTF("in WFRM ***\n")
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
while(1){
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 // wait for an RTEMS_EVENT
paul
Commit before working on the ERR 4 due to message queue...
r34 rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1
| RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM,
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
sy_lfr_n_swf_p implemented...
r32
paul
Last commit before release 0-13...
r35 if (event_out == RTEMS_EVENT_MODE_NORMAL)
{
send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
paul
packet emission task added...
r33 #ifdef GSA
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 #endif
paul
Last commit before release 0-13...
r35 }
else if (event_out == RTEMS_EVENT_MODE_SBM1)
{
send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 #ifdef GSA
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 #endif
paul
Last commit before release 0-13...
r35 }
else if (event_out == RTEMS_EVENT_MODE_SBM2)
{
send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
paul
Commit before working on the ERR 4 due to message queue...
r34 #ifdef GSA
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
paul
Commit before working on the ERR 4 due to message queue...
r34 #endif
paul
Last commit before release 0-13...
r35 }
else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM)
{
send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
}
else
{
PRINTF("in WFRM *** unexpected event")
}
paul
Commit before working on the ERR 4 due to message queue...
r34
paul
sy_lfr_n_swf_p implemented...
r32
paul
packet emission task added...
r33 #ifdef GSA
// irq processed, reset the related register of the timer unit
gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010;
// clear the interruption
LEON_Unmask_interrupt( IRQ_WF );
#endif
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 }
}
paul@pc-solar1.lab-lpp.local
automatic reconnexion of the spacewire link...
r17
paul
sy_lfr_n_swf_p implemented...
r32 rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packet is sent by this task:
* - TM_LFR_SCIENCE_NORMAL_CWF_F3
*
*/
paul
sy_lfr_n_swf_p implemented...
r32 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
sy_lfr_n_swf_p implemented...
r32
paul
packet emission task added...
r33 init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 );
paul
CWF_F3 packets are now compliant with the ICD...
r38 init_header_continuous_wf3_light_table( headerCWF_F3_light );
paul
sy_lfr_n_swf_p implemented...
r32
paul
Last commit before release 0-13...
r35 queue_id = get_pkts_queue_id();
BOOT_PRINTF("in CWF3 ***\n")
paul
sy_lfr_n_swf_p implemented...
r32
while(1){
// wait for an RTEMS_EVENT
paul
packet emission task added...
r33 rtems_event_receive( RTEMS_EVENT_0,
paul
sy_lfr_n_swf_p implemented...
r32 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
PRINTF("send CWF F3 \n")
paul
packet emission task added...
r33 #ifdef GSA
#else
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if (new_waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
paul
CWF_F3 packets are now compliant with the ICD...
r38 send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id );
paul
packet emission task added...
r33 }
else {
paul
CWF_F3 packets are now compliant with the ICD...
r38 send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id );
paul
packet emission task added...
r33 }
#endif
}
}
rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packet is sent by this function:
* - TM_LFR_SCIENCE_BURST_CWF_F2
* - TM_LFR_SCIENCE_SBM2_CWF_F2
*
*/
paul
packet emission task added...
r33 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
packet emission task added...
r33
init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST );
paul
Commit before working on the ERR 4 due to message queue...
r34 init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 );
paul
packet emission task added...
r33
paul
Last commit before release 0-13...
r35 queue_id = get_pkts_queue_id();
BOOT_PRINTF("in CWF2 ***\n")
paul
packet emission task added...
r33
while(1){
// wait for an RTEMS_EVENT
rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2,
RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
TM_LFR_TC_EXE packet sending reworked...
r37
paul
packet emission task added...
r33 if (event_out == RTEMS_EVENT_MODE_BURST)
{
// F2
#ifdef GSA
#else
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
paul
TM_LFR_TC_EXE packet sending reworked...
r37 send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
paul
packet emission task added...
r33 }
else {
paul
Last commit before release 0-13...
r35 send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
paul
packet emission task added...
r33 }
#endif
}
paul
TM_LFR_TC_EXE packet sending reworked...
r37
paul
packet emission task added...
r33 else if (event_out == RTEMS_EVENT_MODE_SBM2)
{
#ifdef GSA
#else
paul
Commit before working on the ERR 4 due to message queue...
r34 if (doubleSendCWF2 == 1)
{
doubleSendCWF2 = 0;
paul
Last commit before release 0-13...
r35 send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
paul
Commit before working on the ERR 4 due to message queue...
r34 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 else if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
paul
Last commit before release 0-13...
r35 send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
paul
packet emission task added...
r33 }
else {
paul
Last commit before release 0-13...
r35 send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
paul
packet emission task added...
r33 }
paul
Commit before working on the ERR 4 due to message queue...
r34 param_local.local_sbm2_nb_cwf_sent ++;
paul
packet emission task added...
r33 #endif
}
else
{
PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode)
}
}
}
rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packet is sent by this function:
* - TM_LFR_SCIENCE_SBM1_CWF_F1
*
*/
paul
packet emission task added...
r33 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
packet emission task added...
r33
init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
paul
Last commit before release 0-13...
r35 queue_id = get_pkts_queue_id();
BOOT_PRINTF("in CWF1 ***\n")
paul
packet emission task added...
r33
while(1){
// wait for an RTEMS_EVENT
rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
if (event_out == RTEMS_EVENT_MODE_SBM1)
{
#ifdef GSA
#else
if (doubleSendCWF1 == 1)
{
doubleSendCWF1 = 0;
paul
Last commit before release 0-13...
r35 send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
paul
packet emission task added...
r33 }
paul
waveform picker registers updated to be compliant with the new VHDL design
r52 else if (new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) {