@@ -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.6) on: Tue May 6 |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.6) on: Tue May 6 15:49:26 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 |
@@ -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-05- |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-05-12T06:56:36. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -439,23 +439,15 void send_dumb_hk( void ) | |||||
439 |
|
439 | |||
440 | void get_v_e1_e2_f3( unsigned char *v, unsigned char *e1, unsigned char *e2, bool init_buffer_addr ) |
|
440 | void get_v_e1_e2_f3( unsigned char *v, unsigned char *e1, unsigned char *e2, bool init_buffer_addr ) | |
441 | { |
|
441 | { | |
442 | static int *current_addr_data_f3 = NULL; |
|
442 | unsigned int coarseTime; | |
443 | int *new_addr_data_f3; |
|
443 | unsigned int acquisitionTime; | |
444 |
unsigned |
|
444 | unsigned int deltaT = 0; | |
445 |
|
445 | unsigned char *bufferPtr; | ||
446 | static unsigned int counter = 0; |
|
|||
447 | unsigned int offset_in_samples; |
|
|||
448 | unsigned int offset_in_words; |
|
|||
449 | unsigned char delta = 16; // v, e1 and e2 will be picked up each second, f3 = 16 Hz |
|
|||
450 |
|
446 | |||
451 | new_addr_data_f3 = (int *) waveform_picker_regs->addr_data_f3; |
|
447 | unsigned int offset_in_samples; | |
|
448 | unsigned int offset_in_bytes; | |||
|
449 | unsigned char f3 = 16; // v, e1 and e2 will be picked up each second, f3 = 16 Hz | |||
452 |
|
450 | |||
453 | if (init_buffer_addr == true) // when the waveform_picker is launched |
|
|||
454 | { |
|
|||
455 | current_addr_data_f3 = NULL; |
|
|||
456 | } |
|
|||
457 | else |
|
|||
458 | { |
|
|||
459 |
|
|
451 | if (lfrCurrentMode == LFR_MODE_STANDBY) | |
460 |
|
|
452 | { | |
461 |
|
|
453 | v[0] = 0x00; | |
@@ -467,31 +459,41 void get_v_e1_e2_f3( unsigned char *v, u | |||||
467 |
|
|
459 | } | |
468 |
|
|
460 | else | |
469 |
|
|
461 | { | |
470 | if ( new_addr_data_f3 != current_addr_data_f3 ) |
|
462 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; | |
|
463 | bufferPtr = (unsigned char*) waveform_picker_regs->addr_data_f3; | |||
|
464 | acquisitionTime = (unsigned int) ( ( bufferPtr[2] & 0x7f ) << 24 ) | |||
|
465 | + (unsigned int) ( bufferPtr[3] << 16 ) | |||
|
466 | + (unsigned int) ( bufferPtr[0] << 8 ) | |||
|
467 | + (unsigned int) ( bufferPtr[1] ); | |||
|
468 | if ( coarseTime > acquisitionTime ) | |||
471 |
|
|
469 | { | |
472 | counter = 0; |
|
470 | deltaT = coarseTime - acquisitionTime; | |
|
471 | offset_in_samples = (deltaT-1) * f3 ; | |||
|
472 | } | |||
|
473 | else if( coarseTime == acquisitionTime ) | |||
|
474 | { | |||
473 |
|
|
475 | offset_in_samples = 0; | |
474 | current_addr_data_f3 = new_addr_data_f3; |
|
|||
475 |
|
|
476 | } | |
476 |
|
|
477 | else | |
477 |
|
|
478 | { | |
478 | counter = counter + 1; |
|
479 | offset_in_samples = 0; | |
479 | offset_in_samples = counter * delta; |
|
480 | PRINTF2("ERR *** in get_v_e1_e2_f3 *** coarseTime = %x, acquisitionTime = %x\n", coarseTime, acquisitionTime) | |
480 | if ( offset_in_samples > NB_SAMPLES_PER_SNAPSHOT ) |
|
481 | } | |
|
482 | ||||
|
483 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) | |||
481 |
|
|
484 | { | |
|
485 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out the buffer, counter = %d\n", offset_in_samples) | |||
482 |
|
|
486 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; | |
483 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out the buffer, counter = %d\n", counter) |
|
|||
484 | } |
|
|||
485 |
|
|
487 | } | |
486 | offset_in_words = TIME_OFFSET + offset_in_samples * NB_WORDS_SWF_BLK; |
|
488 | PRINTF1("f3 data @ %x *** ", waveform_picker_regs->addr_data_f3 ) | |
487 | ptr = (unsigned char*) ¤t_addr_data_f3[ offset_in_words ]; |
|
489 | PRINTF2("deltaT = %d, offset_in_samples = %d\n", deltaT, offset_in_samples ) | |
488 | v[0] = ptr[0]; |
|
490 | offset_in_bytes = TIME_OFFSET_IN_BYTES + offset_in_samples * NB_WORDS_SWF_BLK * 4; | |
489 | v[1] = ptr[1]; |
|
491 | v[0] = bufferPtr[ offset_in_bytes + 0]; | |
490 | e1[0] = ptr[2]; |
|
492 | v[1] = bufferPtr[ offset_in_bytes + 1]; | |
491 | e1[1] = ptr[3]; |
|
493 | e1[0] = bufferPtr[ offset_in_bytes + 2]; | |
492 | e2[0] = ptr[4]; |
|
494 | e1[1] = bufferPtr[ offset_in_bytes + 3]; | |
493 | e2[1] = ptr[5]; |
|
495 | e2[0] = bufferPtr[ offset_in_bytes + 4]; | |
494 | } |
|
496 | e2[1] = bufferPtr[ offset_in_bytes + 5]; | |
495 | } |
|
497 | } | |
496 | } |
|
498 | } | |
497 |
|
499 |
@@ -751,7 +751,6 void launch_waveform_picker( unsigned ch | |||||
751 | reset_current_ring_nodes(); |
|
751 | reset_current_ring_nodes(); | |
752 | reset_waveform_picker_regs(); |
|
752 | reset_waveform_picker_regs(); | |
753 | set_wfp_burst_enable_register( mode ); |
|
753 | set_wfp_burst_enable_register( mode ); | |
754 | get_v_e1_e2_f3( NULL, NULL, NULL, true ); |
|
|||
755 |
|
754 | |||
756 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
755 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
757 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
756 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
@@ -81,6 +81,7 rtems_isr waveforms_isr( rtems_vector_nu | |||||
81 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
81 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
82 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
82 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
83 | } |
|
83 | } | |
|
84 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2); | |||
84 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] |
|
85 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] | |
85 | } |
|
86 | } | |
86 | } |
|
87 | } | |
@@ -1214,7 +1215,7 void set_wfp_burst_enable_register( unsi | |||||
1214 | case(LFR_MODE_BURST): |
|
1215 | case(LFR_MODE_BURST): | |
1215 | waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled |
|
1216 | waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
1216 | // waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x04; // [0100] enable f2 |
|
1217 | // waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x04; // [0100] enable f2 | |
1217 |
waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x0 |
|
1218 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x0c; // [1100] enable f3 AND f2 | |
1218 | break; |
|
1219 | break; | |
1219 | case(LFR_MODE_SBM1): |
|
1220 | case(LFR_MODE_SBM1): | |
1220 | waveform_picker_regs->run_burst_enable = 0x20; // [0010 0000] f1 burst enabled |
|
1221 | waveform_picker_regs->run_burst_enable = 0x20; // [0010 0000] f1 burst enabled |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now