@@ -1,6 +1,6 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Apr 29 14:02:09 2014 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
@@ -41,12 +41,28 for indexComponent in range(nbComponents | |||||
41 | ## WRITE THE DATA ## |
|
41 | ## WRITE THE DATA ## | |
42 | #################### |
|
42 | #################### | |
43 |
|
43 | |||
|
44 | # F0 buffer address | |||
44 | address_to_read = 0x80000f08 |
|
45 | address_to_read = 0x80000f08 | |
45 | val = RMAPPlugin0.Read( address_to_read, 1) |
|
46 | val = RMAPPlugin0.Read( address_to_read, 1) | |
46 | matrixF0_Address0 = val[0] |
|
47 | matrixF0_Address0 = val[0] | |
|
48 | ||||
|
49 | # F1 buffer address | |||
|
50 | address_to_read = 0x80000f10 | |||
|
51 | val = RMAPPlugin0.Read( address_to_read, 1) | |||
|
52 | matrixF1_Address = val[0] | |||
|
53 | ||||
|
54 | # F2 buffer address | |||
|
55 | address_to_read = 0x80000f14 | |||
|
56 | val = RMAPPlugin0.Read( address_to_read, 1) | |||
|
57 | matrixF2_Address = val[0] | |||
|
58 | ||||
47 | print str( len(dataInIntReorganized) ) + " data to write" |
|
59 | print str( len(dataInIntReorganized) ) + " data to write" | |
48 | RMAPPlugin0.Write( matrixF0_Address0, dataInIntReorganized ) |
|
60 | RMAPPlugin0.Write( matrixF0_Address0, dataInIntReorganized ) | |
49 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF0_Address0) |
|
61 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF0_Address0) | |
|
62 | RMAPPlugin0.Write( matrixF1_Address, dataInIntReorganized ) | |||
|
63 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF1_Address) | |||
|
64 | RMAPPlugin0.Write( matrixF2_Address, dataInIntReorganized ) | |||
|
65 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF2_Address) | |||
50 |
|
66 | |||
51 |
|
67 | |||
52 |
|
68 | |||
@@ -54,4 +70,3 print str( len(dataInIntReorganized) ) + | |||||
54 |
|
70 | |||
55 |
|
71 | |||
56 |
|
72 | |||
57 |
|
@@ -83,8 +83,8 HEADERS += \ | |||||
83 | ../header/tc_acceptance.h \ |
|
83 | ../header/tc_acceptance.h \ | |
84 | ../header/fsw_params_nb_bytes.h \ |
|
84 | ../header/fsw_params_nb_bytes.h \ | |
85 | ../src/basic_parameters/basic_parameters.h \ |
|
85 | ../src/basic_parameters/basic_parameters.h \ | |
|
86 | ../header/fsw_params_processing.h \ | |||
86 | ../header/processing/fsw_processing.h \ |
|
87 | ../header/processing/fsw_processing.h \ | |
87 | ../header/processing/fsw_params_processing.h \ |
|
|||
88 | ../header/processing/avf0_prc0.h \ |
|
88 | ../header/processing/avf0_prc0.h \ | |
89 | ../header/processing/avf1_prc1.h \ |
|
89 | ../header/processing/avf1_prc1.h \ | |
90 | ../header/processing/avf2_prc2.h |
|
90 | ../header/processing/avf2_prc2.h |
@@ -1,6 +1,6 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 3.0.1, 2014-04-2 |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-04-29T15:43:03. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -23,7 +23,7 rtems_task wtdg_task( rtems_task_argumen | |||||
23 |
|
23 | |||
24 | int spacewire_open_link( void ); |
|
24 | int spacewire_open_link( void ); | |
25 | int spacewire_start_link( int fd ); |
|
25 | int spacewire_start_link( int fd ); | |
26 | int spacewire_stop_start_link( int fd ); |
|
26 | int spacewire_stop_and_start_link( int fd ); | |
27 | int spacewire_configure_link(int fd ); |
|
27 | int spacewire_configure_link(int fd ); | |
28 | int spacewire_reset_link( void ); |
|
28 | int spacewire_reset_link( void ); | |
29 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force |
|
29 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force |
@@ -80,21 +80,21 typedef struct{ | |||||
80 | } waveform_picker_regs_new_t; |
|
80 | } waveform_picker_regs_new_t; | |
81 |
|
81 | |||
82 | typedef struct { |
|
82 | typedef struct { | |
83 | volatile int config; |
|
83 | volatile int config; // 0x00 | |
84 | volatile int status; |
|
84 | volatile int status; // 0x04 | |
85 | volatile int matrixF0_Address0; |
|
85 | volatile int matrixF0_Address0; // 0x08 | |
86 | volatile int matrixFO_Address1; |
|
86 | volatile int matrixFO_Address1; // 0x0C | |
87 | volatile int matrixF1_Address; |
|
87 | volatile int matrixF1_Address; // 0x10 | |
88 | volatile int matrixF2_Address; |
|
88 | volatile int matrixF2_Address; // 0x14 | |
89 | volatile int coarse_time_F0_0; |
|
89 | volatile int coarse_time_F0_0; // 0x18 | |
90 | volatile int coarse_time_F0_1; |
|
90 | volatile int coarse_time_F0_1; // 0x1C | |
91 | volatile int coarse_time_F1; |
|
91 | volatile int coarse_time_F1; // 0x20 | |
92 | volatile int coarse_time_F2; |
|
92 | volatile int coarse_time_F2; // 0x24 | |
93 | volatile int fine_time_FO_0; |
|
93 | volatile int fine_time_FO_0; // 0x28 | |
94 | volatile int fine_time_F0_1; |
|
94 | volatile int fine_time_F0_1; // 0x2C | |
95 | volatile int fine_time_F1; |
|
95 | volatile int fine_time_F1; // 0x30 | |
96 | volatile int fine_time_F2; |
|
96 | volatile int fine_time_F2; // 0x34 | |
97 | volatile int debug; |
|
97 | volatile int debug; // 0x38 | |
98 | } spectral_matrix_regs_t; |
|
98 | } spectral_matrix_regs_t; | |
99 |
|
99 | |||
100 | #endif // GRLIB_REGS_H_INCLUDED |
|
100 | #endif // GRLIB_REGS_H_INCLUDED |
@@ -62,7 +62,7 rtems_task spiq_task(rtems_task_argument | |||||
62 | } |
|
62 | } | |
63 | else // [2.b] in run state, start the link |
|
63 | else // [2.b] in run state, start the link | |
64 | { |
|
64 | { | |
65 | status = spacewire_stop_start_link( fdSPW ); // start the link |
|
65 | status = spacewire_stop_and_start_link( fdSPW ); // start the link | |
66 | if ( status != RTEMS_SUCCESSFUL) |
|
66 | if ( status != RTEMS_SUCCESSFUL) | |
67 | { |
|
67 | { | |
68 | PRINTF1("in SPIQ *** ERR spacewire_start_link %d\n", status) |
|
68 | PRINTF1("in SPIQ *** ERR spacewire_start_link %d\n", status) | |
@@ -281,7 +281,7 rtems_task wtdg_task( rtems_task_argumen | |||||
281 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status |
|
281 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status | |
282 | } |
|
282 | } | |
283 |
|
283 | |||
284 | status = spacewire_stop_start_link( fdSPW ); |
|
284 | status = spacewire_stop_and_start_link( fdSPW ); | |
285 |
|
285 | |||
286 | if (status != RTEMS_SUCCESSFUL) |
|
286 | if (status != RTEMS_SUCCESSFUL) | |
287 | { |
|
287 | { | |
@@ -312,7 +312,7 rtems_task wtdg_task( rtems_task_argumen | |||||
312 |
|
312 | |||
313 | //**************** |
|
313 | //**************** | |
314 | // OTHER FUNCTIONS |
|
314 | // OTHER FUNCTIONS | |
315 | int spacewire_open_link( void ) |
|
315 | int spacewire_open_link( void ) // by default, the driver resets the core: [SPW_CTRL_WRITE(pDev, SPW_CTRL_RESET);] | |
316 | { |
|
316 | { | |
317 | /** This function opens the SpaceWire link. |
|
317 | /** This function opens the SpaceWire link. | |
318 | * |
|
318 | * | |
@@ -337,18 +337,18 int spacewire_start_link( int fd ) | |||||
337 | { |
|
337 | { | |
338 | rtems_status_code status; |
|
338 | rtems_status_code status; | |
339 |
|
339 | |||
340 |
status = ioctl( fd |
|
340 | status = ioctl( fd, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started | |
341 | // -1 default hardcoded driver timeout |
|
341 | // -1 default hardcoded driver timeout | |
342 |
|
342 | |||
343 | return status; |
|
343 | return status; | |
344 | } |
|
344 | } | |
345 |
|
345 | |||
346 | int spacewire_stop_start_link( int fd ) |
|
346 | int spacewire_stop_and_start_link( int fd ) | |
347 | { |
|
347 | { | |
348 | rtems_status_code status; |
|
348 | rtems_status_code status; | |
349 |
|
349 | |||
350 |
status = ioctl( fd |
|
350 | status = ioctl( fd, SPACEWIRE_IOCTRL_STOP); // start fails if link pDev->running != 0 | |
351 |
status = ioctl( fd |
|
351 | status = ioctl( fd, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started | |
352 | // -1 default hardcoded driver timeout |
|
352 | // -1 default hardcoded driver timeout | |
353 |
|
353 | |||
354 | return status; |
|
354 | return status; | |
@@ -416,7 +416,7 int spacewire_reset_link( void ) | |||||
416 |
|
416 | |||
417 | // CLOSING THE DRIVER AT THIS POINT WILL MAKE THE SEND TASK BLOCK THE SYSTEM |
|
417 | // CLOSING THE DRIVER AT THIS POINT WILL MAKE THE SEND TASK BLOCK THE SYSTEM | |
418 |
|
418 | |||
419 | status_spw = spacewire_stop_start_link( fdSPW ); |
|
419 | status_spw = spacewire_stop_and_start_link( fdSPW ); | |
420 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
420 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
421 | { |
|
421 | { | |
422 | PRINTF1("in spacewire_reset_link *** ERR spacewire_start_link code %d\n", status_spw) |
|
422 | PRINTF1("in spacewire_reset_link *** ERR spacewire_start_link code %d\n", status_spw) |
General Comments 0
You need to be logged in to leave comments.
Login now