diff --git a/header/fsw_misc.h b/header/fsw_misc.h --- a/header/fsw_misc.h +++ b/header/fsw_misc.h @@ -70,10 +70,10 @@ extern gptimer_regs_t *gptimer_regs; extern void ASR16_get_FPRF_IURF_ErrorCounters( unsigned int*, unsigned int* ); extern void CCR_getInstructionAndDataErrorCounters( unsigned int*, unsigned int* ); -rtems_name name_hk_rate_monotonic = 0; // name of the HK rate monotonic -rtems_id HK_id = RTEMS_ID_NONE;// id of the HK rate monotonic period -rtems_name name_avgv_rate_monotonic = 0; // name of the AVGV rate monotonic -rtems_id AVGV_id = RTEMS_ID_NONE;// id of the AVGV rate monotonic period +extern rtems_name name_hk_rate_monotonic; // name of the HK rate monotonic +extern rtems_id HK_id;// id of the HK rate monotonic period +extern rtems_name name_avgv_rate_monotonic; // name of the AVGV rate monotonic +extern rtems_id AVGV_id;// id of the AVGV rate monotonic period void timer_configure( unsigned char timer, unsigned int clock_divider, unsigned char interrupt_level, rtems_isr (*timer_isr)() ); diff --git a/src/fsw_globals.c b/src/fsw_globals.c --- a/src/fsw_globals.c +++ b/src/fsw_globals.c @@ -29,8 +29,12 @@ rtems_name misc_name[NB_OF_MISC_NAMES] = {0}; rtems_name Task_name[NB_OF_TASKS] = {0}; /* array of task names */ rtems_id Task_id[NB_OF_TASKS] = {0}; /* array of task ids */ -rtems_name timecode_timer_name = {0}; -rtems_id timecode_timer_id = {0}; +rtems_name timecode_timer_name = 0; +rtems_id timecode_timer_id = RTEMS_ID_NONE; +rtems_name name_hk_rate_monotonic = 0; // name of the HK rate monotonic +rtems_id HK_id = RTEMS_ID_NONE;// id of the HK rate monotonic period +rtems_name name_avgv_rate_monotonic = 0; // name of the AVGV rate monotonic +rtems_id AVGV_id = RTEMS_ID_NONE;// id of the AVGV rate monotonic period int fdSPW = 0; int fdUART = 0; unsigned char lfrCurrentMode = 0; diff --git a/src/fsw_spacewire.c b/src/fsw_spacewire.c --- a/src/fsw_spacewire.c +++ b/src/fsw_spacewire.c @@ -19,7 +19,7 @@ rtems_id semq_id = RTEMS_ID_NONE; //***************** // waveform headers Header_TM_LFR_SCIENCE_CWF_t headerCWF = {0}; -Header_TM_LFR_SCIENCE_SWF_t headerSW = {0}; +Header_TM_LFR_SCIENCE_SWF_t headerSWF = {0}; Header_TM_LFR_SCIENCE_ASM_t headerASM = {0}; unsigned char previousTimecodeCtr = 0; diff --git a/src/tc_handler.c b/src/tc_handler.c --- a/src/tc_handler.c +++ b/src/tc_handler.c @@ -1382,6 +1382,8 @@ void setCalibrationData( void ) time_management_regs->calDataPtr = INIT_CHAR; + Ts = 1 / CAL_FS; + // build the signal for the SCM calibration for (k = 0; k < CAL_NB_PTS; k++) { @@ -1414,7 +1416,7 @@ void setCalibrationDataInterleaved( void unsigned short data[CAL_NB_PTS_INTER]; unsigned char *dataPtr; - Ts = 1. / CAL_FS_INTER; + Ts = 1 / CAL_FS_INTER; time_management_regs->calDataPtr = INIT_CHAR;