void main_full( void ) { /* This demo sets the clock to its maximum. The blinky demo uses as slower clock as it uses low power features. */ prvConfigureClocks(); /* Init the serial port for use by the CLI. The baud rate parameter is not used so set to 0 to make this obvious. */ xSerialPortInitMinimal( 0, mainRX_QUEUE_LENGTH ); /* Start all the other standard demo/test tasks. They have no particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartInterruptQueueTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartEventGroupTasks(); vStartTaskNotifyTask(); vStartInterruptSemaphoreTasks(); /* Note - the set of standard demo tasks contains two versions of vStartMathTasks.c. One is defined in flop.c, and uses double precision floating point numbers and variables. The other is defined in sp_flop.c, and uses single precision floating point numbers and variables. sp_flop. c should be included in this project. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Start the tasks that implements the command console on the UART, as described above. */ vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY ); /* Register the standard CLI commands. */ vRegisterSampleCLICommands(); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was either insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created, or vTaskStartScheduler() was called from User mode. See the memory management section on the FreeRTOS web site for more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The mode from which main() is called is set in the C start up code and must be a privileged mode (not user mode). */ for( ;; ); }
void main_blinky( void ) { /* See http://www.FreeRTOS.org/TI_MSP432_Free_RTOS_Demo.html for instructions and notes regarding the difference in power saving that can be achieved between using the generic tickless RTOS implementation (as used by the blinky demo) and a tickless RTOS implementation that is tailored specifically to the MSP432. */ /* The full demo configures the clocks for maximum frequency, wheras this blinky demo uses a slower clock as it also uses low power features. */ prvConfigureClocks(); CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_12); /* Create the queue. */ xQueue = xQueueCreateStatic( mainQUEUE_LENGTH, sizeof(TransportMessages), xRxQueueBuf, &xRxQueueDef); if( xQueue != NULL ) { /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreateStatic( prvQueueReceiveTask, /* The function that implements the task. */ "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL, /* The task handle is not required, so NULL is passed. */ xRxStack, &xRxTaskBuffer); xTaskCreateStatic( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL, xTxStack, &xTxTaskBuffer); /* Start the tasks and timer running. */ vTaskStartScheduler(); } /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ for( ;; ); }