女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>嵌入式開發>FreeRTOSConfig.h 配置頭文件詳細注解

FreeRTOSConfig.h 配置頭文件詳細注解

2017-11-30 | rar | 2.2 MB | 次下載 | 1積分

資料介紹

  FreeRTOSConfig.h 配置頭文件詳細注解

  /*

  FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.

  All rights reserved

  VISIT [url]http://www.FreeRTOS.org[/url] TO ENSURE YOU ARE USING THE LATEST VERSION.

  This file is part of the FreeRTOS distribution.

  FreeRTOS is free software; you can redistribute it and/or modify it under

  the terms of the GNU General Public License (version 2) as published by the

  Free Software Foundation 》》》》 AND MODIFIED BY 《《《《 the FreeRTOS exception.

  ***************************************************************************

  》》! NOTE: The modification to the GPL is included to allow you to !《《

  》》! distribute a combined work that includes FreeRTOS without being !《《

  》》! obliged to provide the source code for proprietary components !《《

  》》! outside of the FreeRTOS kernel. !《《

  ***************************************************************************

  FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

  FOR A PARTICULAR PURPOSE. Full license text is available on the following

  link: [url]http://www.freertos.org/a00114.html[/url]

  ***************************************************************************

  * *

  * FreeRTOS provides completely free yet professionally developed, *

  * robust, strictly quality controlled, supported, and cross *

  * platform software that is more than just the market leader, it *

  * is the industry‘s de facto standard. *

  * *

  * Help yourself get started quickly while simultaneously helping *

  * to support the FreeRTOS project by purchasing a FreeRTOS *

  * tutorial book, reference manual, or both: *

  * [url]http://www.FreeRTOS.org/Documentation[/url] *

  * *

  ***************************************************************************

  [url]http://www.FreeRTOS.org/FAQHelp.html[/url] - Having a problem? Start by reading

  the FAQ page “My application does not run, what could be wrong?”。 Have you

  defined configASSERT()?

  [url]http://www.FreeRTOS.org/support[/url] - In return for receiving this top quality

  embedded software for free we request you assist our global community by

  participating in the support forum.

  [url]http://www.FreeRTOS.org/training[/url] - Investing in training allows your team to

  be as productive as possible as early as possible. Now you can receive

  FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

  Ltd, and the world’s leading authority on the world‘s leading RTOS.

  [url]http://www.FreeRTOS.org/plus[/url] - A selection of FreeRTOS ecosystem products,

  including FreeRTOS+Trace - an indispensable productivity tool, a DOS

  compatible FAT file system, and our tiny thread aware UDP/IP stack.

  [url]http://www.FreeRTOS.org/labs[/url] - Where new FreeRTOS products go to incubate.

  Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

  [url]http://www.OpenRTOS.com[/url] - Real Time Engineers ltd. license FreeRTOS to High

  Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS

  licenses offer ticketed support, indemnification and commercial middleware.

  [url]http://www.SafeRTOS.com[/url] - High Integrity Systems also provide a safety

  engineered and independently SIL3 certified version for use in safety and

  mission critical applications that require provable dependability.

  1 tab == 4 spaces!

  */

  /*

  *=================================== 中文注解 =======================================

  *

  * 作者:野火 Fire

  * 論壇:[url]www.firebbs.cn[/url]

  * 淘寶:[url]www.fire-stm32.taobao.com[/url]

  *

  * FreeRTOSConfig.h這個頭文件用來配置FreeRTOS的功能,但是并不全面,剩下的其他功能可以

  * 在FreeRTOS.h這個頭文件配置,比如使能互斥信號量,使能遞歸信號量,使能事件標志組這些

  * 內核對象的功能時,是在FreeRTOS.h這個頭文件里面配置的。即要想完全使用FreeRTOS的功能

  * 需要這兩個頭文件一起聯合使用。

  *====================================================================================

  */

  #ifndef FREERTOS_CONFIG_H

  #define FREERTOS_CONFIG_H

  /*-----------------------------------------------------------

  * Application specific definitions.

  *

  * These definitions should be adjusted for your particular hardware and

  * application requirements.

  *

  * THESE PARAMETERS ARE DESCRIBED WITHIN THE ’CONFIGURATION‘ SECTION OF THE

  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.

  *

  * See [url]http://www.freertos.org/a00110.html.[/url]

  *----------------------------------------------------------*/

  #define configUSE_PREEMPTION 1 /* 使能搶占式調度,否則用合作式調度,默認我們都是用搶占式 */

  #define configUSE_IDLE_HOOK 0 /* 空閑任務鉤子函數 */

  #define configUSE_TICK_HOOK 0 /* 時基任務鉤子函數 */

  #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) /* 系統時鐘,單位為HZ */

  #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) /* SysTick中斷周期,單位為HZ,1000HZ即1ms中斷一次 */

  #define configMAX_PRIORITIES ( 5 ) /* 任務能使用最大優先級個數,數字越大優先級越高,范圍為:0~configMAX_PRIORITIES-1

  最低的0由系統分配給空閑任務,每個任務的優先級可以相同 */

  #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )

  #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) ) /* 堆空間大小,內核在創建各種對象時需要用到,單位為字,即4個字節 */

  #define configMAX_TASK_NAME_LEN ( 16 ) /* 任務名稱的長度,即字符串的長度 */

  #define configUSE_TRACE_FACILITY 0

  #define configUSE_16_BIT_TICKS 0 /* SysTick Counter的寬度,0表示32bit,1表示16bit,STM32用的是32bit */

  #define configIDLE_SHOULD_YIELD 1 /* 上下文切換強制使能,即當前任務執行完畢之后還有剩余的時間片,可以強制自己放棄

  剩余的時間片,然后執行上下文切換去執行其他的任務*/

  /* Co-routine definitions. */

  #define configUSE_CO_ROUTINES 0 /* 合作式調度配置 */

  #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )

  /* Set the following definitions to 1 to include the API function, or zero

  to exclude the API function. */

  #define INCLUDE_vTaskPrioritySet 1

  #define INCLUDE_uxTaskPriorityGet 1

  #define INCLUDE_vTaskDelete 1

  #define INCLUDE_vTaskCleanUpResources 0

  #define INCLUDE_vTaskSuspend 1

  #define INCLUDE_vTaskDelayUntil 1

  #define INCLUDE_vTaskDelay 1

  /*=========================================== SysTick 和 PendSV 的中斷優先級配置 ======================================*/

  /* This is the raw value as per the Cortex-M3 NVIC. Values can be 255

  (lowest) to 0 (1?) (highest)。 */

  /*

  * 當把配置好的優先級寫到寄存器的時候是按照這個公式來寫的:((priority 《《 (8 - __NVIC_PRIO_BITS)) & 0xff) = 255 =》 priority = 15

  * 因為在Cortex-M 系列中是用8位來表示優先級,操作的時候以8bit來寫的,但是ST的處理器只用了其中的高四位,即__NVIC_PRIO_BITS=4。

  *

  * configKERNEL_INTERRUPT_PRIORITY 宏用來配置 SysTick 和 PendSV 的中斷優先級,這里配置為 15,即無論中斷優先級如何分鐘,都是最低。

  *

  * 當 SysTick 和 PendSV 的中斷優先級 配置為最低的時候,可以提供系統的實時性,即外部中斷可以隨時響應。

  */

  #define configKERNEL_INTERRUPT_PRIORITY 255

  /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!

  See [url]http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html.[/url] */

  /*===========================================可屏蔽的中斷優先級配置====================================================*/

  /*

  * 用于配置STM32的特殊寄存器basepri寄存器的值,用于屏蔽中斷,當大于basepri值的

  * 優先級的中斷將被全部屏蔽。basepri只有4bit有效,默認只為0,即全部中斷都沒有被屏蔽。

  * 這里191對應的二進制為(1011 1111)b只有高四位有效,即(1011)b=11,意思就是中斷優先級大于11的中斷都被屏蔽

  *

  * 在FreeRTOS中,關中斷是通過配置basepri寄存器來實現的,關掉的中斷由配置的basepri的值決定,小于basepri值的

  * 中斷FreeRTOS是關不掉的,這樣做的好處是可以系統設計者可以人為的控制哪些非常重要的中斷不能被關閉,在緊要的關頭必須被響應。

  * 而在UCOS中,關中斷是通過控制PRIMASK來實現的,PRIMASK是一個單1的二進制位,寫1則除能除了NMI和硬 fault的所有中斷。當os關閉

  * 中斷之后,即使是你在系統中設計的非常緊急的中斷來了都不能馬上響應,這加大了中斷延遲的時間,如果是性命攸關的場合,那后果估計挺嚴重。

  *

  * 當把配置好的優先級寫到寄存器的時候是按照這個公式來寫的:((priority 《《 (8 - __NVIC_PRIO_BITS)) & 0xff) = 191 =》 priority = 11

  */

  #define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xb0, or priority 11. */

  /* This is the value being used as per the ST library which permits 16

  priority values, 0 to 15. This must correspond to the

  configKERNEL_INTERRUPT_PRIORITY setting. Here 15 corresponds to the lowest

  NVIC value of 255. */

  /*

  * configLIBRARY_KERNEL_INTERRUPT_PRIORITY 宏就是 這個公式:((priority 《《 (8 - __NVIC_PRIO_BITS)) & 0xff)里面的priority

  * 即實際用來配置STM32的中斷優先級,但是要寫到8位的中斷優先級的寄存器里面,還是需要用上面的公式先轉化下。通過計算之后就

  * 是上面configKERNEL_INTERRUPT_PRIORITY這個宏的值,用于配置SysTick和PendSV 的中斷優先級。

  */

  #define configLIBRARY_KERNEL_INTERRUPT_PRIORITY 15 // 0x0f

  /*=================================== SVC,PendSV 和 SysTick 中斷服務函數的配置 ========================================*/

  /*

  * 在移植FreeRTOS的時候,需要用到STM32的三個中斷,分別是SVC,PendSV和SysTick,這三個中斷在向量表

  * 里面的名字分別是:SVC_Handler,PendSV_Handler和SysTick_Handler(在啟動文件:startup_stm32f10x_hd.s中)

  *

  * 而在port.c里面寫的這三個中斷的服務函數的名稱跟向量表里面的名稱不一樣,為了中斷響應之后能正確的執行port.c

  * 里面寫好的中斷服務函數,我們需要統一向量表和中斷服務函數的名字。

  *

  * 為了實現這個目的,可以有兩種方法:

  * 1:把啟動文件里面的向量表里面的名字改成跟port.c里面的中斷服務函數名一樣。

  * 2:把port.c里面的中斷服務函數名改成跟啟動文件里面的中斷向量表里面的名字一樣。

  *

  * 這里為了保持啟動文件的完整性,我們統一修改port.c里面的中斷函數名,即添加下面三個宏定義即可。

  * 如果你在stm32f10x_it.c這里面實現了這三個中斷服務函數的定義的話,那么為了避免跟port.c里面的重復定義,應該

  * 把stm32f10x_it.c里面的注釋掉。

  */

  #define xPortPendSVHandler PendSV_Handler

  #define xPortSysTickHandler SysTick_Handler

  #define vPortSVCHandler SVC_Handler

  #endif /* FREERTOS_CONFIG_H */

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1TC358743XBG評估板參考手冊
  2. 1.36 MB  |  330次下載  |  免費
  3. 2開關電源基礎知識
  4. 5.73 MB  |  6次下載  |  免費
  5. 3100W短波放大電路圖
  6. 0.05 MB  |  4次下載  |  3 積分
  7. 4嵌入式linux-聊天程序設計
  8. 0.60 MB  |  3次下載  |  免費
  9. 5基于FPGA的光纖通信系統的設計與實現
  10. 0.61 MB  |  2次下載  |  免費
  11. 6基于FPGA的C8051F單片機開發板設計
  12. 0.70 MB  |  2次下載  |  免費
  13. 751單片機窗簾控制器仿真程序
  14. 1.93 MB  |  2次下載  |  免費
  15. 8基于51單片機的RGB調色燈程序仿真
  16. 0.86 MB  |  2次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234315次下載  |  免費
  3. 2555集成電路應用800例(新編版)
  4. 0.00 MB  |  33564次下載  |  免費
  5. 3接口電路圖大全
  6. 未知  |  30323次下載  |  免費
  7. 4開關電源設計實例指南
  8. 未知  |  21548次下載  |  免費
  9. 5電氣工程師手冊免費下載(新編第二版pdf電子書)
  10. 0.00 MB  |  15349次下載  |  免費
  11. 6數字電路基礎pdf(下載)
  12. 未知  |  13750次下載  |  免費
  13. 7電子制作實例集錦 下載
  14. 未知  |  8113次下載  |  免費
  15. 8《LED驅動電路設計》 溫德爾著
  16. 0.00 MB  |  6653次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935054次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537796次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420026次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234315次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191185次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183278次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138040次下載  |  免費