]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h
Update Zynq serial.c to be interrupt driven.
[freertos] / FreeRTOS / Demo / CORTEX_A9_Zynq_ZC702 / RTOSDemo / src / FreeRTOSConfig.h
index d2002def6d891bc1c4fd9dbda78c008be3560499..53d62550feb0995979accfe767f0dad66645f5be 100644 (file)
@@ -66,6 +66,8 @@
 #ifndef FREERTOS_CONFIG_H\r
 #define FREERTOS_CONFIG_H\r
 \r
+#include "xparameters.h"\r
+\r
 /*-----------------------------------------------------------\r
  * Application specific definitions.\r
  *\r
  * "FromISR".  FreeRTOS maintains a separate interrupt safe API to enable\r
  * interrupt entry to be shorter, faster, simpler and smaller.\r
  *\r
- * The Zynq implements 32 unique interrupt priorities.  For the purpose of\r
- * setting configMAX_API_CALL_INTERRUPT_PRIORITY 31 represents the lowest\r
+ * The Zynq implements 256 unique interrupt priorities.  For the purpose of\r
+ * setting configMAX_API_CALL_INTERRUPT_PRIORITY 255 represents the lowest\r
  * priority.\r
  */\r
-#define configMAX_API_CALL_INTERRUPT_PRIORITY  25\r
+#define configMAX_API_CALL_INTERRUPT_PRIORITY  18\r
 \r
 \r
 #define configCPU_CLOCK_HZ                                             100000000UL\r
 #define configQUEUE_REGISTRY_SIZE                              8\r
 #define configCHECK_FOR_STACK_OVERFLOW                 2\r
 #define configUSE_RECURSIVE_MUTEXES                            1\r
-#define configUSE_MALLOC_FAILED_HOOK                   0\r
+#define configUSE_MALLOC_FAILED_HOOK                   1\r
 #define configUSE_APPLICATION_TASK_TAG                 0\r
 #define configUSE_COUNTING_SEMAPHORES                  1\r
 #define configUSE_QUEUE_SETS                                   1\r
@@ -149,7 +151,7 @@ to exclude the API function. */
 #define INCLUDE_vTaskDelayUntil                                        1\r
 #define INCLUDE_vTaskDelay                                             1\r
 #define INCLUDE_eTaskGetState                                  1\r
-#define INCLUDE_xTimerPendFunctionCallFromISR  1\r
+#define INCLUDE_xTimerPendFunctionCall 1\r
 \r
 /* This demo makes use of one or more example stats formatting functions.  These\r
 format the raw data provided by the uxTaskGetSystemState() function in to human\r
@@ -157,19 +159,19 @@ readable ASCII form.  See the notes in the implementation of vTaskList() within
 FreeRTOS/Source/tasks.c for limitations. */\r
 #define configUSE_STATS_FORMATTING_FUNCTIONS   1\r
 \r
-/* The following constants describe the hardware, and are correct for the\r
+/* The following constant describe the hardware, and are correct for the\r
 Zynq MPU. */\r
-#define configINTERRUPT_CONTROLLER_BASE_ADDRESS        0xE8201000\r
-#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET 0x1000\r
-#define configUNIQUE_INTERRUPT_PRIORITIES              32\r
+#define configINTERRUPT_CONTROLLER_BASE_ADDRESS                ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )\r
+#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )\r
+#define configUNIQUE_INTERRUPT_PRIORITIES                              32\r
 \r
 /* Run time stats gathering definitions. */\r
 unsigned long ulGetRunTimeCounterValue( void );\r
 void vInitialiseRunTimeStats( void );\r
 \r
-#define configGENERATE_RUN_TIME_STATS  0\r
-//#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vInitialiseRunTimeStats()\r
-//#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()\r
+#define configGENERATE_RUN_TIME_STATS  1\r
+#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vInitialiseRunTimeStats()\r
+#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()\r
 \r
 /* The size of the global output buffer that is available for use when there\r
 are multiple command interpreters running at once (for example, one on a UART\r
@@ -197,5 +199,10 @@ void vAssertCalled( const char * pcFile, unsigned long ulLine );
 void vConfigureTickInterrupt( void );\r
 #define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()\r
 \r
+#define configINSTALL_FREERTOS_VECTOR_TABLE 1\r
+\r
+void vClearTickInterrupt( void );\r
+#define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()\r
+\r
 #endif /* FREERTOS_CONFIG_H */\r
 \r