diff --git a/FSW-qt/Makefile b/FSW-qt/Makefile --- a/FSW-qt/Makefile +++ b/FSW-qt/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: bin/fsw -# Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Apr 28 15:02:06 2014 +# Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Apr 29 14:02:09 2014 # Project: fsw-qt.pro # Template: app # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro diff --git a/FSW-qt/bin/load_spectral_matrix_TCH.py b/FSW-qt/bin/load_spectral_matrix_TCH.py --- a/FSW-qt/bin/load_spectral_matrix_TCH.py +++ b/FSW-qt/bin/load_spectral_matrix_TCH.py @@ -41,12 +41,28 @@ for indexComponent in range(nbComponents ## WRITE THE DATA ## #################### +# F0 buffer address address_to_read = 0x80000f08 val = RMAPPlugin0.Read( address_to_read, 1) matrixF0_Address0 = val[0] + +# F1 buffer address +address_to_read = 0x80000f10 +val = RMAPPlugin0.Read( address_to_read, 1) +matrixF1_Address = val[0] + +# F2 buffer address +address_to_read = 0x80000f14 +val = RMAPPlugin0.Read( address_to_read, 1) +matrixF2_Address = val[0] + print str( len(dataInIntReorganized) ) + " data to write" RMAPPlugin0.Write( matrixF0_Address0, dataInIntReorganized ) print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF0_Address0) +RMAPPlugin0.Write( matrixF1_Address, dataInIntReorganized ) +print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF1_Address) +RMAPPlugin0.Write( matrixF2_Address, dataInIntReorganized ) +print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF2_Address) @@ -54,4 +70,3 @@ print str( len(dataInIntReorganized) ) + - diff --git a/FSW-qt/fsw-qt.pro b/FSW-qt/fsw-qt.pro --- a/FSW-qt/fsw-qt.pro +++ b/FSW-qt/fsw-qt.pro @@ -83,8 +83,8 @@ HEADERS += \ ../header/tc_acceptance.h \ ../header/fsw_params_nb_bytes.h \ ../src/basic_parameters/basic_parameters.h \ + ../header/fsw_params_processing.h \ ../header/processing/fsw_processing.h \ - ../header/processing/fsw_params_processing.h \ ../header/processing/avf0_prc0.h \ ../header/processing/avf1_prc1.h \ ../header/processing/avf2_prc2.h diff --git a/FSW-qt/fsw-qt.pro.user b/FSW-qt/fsw-qt.pro.user --- a/FSW-qt/fsw-qt.pro.user +++ b/FSW-qt/fsw-qt.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/header/fsw_spacewire.h b/header/fsw_spacewire.h --- a/header/fsw_spacewire.h +++ b/header/fsw_spacewire.h @@ -23,7 +23,7 @@ rtems_task wtdg_task( rtems_task_argumen int spacewire_open_link( void ); int spacewire_start_link( int fd ); -int spacewire_stop_start_link( int fd ); +int spacewire_stop_and_start_link( int fd ); int spacewire_configure_link(int fd ); int spacewire_reset_link( void ); void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force diff --git a/header/grlib_regs.h b/header/grlib_regs.h --- a/header/grlib_regs.h +++ b/header/grlib_regs.h @@ -80,21 +80,21 @@ typedef struct{ } waveform_picker_regs_new_t; typedef struct { - volatile int config; - volatile int status; - volatile int matrixF0_Address0; - volatile int matrixFO_Address1; - volatile int matrixF1_Address; - volatile int matrixF2_Address; - volatile int coarse_time_F0_0; - volatile int coarse_time_F0_1; - volatile int coarse_time_F1; - volatile int coarse_time_F2; - volatile int fine_time_FO_0; - volatile int fine_time_F0_1; - volatile int fine_time_F1; - volatile int fine_time_F2; - volatile int debug; + volatile int config; // 0x00 + volatile int status; // 0x04 + volatile int matrixF0_Address0; // 0x08 + volatile int matrixFO_Address1; // 0x0C + volatile int matrixF1_Address; // 0x10 + volatile int matrixF2_Address; // 0x14 + volatile int coarse_time_F0_0; // 0x18 + volatile int coarse_time_F0_1; // 0x1C + volatile int coarse_time_F1; // 0x20 + volatile int coarse_time_F2; // 0x24 + volatile int fine_time_FO_0; // 0x28 + volatile int fine_time_F0_1; // 0x2C + volatile int fine_time_F1; // 0x30 + volatile int fine_time_F2; // 0x34 + volatile int debug; // 0x38 } spectral_matrix_regs_t; #endif // GRLIB_REGS_H_INCLUDED diff --git a/src/fsw_spacewire.c b/src/fsw_spacewire.c --- a/src/fsw_spacewire.c +++ b/src/fsw_spacewire.c @@ -62,7 +62,7 @@ rtems_task spiq_task(rtems_task_argument } else // [2.b] in run state, start the link { - status = spacewire_stop_start_link( fdSPW ); // start the link + status = spacewire_stop_and_start_link( fdSPW ); // start the link if ( status != RTEMS_SUCCESSFUL) { PRINTF1("in SPIQ *** ERR spacewire_start_link %d\n", status) @@ -281,7 +281,7 @@ rtems_task wtdg_task( rtems_task_argumen status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status } - status = spacewire_stop_start_link( fdSPW ); + status = spacewire_stop_and_start_link( fdSPW ); if (status != RTEMS_SUCCESSFUL) { @@ -312,7 +312,7 @@ rtems_task wtdg_task( rtems_task_argumen //**************** // OTHER FUNCTIONS -int spacewire_open_link( void ) +int spacewire_open_link( void ) // by default, the driver resets the core: [SPW_CTRL_WRITE(pDev, SPW_CTRL_RESET);] { /** This function opens the SpaceWire link. * @@ -337,18 +337,18 @@ int spacewire_start_link( int fd ) { rtems_status_code status; - status = ioctl( fdSPW, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started + status = ioctl( fd, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started // -1 default hardcoded driver timeout return status; } -int spacewire_stop_start_link( int fd ) +int spacewire_stop_and_start_link( int fd ) { rtems_status_code status; - status = ioctl( fdSPW, SPACEWIRE_IOCTRL_STOP); // start fails if link pDev->running != 0 - status = ioctl( fdSPW, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started + status = ioctl( fd, SPACEWIRE_IOCTRL_STOP); // start fails if link pDev->running != 0 + status = ioctl( fd, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started // -1 default hardcoded driver timeout return status; @@ -416,7 +416,7 @@ int spacewire_reset_link( void ) // CLOSING THE DRIVER AT THIS POINT WILL MAKE THE SEND TASK BLOCK THE SYSTEM - status_spw = spacewire_stop_start_link( fdSPW ); + status_spw = spacewire_stop_and_start_link( fdSPW ); if ( status_spw != RTEMS_SUCCESSFUL ) { PRINTF1("in spacewire_reset_link *** ERR spacewire_start_link code %d\n", status_spw)