1 | /* USER CODE BEGIN Header */ |
---|
2 | /* |
---|
3 | * FreeRTOS Kernel V10.3.1 |
---|
4 | * Portion Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
---|
5 | * Portion Copyright (C) 2019 StMicroelectronics, Inc. All Rights Reserved. |
---|
6 | * |
---|
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of |
---|
8 | * this software and associated documentation files (the "Software"), to deal in |
---|
9 | * the Software without restriction, including without limitation the rights to |
---|
10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
---|
11 | * the Software, and to permit persons to whom the Software is furnished to do so, |
---|
12 | * subject to the following conditions: |
---|
13 | * |
---|
14 | * The above copyright notice and this permission notice shall be included in all |
---|
15 | * copies or substantial portions of the Software. |
---|
16 | * |
---|
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
---|
19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
---|
20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
---|
21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
---|
22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
---|
23 | * |
---|
24 | * http://www.FreeRTOS.org |
---|
25 | * http://aws.amazon.com/freertos |
---|
26 | * |
---|
27 | * 1 tab == 4 spaces! |
---|
28 | */ |
---|
29 | /* USER CODE END Header */ |
---|
30 | |
---|
31 | #ifndef FREERTOS_CONFIG_H |
---|
32 | #define FREERTOS_CONFIG_H |
---|
33 | |
---|
34 | /*----------------------------------------------------------- |
---|
35 | * Application specific definitions. |
---|
36 | * |
---|
37 | * These definitions should be adjusted for your particular hardware and |
---|
38 | * application requirements. |
---|
39 | * |
---|
40 | * These parameters and more are described within the 'configuration' section of the |
---|
41 | * FreeRTOS API documentation available on the FreeRTOS.org web site. |
---|
42 | * |
---|
43 | * See http://www.freertos.org/a00110.html |
---|
44 | *----------------------------------------------------------*/ |
---|
45 | |
---|
46 | /* USER CODE BEGIN Includes */ |
---|
47 | /* Section where include file can be added */ |
---|
48 | /* USER CODE END Includes */ |
---|
49 | |
---|
50 | /* Ensure definitions are only used by the compiler, and not by the assembler. */ |
---|
51 | #if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__) |
---|
52 | #include <stdint.h> |
---|
53 | extern uint32_t SystemCoreClock; |
---|
54 | #endif |
---|
55 | #ifndef CMSIS_device_header |
---|
56 | #define CMSIS_device_header "stm32h7xx.h" |
---|
57 | #endif /* CMSIS_device_header */ |
---|
58 | |
---|
59 | #define configENABLE_FPU 1 |
---|
60 | #define configENABLE_MPU 0 |
---|
61 | |
---|
62 | #define configUSE_PREEMPTION 1 |
---|
63 | #define configSUPPORT_STATIC_ALLOCATION 1 |
---|
64 | #define configSUPPORT_DYNAMIC_ALLOCATION 1 |
---|
65 | #define configUSE_IDLE_HOOK 0 |
---|
66 | #define configUSE_TICK_HOOK 0 |
---|
67 | #define configCPU_CLOCK_HZ ( SystemCoreClock ) |
---|
68 | #define configTICK_RATE_HZ ((TickType_t)1000) |
---|
69 | #define configMAX_PRIORITIES ( 56 ) |
---|
70 | #define configMINIMAL_STACK_SIZE ((uint16_t)128) |
---|
71 | #define configTOTAL_HEAP_SIZE ((size_t)15360) |
---|
72 | #define configMAX_TASK_NAME_LEN ( 16 ) |
---|
73 | #define configUSE_TRACE_FACILITY 1 |
---|
74 | #define configUSE_16_BIT_TICKS 0 |
---|
75 | #define configUSE_MUTEXES 1 |
---|
76 | #define configQUEUE_REGISTRY_SIZE 8 |
---|
77 | #define configCHECK_FOR_STACK_OVERFLOW 2 |
---|
78 | #define configUSE_RECURSIVE_MUTEXES 1 |
---|
79 | #define configUSE_COUNTING_SEMAPHORES 1 |
---|
80 | #define configENABLE_BACKWARD_COMPATIBILITY 0 |
---|
81 | #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 |
---|
82 | #define configUSE_TICKLESS_IDLE 1 |
---|
83 | #define configRECORD_STACK_HIGH_ADDRESS 1 |
---|
84 | /* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */ |
---|
85 | /* Defaults to size_t for backward compatibility, but can be changed |
---|
86 | if lengths will always be less than the number of bytes in a size_t. */ |
---|
87 | #define configMESSAGE_BUFFER_LENGTH_TYPE size_t |
---|
88 | /* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */ |
---|
89 | |
---|
90 | /* Co-routine definitions. */ |
---|
91 | #define configUSE_CO_ROUTINES 0 |
---|
92 | #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) |
---|
93 | |
---|
94 | /* Software timer definitions. */ |
---|
95 | #define configUSE_TIMERS 1 |
---|
96 | #define configTIMER_TASK_PRIORITY ( 2 ) |
---|
97 | #define configTIMER_QUEUE_LENGTH 10 |
---|
98 | #define configTIMER_TASK_STACK_DEPTH 256 |
---|
99 | |
---|
100 | /* CMSIS-RTOS V2 flags */ |
---|
101 | #define configUSE_OS2_THREAD_SUSPEND_RESUME 1 |
---|
102 | #define configUSE_OS2_THREAD_ENUMERATE 1 |
---|
103 | #define configUSE_OS2_EVENTFLAGS_FROM_ISR 1 |
---|
104 | #define configUSE_OS2_THREAD_FLAGS 1 |
---|
105 | #define configUSE_OS2_TIMER 1 |
---|
106 | #define configUSE_OS2_MUTEX 1 |
---|
107 | |
---|
108 | /* Set the following definitions to 1 to include the API function, or zero |
---|
109 | to exclude the API function. */ |
---|
110 | #define INCLUDE_vTaskPrioritySet 1 |
---|
111 | #define INCLUDE_uxTaskPriorityGet 1 |
---|
112 | #define INCLUDE_vTaskDelete 1 |
---|
113 | #define INCLUDE_vTaskCleanUpResources 0 |
---|
114 | #define INCLUDE_vTaskSuspend 1 |
---|
115 | #define INCLUDE_vTaskDelayUntil 1 |
---|
116 | #define INCLUDE_vTaskDelay 1 |
---|
117 | #define INCLUDE_xTaskGetSchedulerState 1 |
---|
118 | #define INCLUDE_xTimerPendFunctionCall 1 |
---|
119 | #define INCLUDE_xQueueGetMutexHolder 1 |
---|
120 | #define INCLUDE_uxTaskGetStackHighWaterMark 1 |
---|
121 | #define INCLUDE_uxTaskGetStackHighWaterMark2 1 |
---|
122 | #define INCLUDE_xTaskGetCurrentTaskHandle 1 |
---|
123 | #define INCLUDE_eTaskGetState 1 |
---|
124 | #define INCLUDE_xTaskGetHandle 1 |
---|
125 | |
---|
126 | /* |
---|
127 | * The CMSIS-RTOS V2 FreeRTOS wrapper is dependent on the heap implementation used |
---|
128 | * by the application thus the correct define need to be enabled below |
---|
129 | */ |
---|
130 | #define USE_FreeRTOS_HEAP_4 |
---|
131 | |
---|
132 | /* Cortex-M specific definitions. */ |
---|
133 | #ifdef __NVIC_PRIO_BITS |
---|
134 | /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ |
---|
135 | #define configPRIO_BITS __NVIC_PRIO_BITS |
---|
136 | #else |
---|
137 | #define configPRIO_BITS 4 |
---|
138 | #endif |
---|
139 | |
---|
140 | /* The lowest interrupt priority that can be used in a call to a "set priority" |
---|
141 | function. */ |
---|
142 | #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 |
---|
143 | |
---|
144 | /* The highest interrupt priority that can be used by any interrupt service |
---|
145 | routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL |
---|
146 | INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER |
---|
147 | PRIORITY THAN THIS! (higher priorities are lower numeric values. */ |
---|
148 | #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5 |
---|
149 | |
---|
150 | /* Interrupt priorities used by the kernel port layer itself. These are generic |
---|
151 | to all Cortex-M ports, and do not rely on any particular library functions. */ |
---|
152 | #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) |
---|
153 | /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! |
---|
154 | See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ |
---|
155 | #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) |
---|
156 | |
---|
157 | /* Normal assert() semantics without relying on the provision of an assert.h |
---|
158 | header file. */ |
---|
159 | /* USER CODE BEGIN 1 */ |
---|
160 | #define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );} |
---|
161 | /* USER CODE END 1 */ |
---|
162 | |
---|
163 | /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS |
---|
164 | standard names. */ |
---|
165 | #define vPortSVCHandler SVC_Handler |
---|
166 | #define xPortPendSVHandler PendSV_Handler |
---|
167 | |
---|
168 | /* IMPORTANT: After 10.3.1 update, Systick_Handler comes from NVIC (if SYS timebase = systick), otherwise from cmsis_os2.c */ |
---|
169 | |
---|
170 | #define USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION 0 |
---|
171 | |
---|
172 | /* USER CODE BEGIN Defines */ |
---|
173 | /* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */ |
---|
174 | /* USER CODE END Defines */ |
---|
175 | |
---|
176 | #if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__) |
---|
177 | void PreSleepProcessing(uint32_t ulExpectedIdleTime); |
---|
178 | void PostSleepProcessing(uint32_t ulExpectedIdleTime); |
---|
179 | #endif /* defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__) */ |
---|
180 | |
---|
181 | /* The configPRE_SLEEP_PROCESSING() and configPOST_SLEEP_PROCESSING() macros |
---|
182 | allow the application writer to add additional code before and after the MCU is |
---|
183 | placed into the low power state respectively. */ |
---|
184 | #if configUSE_TICKLESS_IDLE == 1 |
---|
185 | #define configPRE_SLEEP_PROCESSING(__x__) \ |
---|
186 | do { \ |
---|
187 | __x__ = 0; \ |
---|
188 | PreSleepProcessing(__x__); \ |
---|
189 | }while(0) |
---|
190 | #define configPOST_SLEEP_PROCESSING PostSleepProcessing |
---|
191 | #endif /* configUSE_TICKLESS_IDLE == 1 */ |
---|
192 | |
---|
193 | #endif /* FREERTOS_CONFIG_H */ |
---|