##// END OF EJS Templates
Commit before testing the 0.1.28 pdb with new waveform picker
Commit before testing the 0.1.28 pdb with new waveform picker

File last commit:

r168:8af347acc664 patch rev 2
r169:675402b630ea patch rev 2
Show More
wf_handler.c
1367 lines | 54.8 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
First version of the rings for the waveform picker.
r87 //*****************
// waveform headers
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
rev 1.0.0.1
r98 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[ NB_PACKETS_PER_GROUP_OF_CWF_LIGHT ];
paul
packet emission task added...
r33
paul
First version of the rings for the waveform picker.
r87 //**************
// waveform ring
paul
ICD 2.0...
r92 ring_node waveform_ring_f0[NB_RING_NODES_F0];
paul
First version of the rings for the waveform picker.
r87 ring_node waveform_ring_f1[NB_RING_NODES_F1];
ring_node waveform_ring_f2[NB_RING_NODES_F2];
paul
waveform buffers declaration modified...
r131 ring_node waveform_ring_f3[NB_RING_NODES_F3];
paul
ICD 2.0...
r92 ring_node *current_ring_node_f0;
ring_node *ring_node_to_send_swf_f0;
paul
First version of the rings for the waveform picker.
r87 ring_node *current_ring_node_f1;
ring_node *ring_node_to_send_swf_f1;
ring_node *ring_node_to_send_cwf_f1;
ring_node *current_ring_node_f2;
ring_node *ring_node_to_send_swf_f2;
ring_node *ring_node_to_send_cwf_f2;
paul
waveform buffers declaration modified...
r131 ring_node *current_ring_node_f3;
ring_node *ring_node_to_send_cwf_f3;
paul
First version of the rings for the waveform picker.
r87
paul
snapshot extraction for the waveform ring is operational...
r105 bool extractSWF = false;
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 bool swf_f0_ready = false;
bool swf_f1_ready = false;
bool swf_f2_ready = false;
paul
snapshot extraction for the waveform ring is operational...
r105
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 int wf_snap_extracted[ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET ];
//*********************
// Interrupt SubRoutine
void reset_extractSWF( void )
{
extractSWF = false;
swf_f0_ready = false;
swf_f1_ready = false;
swf_f2_ready = false;
}
paul
snapshot extraction for the waveform ring is operational...
r105
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
snapshots extraction fully functionnal in SBM1 and SBM2
r106 rtems_status_code status;
paul
Many corrections done after Logiscope analysis
r166 rtems_status_code spare_status;
paul
Sync
r95
paul
The HK packet contains v, e1 and e2 valid data at f3....
r129 if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_BURST) // in BURST the data are used to place v, e1 and e2 in the HK packet
paul
packet emission task added...
r33 || (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
packet emission task added...
r33 if ((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 buffers declaration modified...
r131 ring_node_to_send_cwf_f3 = current_ring_node_f3;
current_ring_node_f3 = current_ring_node_f3->next;
waveform_picker_regs->addr_data_f3 = current_ring_node_f3->buffer_address;
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
Many corrections done after Logiscope analysis
r166 spare_status = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul
sy_lfr_n_swf_p implemented...
r32 }
paul
spacecraft potential extraction upgraded
r130 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2);
paul
packet emission task added...
r33 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
paul
sy_lfr_n_swf_p implemented...
r32 }
}
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):
paul
Minor changes
r94 if ( (waveform_picker_regs->status & 0xff8) != 0x00) // [1000] check the error bits
{
paul
Many corrections done after Logiscope analysis
r166 spare_status = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul
Minor changes
r94 }
if ( (waveform_picker_regs->status & 0x07) == 0x07) // [0111] check the f2, f1, f0 full bits
{
paul
ICD 2.0...
r92 // change F0 ring node
ring_node_to_send_swf_f0 = current_ring_node_f0;
current_ring_node_f0 = current_ring_node_f0->next;
waveform_picker_regs->addr_data_f0 = current_ring_node_f0->buffer_address;
paul
Integration of the VHDL_DEV option...
r90 // change F1 ring node
ring_node_to_send_swf_f1 = current_ring_node_f1;
current_ring_node_f1 = current_ring_node_f1->next;
waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address;
// change F2 ring node
ring_node_to_send_swf_f2 = current_ring_node_f2;
current_ring_node_f2 = current_ring_node_f2->next;
waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
paul
Minor changes
r94 //
paul
There is a message queue between AVFO and MATR...
r118 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL)
paul
Sync
r95 {
paul
Many corrections done after Logiscope analysis
r166 spare_status = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul
Sync
r95 }
paul
There is a message queue between AVFO and MATR...
r118 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888; // [1000 1000 1000]
paul
Sync
r95 }
break;
//******
// BURST
case(LFR_MODE_BURST):
if ( (waveform_picker_regs->status & 0x04) == 0x04 ){ // [0100] check the f2 full bit
// (1) change the receiving buffer for the waveform picker
ring_node_to_send_cwf_f2 = current_ring_node_f2;
current_ring_node_f2 = current_ring_node_f2->next;
waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
// (2) send an event for the waveforms transmission
if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
paul
Many corrections done after Logiscope analysis
r166 spare_status = rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
paul
Sync
r95 }
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
}
break;
//*****
// SBM1
case(LFR_MODE_SBM1):
if ( (waveform_picker_regs->status & 0x02) == 0x02 ) { // [0010] check the f1 full bit
// (1) change the receiving buffer for the waveform picker
ring_node_to_send_cwf_f1 = current_ring_node_f1;
current_ring_node_f1 = current_ring_node_f1->next;
waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address;
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 // (2) send an event for the the CWF1 task for transmission (and snapshot extraction if needed)
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 status = rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 );
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bits = 0
paul
Sync
r95 }
if ( (waveform_picker_regs->status & 0x01) == 0x01 ) { // [0001] check the f0 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f0_ready = true;
paul
snapshot extraction for the waveform ring is operational...
r105 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffeee; // [1111 1110 1110 1110] f0 bits = 0
paul
Sync
r95 }
paul
snapshot extraction for the waveform ring is operational...
r105 if ( (waveform_picker_regs->status & 0x04) == 0x04 ) { // [0100] check the f2 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f2_ready = true;
paul
snapshot extraction for the waveform ring is operational...
r105 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
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):
paul
First version of the rings for the waveform picker.
r87 if ( (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
First version of the rings for the waveform picker.
r87 ring_node_to_send_cwf_f2 = current_ring_node_f2;
current_ring_node_f2 = current_ring_node_f2->next;
waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
paul
packet emission task added...
r33 // (2) send an event for the waveforms transmission
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 status = rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 );
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
paul
packet emission task added...
r33 }
paul
Integration of the VHDL_DEV option...
r90 if ( (waveform_picker_regs->status & 0x01) == 0x01 ) { // [0001] check the f0 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f0_ready = true;
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffeee; // [1111 1110 1110 1110] f0 bits = 0
paul
Integration of the VHDL_DEV option...
r90 }
if ( (waveform_picker_regs->status & 0x02) == 0x02 ) { // [0010] check the f1 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f1_ready = true;
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1, f0 bits = 0
paul
Integration of the VHDL_DEV option...
r90 }
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
snapshots extraction fully functionnal in SBM1 and SBM2
r106 //************
// RTEMS TASKS
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
fsw-1-0...
r82 rtems_status_code status;
paul
2.0.1.1...
r168 bool resynchronisationEngaged;
resynchronisationEngaged = false;
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
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in WFRM *** ERR get_message_queue_id_send %d\n", status)
}
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
paul
snapshot extraction for the waveform ring is operational...
r105 | 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
2.0.1.1...
r168 if(resynchronisationEngaged == false)
{ // engage resynchronisation
snapshot_resynchronization( (unsigned char *) ring_node_to_send_swf_f0->buffer_address);
resynchronisationEngaged = true;
}
else
{ // reset delta_snapshot to the nominal value
PRINTF("no resynchronisation, reset delta_snapshot to the nominal value\n")
set_wfp_delta_snapshot();
resynchronisationEngaged = false;
}
//
paul
Last commit before release 0-13...
r35 if (event_out == RTEMS_EVENT_MODE_NORMAL)
{
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 DEBUG_PRINTF("WFRM received RTEMS_EVENT_MODE_NORMAL\n")
paul
ICD 2.0...
r92 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
paul
First version of the rings for the waveform picker.
r87 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
paul
Minor changes
r94 }
paul
snapshot extraction for the waveform ring is operational...
r105 if (event_out == RTEMS_EVENT_MODE_SBM1)
paul
Minor changes
r94 {
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 DEBUG_PRINTF("WFRM received RTEMS_EVENT_MODE_SBM1\n")
paul
Minor changes
r94 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 send_waveform_SWF((volatile int*) wf_snap_extracted , SID_NORM_SWF_F1, headerSWF_F1, queue_id);
paul
Minor changes
r94 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
paul
Last commit before release 0-13...
r35 }
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 if (event_out == RTEMS_EVENT_MODE_SBM2)
{
DEBUG_PRINTF("WFRM received RTEMS_EVENT_MODE_SBM2\n")
send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
send_waveform_SWF((volatile int*) wf_snap_extracted , SID_NORM_SWF_F2, headerSWF_F2, queue_id);
}
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
fsw-1-0...
r82 rtems_status_code status;
paul
sy_lfr_n_swf_p implemented...
r32
paul
ICD 2.0...
r92 init_header_continuous_wf_table( SID_NORM_CWF_LONG_F3, headerCWF_F3 );
init_header_continuous_cwf3_light_table( headerCWF_F3_light );
paul
sy_lfr_n_swf_p implemented...
r32
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in CWF3 *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
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);
paul
The HK packet contains v, e1 and e2 valid data at f3....
r129 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
|| (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode==LFR_MODE_SBM2) )
paul
rev 1.0.0.1
r98 {
paul
ICD 2.0...
r92 if ( (parameter_dump_packet.sy_lfr_n_cwf_long_f3 & 0x01) == 0x01)
{
paul
The HK packet contains v, e1 and e2 valid data at f3....
r129 PRINTF("send CWF_LONG_F3\n")
paul
waveform buffers declaration modified...
r131 send_waveform_CWF(
paul
Bug #175
r157 (volatile int*) ring_node_to_send_cwf_f3->buffer_address,
paul
waveform buffers declaration modified...
r131 SID_NORM_CWF_LONG_F3, headerCWF_F3, queue_id );
paul
ICD 2.0...
r92 }
else
{
paul
The HK packet contains v, e1 and e2 valid data at f3....
r129 PRINTF("send CWF_F3 (light)\n")
paul
waveform buffers declaration modified...
r131 send_waveform_CWF3_light(
paul
Bug #175
r157 (volatile int*) ring_node_to_send_cwf_f3->buffer_address,
paul
waveform buffers declaration modified...
r131 headerCWF_F3_light, queue_id );
paul
The HK packet contains v, e1 and e2 valid data at f3....
r129 }
paul
packet emission task added...
r33 }
paul
ICD 2.0...
r92 else
{
paul
The HK packet contains v, e1 and e2 valid data at f3....
r129 PRINTF1("in CWF3 *** lfrCurrentMode is %d, no data will be sent\n", lfrCurrentMode)
paul
packet emission task added...
r33 }
}
}
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
fsw-1-0...
r82 rtems_status_code status;
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
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in CWF2 *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
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);
if (event_out == RTEMS_EVENT_MODE_BURST)
{
paul
VHDL_DEV implemented. The code is compatible with:...
r91 send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2->buffer_address, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
paul
packet emission task added...
r33 }
paul
First version of the rings for the waveform picker.
r87 if (event_out == RTEMS_EVENT_MODE_SBM2)
paul
packet emission task added...
r33 {
paul
VHDL_DEV implemented. The code is compatible with:...
r91 send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2->buffer_address, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 // launch snapshot extraction if needed
if (extractSWF == true)
{
ring_node_to_send_swf_f2 = ring_node_to_send_cwf_f2;
// extract the snapshot
build_snapshot_from_ring( ring_node_to_send_swf_f2, 2 );
// send the snapshot when built
status = rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 );
extractSWF = false;
}
if (swf_f0_ready && swf_f1_ready)
{
extractSWF = true;
swf_f0_ready = false;
swf_f1_ready = false;
}
paul
packet emission task added...
r33 }
}
}
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
fsw-1-0...
r82 rtems_status_code status;
paul
packet emission task added...
r33
init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in CWF1 *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
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);
paul
VHDL_DEV implemented. The code is compatible with:...
r91 send_waveform_CWF( (volatile int*) ring_node_to_send_cwf_f1->buffer_address, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 // launch snapshot extraction if needed
if (extractSWF == true)
{
ring_node_to_send_swf_f1 = ring_node_to_send_cwf_f1;
// launch the snapshot extraction
status = rtems_event_send( Task_id[TASKID_SWBD], RTEMS_EVENT_MODE_SBM1 );
extractSWF = false;
}
if (swf_f0_ready == true)
{
extractSWF = true;
swf_f0_ready = false; // this step shall be executed only one time
}
if ((swf_f1_ready == true) && (swf_f2_ready == true)) // swf_f1 is ready after the extraction
{
status = rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM1 );
swf_f1_ready = false;
swf_f2_ready = false;
}
paul
sy_lfr_n_swf_p implemented...
r32 }
}
paul
snapshot extraction for the waveform ring is operational...
r105 rtems_task swbd_task(rtems_task_argument argument)
{
/** This RTEMS task is dedicated to the building of snapshots from different continuous waveforms buffers.
*
* @param unused is the starting argument of the RTEMS task
*
*/
rtems_event_set event_out;
BOOT_PRINTF("in SWBD ***\n")
while(1){
// wait for an RTEMS_EVENT
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 rtems_event_receive( RTEMS_EVENT_MODE_SBM1 | RTEMS_EVENT_MODE_SBM2,
paul
snapshot extraction for the waveform ring is operational...
r105 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 if (event_out == RTEMS_EVENT_MODE_SBM1)
{
build_snapshot_from_ring( ring_node_to_send_swf_f1, 1 );
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 swf_f1_ready = true; // the snapshot has been extracted and is ready to be sent
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 }
else
{
PRINTF1("in SWBD *** unexpected rtems event received %x\n", (int) event_out)
}
paul
snapshot extraction for the waveform ring is operational...
r105 }
}
paul@pc-solar1.lab-lpp.local
automatic reconnexion of the spacewire link...
r17 //******************
// general functions
paul
First version of the rings for the waveform picker.
r87
paul
Sync
r139 void WFP_init_rings( void )
paul
First version of the rings for the waveform picker.
r87 {