##// END OF EJS Templates
Added scrubbing Task, to increase scrubbing frequency and avoid entering...
jeandet -
r372:fc82b08705ba Next draft
parent child
Show More
@@ -1,4 +1,4
1 header/lfr_common_headers = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SOLO_LFR/lfr_common_headers
1 header/lfr_common_headers = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/USERS/JEANDET/lfr_common_headers
2 2
3 3 LFR_basic-parameters = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/USERS/CHUST/LFR_basic-parameters
4 4
@@ -1,2 +1,2
1 1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
2 e904b329ff977514bf36af92617afefd22fd06ab header/lfr_common_headers
2 db74b38fe91cd826fa49fa4eb6f93d626637ceb9 header/lfr_common_headers
@@ -136,6 +136,7 rtems_task load_task( rtems_task_argumen
136 136 rtems_task hous_task( rtems_task_argument argument );
137 137 rtems_task avgv_task( rtems_task_argument argument );
138 138 rtems_task dumb_task( rtems_task_argument unused );
139 rtems_task scrubbing_task( rtems_task_argument unused );
139 140
140 141 void init_housekeeping_parameters( void );
141 142 void increment_seq_counter(unsigned short *packetSequenceControl);
@@ -15,6 +15,7
15 15
16 16 #include <rtems.h>
17 17
18
18 19 /* configuration information */
19 20
20 21 #define CONFIGURE_INIT
@@ -26,7 +27,7
26 27 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
27 28 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
28 29
29 #define CONFIGURE_MAXIMUM_TASKS 21 // number of tasks concurrently active including INIT
30 #define CONFIGURE_MAXIMUM_TASKS 22 // number of tasks concurrently active including INIT
30 31 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
31 32 #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
32 33 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32
@@ -376,6 +377,7 void create_names( void ) // create all
376 377 Task_name[TASKID_PRC1] = rtems_build_name( 'P', 'R', 'C', '1' );
377 378 Task_name[TASKID_AVF2] = rtems_build_name( 'A', 'V', 'F', '2' );
378 379 Task_name[TASKID_PRC2] = rtems_build_name( 'P', 'R', 'C', '2' );
380 Task_name[TASKID_SCRB] = rtems_build_name( 'S', 'C', 'R', 'B' );
379 381
380 382 // rate monotonic period names
381 383 name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' );
@@ -561,6 +563,14 int create_all_tasks( void ) // create a
561 563 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB]
562 564 );
563 565 }
566 if (status == RTEMS_SUCCESSFUL) // SCRUBBING TASK
567 {
568 status = rtems_task_create(
569 Task_name[TASKID_SCRB], TASK_PRIORITY_SCRB, RTEMS_MINIMUM_STACK_SIZE,
570 RTEMS_DEFAULT_MODES,
571 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SCRB]
572 );
573 }
564 574 if (status == RTEMS_SUCCESSFUL) // HOUS
565 575 {
566 576 status = rtems_task_create(
@@ -746,6 +756,13 int start_all_tasks( void ) // start all
746 756 BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n")
747 757 }
748 758 }
759 if (status == RTEMS_SUCCESSFUL) // SCRUBBING
760 {
761 status = rtems_task_start( Task_id[TASKID_SCRB], scrubbing_task, 1 );
762 if (status!=RTEMS_SUCCESSFUL) {
763 BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n")
764 }
765 }
749 766 if (status == RTEMS_SUCCESSFUL) // LOAD
750 767 {
751 768 status = rtems_task_start( Task_id[TASKID_LOAD], load_task, 1 );
@@ -521,6 +521,26 rtems_task dumb_task( rtems_task_argumen
521 521 }
522 522 }
523 523
524 rtems_task scrubbing_task( rtems_task_argument unused )
525 {
526 /** This RTEMS taks is to avoid entering IDLE task and also scrub memory to increase scubbing frequency.
527 *
528 * @param unused is the starting argument of the RTEMS task
529 *
530 * The scrubbing reads continuously memory when no other tasks are ready.
531 *
532 */
533
534 BOOT_PRINTF("in SCRUBBING *** \n");
535 volatile int i=0;
536 volatile uint32_t* RAM=(uint32_t*)0x40000000;
537 volatile uint32_t value;
538 while(1){
539 i=(i+1)%(1024*1024);
540 value += RAM[i];
541 }
542 }
543
524 544 //*****************************
525 545 // init housekeeping parameters
526 546
General Comments 0
You need to be logged in to leave comments. Login now