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

File last commit:

r53:572a09e609bc nov2013
r67:1e5c5864272a default
Show More
tc_handler.c
772 lines | 24.3 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@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
Last commit before release 0-13...
r35 rtems_id queue_rcv_id;
rtems_id queue_snd_id;
paul
Minor bug corrected in the tc_acceptance function...
r42 status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_rcv_id );
paul
Last commit before release 0-13...
r35 if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in ACTN *** ERR getting queue_rcv_id %d\n", status)
}
paul
Minor bug corrected in the tc_acceptance function...
r42 status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_snd_id );
paul
Last commit before release 0-13...
r35 if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in ACTN *** ERR getting queue_snd_id %d\n", status)
}
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@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 while(1)
{
paul
Last commit before release 0-13...
r35 status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size,
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 RTEMS_WAIT, RTEMS_NO_TIMEOUT);
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 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)
{
case TC_SUBTYPE_RESET:
paul
Last commit before release 0-13...
r35 result = action_reset( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
case TC_SUBTYPE_LOAD_COMM:
paul
packet emission task added...
r33 result = action_load_common_par( &TC );
paul
Last commit before release 0-13...
r35 close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 break;
//
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_LOAD_NORM:
paul
Last commit before release 0-13...
r35 result = action_load_normal_par( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_LOAD_BURST:
paul
Last commit before release 0-13...
r35 result = action_load_burst_par( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_LOAD_SBM1:
paul
Last commit before release 0-13...
r35 result = action_load_sbm1_par( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_LOAD_SBM2:
paul
Last commit before release 0-13...
r35 result = action_load_sbm2_par( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_DUMP:
paul
Header files inclusion reworked...
r40 result = action_dump_par( queue_snd_id );
paul
Last commit before release 0-13...
r35 close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_ENTER:
paul
Last commit before release 0-13...
r35 result = action_enter_mode( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_UPDT_INFO:
paul
Last commit before release 0-13...
r35 result = action_update_info( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_EN_CAL:
paul
Last commit before release 0-13...
r35 result = action_enable_calibration( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_DIS_CAL:
paul
Last commit before release 0-13...
r35 result = action_disable_calibration( &TC, queue_snd_id );
close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 case TC_SUBTYPE_UPDT_TIME:
paul
packet emission task added...
r33 result = action_update_time( &TC );
paul
Last commit before release 0-13...
r35 close_action( &TC, result, queue_snd_id );
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 break;
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11 //
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 default:
break;
}
}
}
}
//***********
// TC ACTIONS
paul@pc-solar1.lab-lpp.local
FSW modified to have correct answers to TC_LFR_DUMP_PAR
r15
paul
Last commit before release 0-13...
r35 int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
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
Last commit before release 0-13...
r35 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
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
Last commit before release 0-13...
r35 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;
requestedMode = TC->dataAndCRC[1];
paul
TM_LFR_TC_EXE packet sending reworked...
r37 if ( (requestedMode != LFR_MODE_STANDBY)
&& (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST)
&& (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) )
paul
packet emission task added...
r33 {
paul
TM_LFR_TC_EXE packet sending reworked...
r37 status = RTEMS_UNSATISFIED;
send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode );
paul
packet emission task added...
r33 }
else
{
paul
TM_LFR_TC_EXE packet sending reworked...
r37 printf("try to enter mode %d\n", requestedMode);
#ifdef PRINT_TASK_STATISTICS
if (requestedMode != LFR_MODE_STANDBY)
{
rtems_cpu_usage_reset();
maxCount = 0;
}
#endif
status = transition_validation(requestedMode);
if ( status == LFR_SUCCESSFUL ) {
if ( lfrCurrentMode != LFR_MODE_STANDBY)
{
status = stop_current_mode();
}
if (status != RTEMS_SUCCESSFUL)
{
PRINTF("ERR *** in action_enter *** stop_current_mode\n")
}
status = enter_mode(requestedMode, TC);
}
else
{
PRINTF("ERR *** in action_enter *** transition rejected\n")
send_tm_lfr_tc_exe_not_executable( TC, queue_id );
}
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;
result = LFR_DEFAULT;
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
paul
Ignore doc files...
r46 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@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
return result;
}
paul
Last commit before release 0-13...
r35 int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
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;
unsigned char lfrMode;
result = LFR_DEFAULT;
lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
paul
fsw-0-20...
r51 if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) {
paul
Last commit before release 0-13...
r35 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 result = LFR_DEFAULT;
}
else {
paul
Last commit before release 0-13...
r35 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 result = LFR_DEFAULT;
}
return result;
}
paul
Last commit before release 0-13...
r35 int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
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;
unsigned char lfrMode;
result = LFR_DEFAULT;
lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
paul
fsw-0-20...
r51 if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) {
paul
Last commit before release 0-13...
r35 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 result = LFR_DEFAULT;
}
else {
paul
Last commit before release 0-13...
r35 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 result = LFR_DEFAULT;
}
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)
+ (TC->dataAndCRC[1] << 16)
+ (TC->dataAndCRC[2] << 8)
+ TC->dataAndCRC[3];
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);
paul
packet emission task added...
r33 time_management_regs->ctrl = time_management_regs->ctrl | 1;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
return LFR_SUCCESSFUL;
}
//*******************
// ENTERING THE MODES
int transition_validation(unsigned char requestedMode)
{
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@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 int stop_current_mode()
{
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
SID corrected in TM_LFR_TC_EXE packets...
r31 #ifdef GSA
LEON_Mask_interrupt( IRQ_WF ); // mask waveform interrupt (coming from the timer VHDL IP)
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 LEON_Clear_interrupt( IRQ_WF ); // clear waveform interrupt (coming from the timer VHDL IP)
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR );
#else
paul
fsw-0-16...
r47 // mask interruptions
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt
paul
packet emission task added...
r33 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt
paul
fsw-0-16...
r47 // reset registers
paul
last version before VHDL design upgrade...
r53 reset_wfp_run_burst_enable(); // reset run, burst and enable bits, [r b2 b1 b0 e3 e2 e1 e0]
paul
fsw-0-16...
r47 reset_wfp_status(); // reset all the status bits
// creal interruptions
LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt
LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectarl matrix interrupt
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 #endif
paul
packet emission task added...
r33 //**********************
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 // suspend several tasks
paul
Last commit before release 0-13...
r35 if (lfrCurrentMode != LFR_MODE_STANDBY) {
paul
Header files inclusion reworked...
r40 status = suspend_science_tasks();
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 }
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 if (status != RTEMS_SUCCESSFUL)
{
paul
Header files inclusion reworked...
r40 PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status)
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 }
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 return status;
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 }
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC )
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 {
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
Slight changes on the flight software
r20
paul
packet emission task added...
r33 status = RTEMS_UNSATISFIED;
housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d);
paul
fsw-0-20...
r51 updateLFRCurrentMode();
paul
packet emission task added...
r33
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 switch(mode){
case LFR_MODE_STANDBY:
paul
fsw-0-20...
r51 status = enter_standby_mode( );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 break;
case LFR_MODE_NORMAL:
paul
fsw-0-20...
r51 status = enter_normal_mode( );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 break;
case LFR_MODE_BURST:
paul
fsw-0-20...
r51 status = enter_burst_mode( );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 break;
case LFR_MODE_SBM1:
paul
fsw-0-20...
r51 status = enter_sbm1_mode( );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 break;
case LFR_MODE_SBM2:
paul
fsw-0-20...
r51 status = enter_sbm2_mode( );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 break;
default:
status = RTEMS_UNSATISFIED;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 }
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20
paul
packet emission task added...
r33 if (status != RTEMS_SUCCESSFUL)
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 {
paul
packet emission task added...
r33 PRINTF("in enter_mode *** ERR\n")
status = RTEMS_UNSATISFIED;
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
return status;
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 }
paul
packet emission task added...
r33 int enter_standby_mode()
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 {
paul
Commit before working on the ERR 4 due to message queue...
r34 PRINTF1("maxCount = %d\n", maxCount)
paul
packet emission task added...
r33 #ifdef PRINT_TASK_STATISTICS
rtems_cpu_usage_report();
#endif
paul
Commit before working on the ERR 4 due to message queue...
r34
#ifdef PRINT_STACK_REPORT
rtems_stack_checker_report_usage();
#endif
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 return LFR_SUCCESSFUL;
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 }
paul
packet emission task added...
r33 int enter_normal_mode()
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 {
rtems_status_code status;
paul
last version before VHDL design upgrade...
r53 int startDate;
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22
paul
sy_lfr_n_swf_p implemented...
r32 status = restart_science_tasks();
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22
#ifdef GSA
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR );
timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR );
paul
SOLVED: compatibility of fsw-gsa with the WF simulator interruption
r30 LEON_Clear_interrupt( IRQ_WF );
LEON_Unmask_interrupt( IRQ_WF );
paul
sy_lfr_n_swf_p implemented...
r32 //
set_local_nb_interrupt_f0_MAX();
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board
LEON_Unmask_interrupt( IRQ_SM );
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 #else
paul
packet emission task added...
r33 //****************
paul
sy_lfr_n_swf_p implemented...
r32 // waveform picker
paul
last version before VHDL design upgrade...
r53 reset_new_waveform_picker_regs();
paul
fsw-0-16...
r47 set_wfp_burst_enable_register(LFR_MODE_NORMAL);
paul
SOLVED: compatibility of fsw-gsa with the WF simulator interruption
r30 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
paul
last version before VHDL design upgrade...
r53 startDate = time_management_regs->coarse_time + 2;
new_waveform_picker_regs->start_date = startDate;
new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000]
paul
packet emission task added...
r33 //****************
paul
sy_lfr_n_swf_p implemented...
r32 // spectral matrix
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 #endif
return status;
}
paul
packet emission task added...
r33 int enter_burst_mode()
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 {
rtems_status_code status;
paul
sy_lfr_n_swf_p implemented...
r32 status = restart_science_tasks();
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
#ifdef GSA
paul
packet emission task added...
r33 LEON_Unmask_interrupt( IRQ_SM );
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 #else
paul
last version before VHDL design upgrade...
r53 reset_new_waveform_picker_regs();
paul
fsw-0-16...
r47 set_wfp_burst_enable_register(LFR_MODE_BURST);
paul
packet emission task added...
r33 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
paul@pc-solar1.lab-lpp.local
Slight changes on the flight software
r20 #endif
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22
return status;
}
paul
packet emission task added...
r33 int enter_sbm1_mode()
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22 {
rtems_status_code status;
paul
sy_lfr_n_swf_p implemented...
r32 status = restart_science_tasks();
paul@pc-solar1.lab-lpp.local
All modes partially implemented...
r22