RealTimeOS

所属分类:单片机开发
开发工具:C/C++
文件大小:222KB
下载次数:6
上传日期:2013-12-19 19:53:28
上 传 者etigo242
说明:  Platform: NXP LPC1114/301 microcontroller FREERTOS ( free real time operating system) example.

文件列表:
freertos\.cproject (53600, 2011-02-07)
freertos\.project (2596, 2011-01-26)
freertos\cmsis\core_cm0.c (10869, 2011-01-26)
freertos\cmsis\core_cm0.h (41854, 2011-01-26)
freertos\cmsis\docs\CMSIS changes.htm (12531, 2011-01-26)
freertos\cmsis\docs\CMSIS debug support.htm (9310, 2011-01-26)
freertos\cmsis\docs\CMSIS_Core.htm (57004, 2011-01-26)
freertos\cmsis\docs\License.doc (39936, 2011-01-26)
freertos\cmsis\LPC11xx.h (32550, 2011-01-27)
freertos\cmsis\system_LPC11xx.c (13856, 2011-01-26)
freertos\config\driver_config.h (380, 2011-01-26)
freertos\config\FreeRTOSConfig.h (1999, 2011-01-26)
freertos\config\freertos_cr_startup_lpc11.c (11967, 2011-01-26)
freertos\config\system_LPC11xx.h (6939, 2011-01-26)
freertos\config\target_config.h (630, 2011-01-26)
freertos\Debug\cmsis\subdir.mk (2309, 2011-02-07)
freertos\Debug\config\subdir.mk (1375, 2011-02-07)
freertos\Debug\driver\subdir.mk (1513, 2011-02-07)
freertos\Debug\freertos\port\lpcxpresso\m0\subdir.mk (1417, 2011-02-07)
freertos\Debug\freertos\port\memmang\subdir.mk (1393, 2011-02-07)
freertos\Debug\freertos\src\subdir.mk (1579, 2011-02-07)
freertos\Debug\freertos.bin (8928, 2011-02-07)
freertos\Debug\freertos.map (76818, 2011-02-07)
freertos\Debug\makefile (1717, 2011-02-07)
freertos\Debug\objects.mk (259, 2011-02-07)
freertos\Debug\sources.mk (514, 2011-02-07)
freertos\Debug\src\subdir.mk (1324, 2011-02-07)
freertos\driver\adc.c (7380, 2011-01-26)
freertos\driver\adc.h (2461, 2011-01-26)
freertos\driver\can.c (12263, 2011-01-26)
freertos\driver\can.h (7242, 2011-01-26)
freertos\driver\clkconfig.c (3133, 2011-01-26)
freertos\driver\clkconfig.h (1830, 2011-01-26)
freertos\driver\crp.c (1681, 2011-01-26)
freertos\driver\crp.h (3065, 2011-01-26)
freertos\driver\debug_printf.c (3981, 2011-01-26)
freertos\driver\debug_printf.h (2941, 2011-01-26)
freertos\driver\gpio.c (11775, 2011-01-26)
freertos\driver\gpio.h (2260, 2011-01-26)
... ...

NXP LPCXpresso LPC1114 FreeRTOS Example V1.0 7/6/2010 *********************************************************************** * Software that is described herein is for illustrative purposes only * which provides customers with programming information regarding the * products. This software is supplied "AS IS" without any warranties. * NXP Semiconductors assumes no responsibility or liability for the * use of the software, conveys no license or title under any patent, * copyright, or mask work right to the product. NXP Semiconductors * reserves the right to make changes in the software without * notification. NXP Semiconductors also make no representation or * warranty that such application will be suitable for the specified * use without further testing or modification. **********************************************************************/ This example project builds in LPCXpresso and demonstrates using FreeRTOS to create 4 threads which interact with peripherals on the LPCXpresso board as well as the Embedded Artists baseboard. This project is configured to use preemptive multitasking. Threads can be created that monopolize the processing time of the MCU, yet other threads will continue to run (processing resources will be shared) and timer events will be handled. The four threads are created in main.c. They are: 2 LED blinking threads. They both toggle port P0.7 at different intervals. As they do not run in sync, the LED flash duration varies. 1 thread prints "Heartbeat" using debugger semihosting every 3 seconds. The last thread counts from 0 through 9 on the LED display on the EA baseboard. The code for the sample threads is in the src folder. To configure FreeRTOS parameters, see the FreeRTOSConfig.h file in the inc folder. Some items that may need to be changes for a typical application include the thread stack sizes. There is a #define in FreeRTOSConfig.h defining a reasonable minimum stack size, but the stack size can be specified for each thread in main.c. Stack checking is enabled. In the event of a stack overflow, an error message will print out in the LPCXpresso debugger listing the task name, via semihosting. configTOTAL_HEAP_SIZE may also need to be adjusted. All thread stack is dynamically allocated at runtime from a block of memory configTOTAL_HEAP_SIZE bytes long. The task context switch rate (SysTick interrupt interval) is set at 1000 switches per second. This is higher than needed for some applications and will waste CPU resources (power) but will achieve smoother multitasking. A typical value is 100. This project is configured to enter sleep mode and save power when it is idle. This happens whenever none of the tasks are running. Another idle activity could be substituted by modifying the vApplicationIdleHook function in main.c.

近期下载者

相关文件


收藏者