##// END OF EJS Templates
a wrong date implies the generation of a TM_LFR_TC_EXE_NOT_EXECUTABLE...
a wrong date implies the generation of a TM_LFR_TC_EXE_NOT_EXECUTABLE instead of TM_LFR_TC_EXE_INCONSISTENT

File last commit:

r254:aca3cbff85cc R3a
r254:aca3cbff85cc R3a
Show More
tc_handler.c
1606 lines | 49.4 KiB | text/x-c | CLexer
paul
Header files inclusion reworked...
r40 /** Functions and tasks related to TeleCommand handling.
*
* @file
* @author P. LEROY
*
* A group of functions to handle TeleCommands:\n
* action launching\n
* TC parsing\n
* ...
*
*/
#include "tc_handler.h"
paul
2.0.2.2...
r187 #include "math.h"
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul@pc-solar1.lab-lpp.local
Minor updates
r7 //***********
// RTEMS TASK
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 rtems_task actn_task( rtems_task_argument unused )
{
paul
Header files inclusion reworked...
r40 /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands.
*
* @param unused is the starting argument of the RTEMS task
*
* The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending
* on the incoming TeleCommand.
*
*/
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 int result;
rtems_status_code status; // RTEMS status code
ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task
size_t size; // size of the incoming TC packet
unsigned char subtype; // subtype of the current TC packet
paul
fsw-0-23...
r75 unsigned char time[6];
paul
Last commit before release 0-13...
r35 rtems_id queue_rcv_id;
rtems_id queue_snd_id;
paul
fsw-1-0...
r82 status = get_message_queue_id_recv( &queue_rcv_id );
paul
Last commit before release 0-13...
r35 if (status != RTEMS_SUCCESSFUL)
{
paul
fsw-1-0...
r82 PRINTF1("in ACTN *** ERR get_message_queue_id_recv %d\n", status)
paul
Last commit before release 0-13...
r35 }
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_snd_id );
paul
Last commit before release 0-13...
r35 if (status != RTEMS_SUCCESSFUL)
{
paul
fsw-1-0...
r82 PRINTF1("in ACTN *** ERR get_message_queue_id_send %d\n", status)
paul
Last commit before release 0-13...
r35 }
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
result = LFR_SUCCESSFUL;
subtype = 0; // subtype of the current TC packet
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul
Last commit before release 0-13...
r35 BOOT_PRINTF("in ACTN *** \n")
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11
paul
enter_mode removed...
r237 while(1)
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 {
paul
Last commit before release 0-13...
r35 status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size,
paul
enter_mode removed...
r237 RTEMS_WAIT, RTEMS_NO_TIMEOUT);
paul
fsw-0-23...
r75 getTime( time ); // set time to the current time
paul
Minor modifications to meet Logiscope requirements
r77 if (status!=RTEMS_SUCCESSFUL)
{
PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status)
}
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 else
{
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 subtype = TC.serviceSubType;
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 switch(subtype)
{
paul
R3 updates. TC handlers added for the new telecommands:...
r192 case TC_SUBTYPE_RESET:
result = action_reset( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_COMM:
result = action_load_common_par( &TC );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_NORM:
result = action_load_normal_par( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_BURST:
result = action_load_burst_par( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_SBM1:
result = action_load_sbm1_par( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_SBM2:
result = action_load_sbm2_par( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_DUMP:
paul
bug #507 corrected (destination_id of TM_LFR_PARAMETER_DUMP)
r222 result = action_dump_par( &TC, queue_snd_id );
paul
R3 updates. TC handlers added for the new telecommands:...
r192 close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_ENTER:
result = action_enter_mode( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_UPDT_INFO:
result = action_update_info( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_EN_CAL:
result = action_enable_calibration( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_DIS_CAL:
result = action_disable_calibration( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_K:
result = action_load_kcoefficients( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_DUMP_K:
result = action_dump_kcoefficients( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_LOAD_FBINS:
result = action_load_fbins_mask( &TC, queue_snd_id, time );
close_action( &TC, result, queue_snd_id );
break;
case TC_SUBTYPE_UPDT_TIME:
result = action_update_time( &TC );
close_action( &TC, result, queue_snd_id );
break;
default:
break;
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 }
}
}
}
//***********
// TC ACTIONS
paul@pc-solar1.lab-lpp.local
FSW modified to have correct answers to TC_LFR_DUMP_PAR
r15
paul
fsw-0-23...
r75 int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 {
paul
Header files inclusion reworked...
r40 /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received.
*
* @param TC points to the TeleCommand packet that is being processed
* @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver
*
*/
paul
printf removed or replaced by PRINTF macros...
r227 PRINTF("this is the end!!!\n")
paul
enter_mode removed...
r237 exit(0);
paul
fsw-0-23...
r75 send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 return LFR_DEFAULT;
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 }
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
paul
packet emission task added...
r33 {
paul
Header files inclusion reworked...
r40 /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received.
*
* @param TC points to the TeleCommand packet that is being processed
* @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver
*
*/
paul
packet emission task added...
r33 rtems_status_code status;
unsigned char requestedMode;
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 unsigned int *transitionCoarseTime_ptr;
unsigned int transitionCoarseTime;
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 unsigned char * bytePosPtr;
paul
packet emission task added...
r33
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 bytePosPtr = (unsigned char *) &TC->packetID;
requestedMode = bytePosPtr[ BYTE_POS_CP_MODE_LFR_SET ];
transitionCoarseTime_ptr = (unsigned int *) ( &bytePosPtr[ BYTE_POS_CP_LFR_ENTER_MODE_TIME ] );
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 transitionCoarseTime = (*transitionCoarseTime_ptr) & 0x7fffffff;
paul
packet emission task added...
r33
paul
rev 1.0.0.3
r109 status = check_mode_value( requestedMode );
paul
rev 1.0.0.4
r110
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 if ( status != LFR_SUCCESSFUL ) // the mode value is inconsistent
paul
packet emission task added...
r33 {
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_MODE_LFR_SET, requestedMode );
paul
packet emission task added...
r33 }
paul
minor updates on documentation
r240
paul
Last commit before leaving!
r219 else // the mode value is valid, check the transition
paul
packet emission task added...
r33 {
paul
rev 1.0.0.3
r109 status = check_mode_transition(requestedMode);
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 if (status != LFR_SUCCESSFUL)
paul
rev 1.0.0.3
r109 {
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 PRINTF("ERR *** in action_enter_mode *** check_mode_transition\n")
paul
enter_mode removed...
r237 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
paul
TM_LFR_TC_EXE packet sending reworked...
r37 }
paul
packet emission task added...
r33 }
paul
Last commit before leaving!
r219 if ( status == LFR_SUCCESSFUL ) // the transition is valid, check the date
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 {
status = check_transition_date( transitionCoarseTime );
if (status != LFR_SUCCESSFUL)
{
paul
a wrong date implies the generation of a TM_LFR_TC_EXE_NOT_EXECUTABLE...
r254 PRINTF("ERR *** in action_enter_mode *** check_transition_date\n");
send_tm_lfr_tc_exe_not_executable(TC, queue_id );
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 }
}
if ( status == LFR_SUCCESSFUL ) // the date is valid, enter the mode
{
PRINTF1("OK *** in action_enter_mode *** enter mode %d\n", requestedMode);
paul
enter_mode removed...
r237
paul
BP sending filtered depending on the lastValidEnterModeTime
r243 update_last_valid_transition_date( transitionCoarseTime );
paul
minor updates on documentation
r240
paul
enter_mode removed...
r237 switch(requestedMode)
{
case LFR_MODE_STANDBY:
status = enter_mode_standby();
break;
case LFR_MODE_NORMAL:
status = enter_mode_normal( transitionCoarseTime );
break;
case LFR_MODE_BURST:
status = enter_mode_burst( transitionCoarseTime );
break;
case LFR_MODE_SBM1:
status = enter_mode_sbm1( transitionCoarseTime );
break;
case LFR_MODE_SBM2:
status = enter_mode_sbm2( transitionCoarseTime );
break;
default:
break;
}
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 }
paul
packet emission task added...
r33 return status;
}
paul
Header files inclusion reworked...
r40 int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
{
/** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received.
*
* @param TC points to the TeleCommand packet that is being processed
* @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver
*
paul
Ignore doc files...
r46 * @return LFR directive status code:
* - LFR_DEFAULT
* - LFR_SUCCESSFUL
*
paul
Header files inclusion reworked...
r40 */
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 unsigned int val;
int result;
paul
rev 1.0.0.2...
r104 unsigned int status;
unsigned char mode;
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 unsigned char * bytePosPtr;
bytePosPtr = (unsigned char *) &TC->packetID;
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
paul
Corrections:...
r107 // check LFR mode
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 mode = (bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET5 ] & 0x1e) >> 1;
paul
rev 1.0.0.2...
r104 status = check_update_info_hk_lfr_mode( mode );
paul
Corrections:...
r107 if (status == LFR_SUCCESSFUL) // check TDS mode
paul
rev 1.0.0.2...
r104 {
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 mode = (bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET6 ] & 0xf0) >> 4;
paul
rev 1.0.0.2...
r104 status = check_update_info_hk_tds_mode( mode );
}
paul
Corrections:...
r107 if (status == LFR_SUCCESSFUL) // check THR mode
paul
rev 1.0.0.2...
r104 {
paul
the interrupt sub routine related to the waveform picker is now lighter...
r112 mode = (bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET6 ] & 0x0f);
paul
rev 1.0.0.2...
r104 status = check_update_info_hk_thr_mode( mode );
}
paul
Corrections:...
r107 if (status == LFR_SUCCESSFUL) // if the parameter check is successful
paul
rev 1.0.0.2...
r104 {
val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256
+ housekeeping_packet.hk_lfr_update_info_tc_cnt[1];
val++;
housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8);
housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val);
}
paul
bug #456 pa_bia_status_info byte is updated upon the reception of...
r224 // pa_bia_status_info
// => pa_bia_mode_mux_set 3 bits
// => pa_bia_mode_hv_enabled 1 bit
// => pa_bia_mode_bias1_enabled 1 bit
// => pa_bia_mode_bias2_enabled 1 bit
// => pa_bia_mode_bias3_enabled 1 bit
// => pa_bia_on_off (cp_dpu_bias_on_off)
pa_bia_status_info = bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET2 ] & 0xfe; // [1111 1110]
pa_bia_status_info = pa_bia_status_info
| (bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET1 ] & 0x1);
paul
rev 1.0.0.2...
r104 result = status;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
return result;
}
paul
fsw-0-23...
r75 int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 {
paul
Header files inclusion reworked...
r40 /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received.
*
* @param TC points to the TeleCommand packet that is being processed
* @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver
*
*/
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 int result;
result = LFR_DEFAULT;
paul
Bug #354, hk_sy_lfr_calib_enabled is set in TM_LFR_HK packets
r206 setCalibration( true );
paul
2.0.2.2...
r187
result = LFR_SUCCESSFUL;
paul
rev 1.0.0.2...
r104
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 return result;
}
paul
fsw-0-23...
r75 int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 {
paul
Header files inclusion reworked...
r40 /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received.
*
* @param TC points to the TeleCommand packet that is being processed
* @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver
*
*/
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 int result;
result = LFR_DEFAULT;
paul
Bug #354, hk_sy_lfr_calib_enabled is set in TM_LFR_HK packets
r206 setCalibration( false );
paul
2.0.2.2...
r187
result = LFR_SUCCESSFUL;
paul
rev 1.0.0.2...
r104
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 return result;
}
paul
packet emission task added...
r33 int action_update_time(ccsdsTelecommandPacket_t *TC)
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 {
paul
Header files inclusion reworked...
r40 /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received.
*
* @param TC points to the TeleCommand packet that is being processed
* @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver
*
paul
Ignore doc files...
r46 * @return LFR_SUCCESSFUL
*
paul
Header files inclusion reworked...
r40 */
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 unsigned int val;
paul@pc-solar1.lab-lpp.local
waveform initialization modified due to a problem of compatibility...
r19
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24)
paul
enter_mode removed...
r237 + (TC->dataAndCRC[1] << 16)
+ (TC->dataAndCRC[2] << 8)
+ TC->dataAndCRC[3];
paul
rev 1.0.0.3
r109
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256
+ housekeeping_packet.hk_lfr_update_time_tc_cnt[1];
val++;
housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8);
housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val);
return LFR_SUCCESSFUL;
}
//*******************
// ENTERING THE MODES
paul
rev 1.0.0.3
r109 int check_mode_value( unsigned char requestedMode )
{
int status;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
paul
rev 1.0.0.3
r109 if ( (requestedMode != LFR_MODE_STANDBY)
&& (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST)
&& (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) )
{
status = LFR_DEFAULT;
}
else
{
status = LFR_SUCCESSFUL;
}
return status;
}
int check_mode_transition( unsigned char requestedMode )
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 {
paul
Minor modifications to meet Logiscope requirements
r77 /** This function checks the validity of the transition requested by the TC_LFR_ENTER_MODE.
*
* @param requestedMode is the mode requested by the TC_LFR_ENTER_MODE
*
* @return LFR directive status codes:
* - LFR_SUCCESSFUL - the transition is authorized
* - LFR_DEFAULT - the transition is not authorized
*
*/
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 int status;
paul@pc-solar1.lab-lpp.local
waveform initialization modified due to a problem of compatibility...
r19
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 switch (requestedMode)
{
case LFR_MODE_STANDBY:
paul
packet emission task added...
r33 if ( lfrCurrentMode == LFR_MODE_STANDBY ) {
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 status = LFR_DEFAULT;
}
else
{
status = LFR_SUCCESSFUL;
}
break;
case LFR_MODE_NORMAL:
paul
packet emission task added...
r33 if ( lfrCurrentMode == LFR_MODE_NORMAL ) {
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 status = LFR_DEFAULT;
}
else {
status = LFR_SUCCESSFUL;
}
break;
case LFR_MODE_BURST:
paul
packet emission task added...
r33 if ( lfrCurrentMode == LFR_MODE_BURST ) {
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 status = LFR_DEFAULT;
}
else {
status = LFR_SUCCESSFUL;
}
break;
case LFR_MODE_SBM1:
paul
packet emission task added...
r33 if ( lfrCurrentMode == LFR_MODE_SBM1 ) {
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 status = LFR_DEFAULT;
}
else {
status = LFR_SUCCESSFUL;
}
break;
case LFR_MODE_SBM2:
paul
packet emission task added...
r33 if ( lfrCurrentMode == LFR_MODE_SBM2 ) {
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 status = LFR_DEFAULT;
}
else {
status = LFR_SUCCESSFUL;
}
break;
default:
status = LFR_DEFAULT;
break;
}
paul@pc-solar1.lab-lpp.local
waveform initialization modified due to a problem of compatibility...
r19
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 return status;
admin@pc-p-leroy3.LAB-LPP.LOCAL
Draft implementation of the TC_LFR_LOAD_NORMAL_PAR
r10 }
paul
enum transition_type_t removed
r245 void update_last_valid_transition_date( unsigned int transitionCoarseTime )
paul
minor updates on documentation
r240 {
paul
BP sending filtered depending on the lastValidEnterModeTime
r243 lastValidEnterModeTime = transitionCoarseTime;
paul
Snapshot resynchro rewritten, drift is measured one snapshot in two...
r253 PRINTF1("lastValidEnterModeTime = %x\n", transitionCoarseTime);
paul
minor updates on documentation
r240 }
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 int check_transition_date( unsigned int transitionCoarseTime )
{
int status;
unsigned int localCoarseTime;
unsigned int deltaCoarseTime;
status = LFR_SUCCESSFUL;
if (transitionCoarseTime == 0) // transition time = 0 means an instant transition
{
status = LFR_SUCCESSFUL;
}
else
{
localCoarseTime = time_management_regs->coarse_time & 0x7fffffff;
paul
Snapshot resynchro rewritten, drift is measured one snapshot in two...
r253 PRINTF2("localTime = %x, transitionTime = %x\n", localCoarseTime, transitionCoarseTime);
paul
rev 2.0.2.3...
r191
paul
Snapshot resynchro rewritten, drift is measured one snapshot in two...
r253 if ( transitionCoarseTime <= localCoarseTime ) // SSS-CP-EQS-322
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 {
status = LFR_DEFAULT;
paul
Snapshot resynchro rewritten, drift is measured one snapshot in two...
r253 PRINTF("ERR *** in check_transition_date *** transitionCoarseTime <= localCoarseTime\n");
paul
the TC_ENTER_MODE time parameter is taken into account...
r111 }
if (status == LFR_SUCCESSFUL)
{
deltaCoarseTime = transitionCoarseTime - localCoarseTime;
if ( deltaCoarseTime > 3 ) // SSS-CP-EQS-323
{
status = LFR_DEFAULT;
PRINTF1("ERR *** in check_transition_date *** deltaCoarseTime = %x\n", deltaCoarseTime)
}
}
}
return status;
}
paul
Modification of the launch of NORMAL, SBM1 and SBM2 modes
r238 int restart_asm_activities( unsigned char lfrRequestedMode )
{
rtems_status_code status;
status = stop_spectral_matrices();
status = restart_asm_tasks( lfrRequestedMode );
launch_spectral_matrix();
return status;
}
int stop_spectral_matrices( void )
{
/** This function stops and restarts the current mode average spectral matrices activities.
*
* @return RTEMS directive status codes:
* - RTEMS_SUCCESSFUL - task restarted successfully
* - RTEMS_INVALID_ID - task id invalid
* - RTEMS_ALREADY_SUSPENDED - task already suspended
*
*/
rtems_status_code status;
status = RTEMS_SUCCESSFUL;
// (1) mask interruptions
LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt
// (2) reset spectral matrices registers
set_sm_irq_onNewMatrix( 0 ); // stop the spectral matrices
reset_sm_status();
// (3) clear interruptions
LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt
// suspend several tasks
if (lfrCurrentMode != LFR_MODE_STANDBY) {
status = suspend_asm_tasks();
}
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status)
}
return status;
}
paul
rev 1.0.0.3
r109 int stop_current_mode( void )
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 {
paul
Header files inclusion reworked...
r40 /** This function stops the current mode by masking interrupt lines and suspending science tasks.
*
* @return RTEMS directive status codes:
* - RTEMS_SUCCESSFUL - task restarted successfully
* - RTEMS_INVALID_ID - task id invalid
* - RTEMS_ALREADY_SUSPENDED - task already suspended
*
*/
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 rtems_status_code status;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
status = RTEMS_SUCCESSFUL;
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22
paul
Sync
r99 // (1) mask interruptions
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt
paul
Modification of the launch of NORMAL, SBM1 and SBM2 modes
r238 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt
paul
Sync
r99
paul
The flight software is now compatible with the VHDL 0.1.32...
r171 // (2) reset waveform picker registers
paul
fsw-0-16...
r47 reset_wfp_burst_enable(); // reset burst and enable bits
reset_wfp_status(); // reset all the status bits
paul
rev 1.0.0.4
r110
paul
The flight software is now compatible with the VHDL 0.1.32...
r171 // (3) reset spectral matrices registers
paul
Modification of the launch of NORMAL, SBM1 and SBM2 modes
r238 set_sm_irq_onNewMatrix( 0 ); // stop the spectral matrices
paul
The flight software is now compatible with the VHDL 0.1.32...
r171 reset_sm_status();