From: richardbarry Date: Tue, 12 Apr 2011 13:49:13 +0000 (+0000) Subject: Continue work on SmartFusion demo. X-Git-Tag: V7.0.1~70 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=546393d2dc3b4fc7a460dba071d82353c4c3fb60;p=freertos Continue work on SmartFusion demo. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1354 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/CORTEX_A2F200_SoftConsole/.cproject b/Demo/CORTEX_A2F200_SoftConsole/.cproject index f671c1e98..4dadfef61 100644 --- a/Demo/CORTEX_A2F200_SoftConsole/.cproject +++ b/Demo/CORTEX_A2F200_SoftConsole/.cproject @@ -28,13 +28,7 @@ + @@ -196,7 +190,7 @@ - + @@ -207,16 +201,6 @@ - - - - - - - - - - @@ -319,7 +303,7 @@ - + @@ -485,7 +469,7 @@ - + @@ -615,7 +599,7 @@ - + @@ -626,16 +610,6 @@ - - - - - - - - - - @@ -738,7 +712,7 @@ - + diff --git a/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h b/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h index a4edf244c..559708644 100644 --- a/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h +++ b/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h @@ -104,7 +104,7 @@ #define configUSE_TIMERS 1 #define configTIMER_TASK_PRIORITY ( 3 ) #define configTIMER_QUEUE_LENGTH 10 -#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) +#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ @@ -116,19 +116,14 @@ to exclude the API function. */ #define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelay 1 -/* Override some of the priorities set in the common demo tasks. This is -required to ensure false positive timing errors are not reported. */ -#define bktPRIMARY_PRIORITY ( configMAX_PRIORITIES - 3 ) -#define bktSECONDARY_PRIORITY ( configMAX_PRIORITIES - 4 ) - /* Use the system definition, if there is one */ #ifdef __NVIC_PRIO_BITS #define configPRIO_BITS __NVIC_PRIO_BITS #else - #define configPRIO_BITS 4 /* 15 priority levels */ + #define configPRIO_BITS 5 /* 15 priority levels */ #endif -#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 +#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x1f #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5 /* The lowest priority. */ diff --git a/Demo/CORTEX_A2F200_SoftConsole/ParTest.c b/Demo/CORTEX_A2F200_SoftConsole/ParTest.c index 44f43c2fd..84505c2ba 100644 --- a/Demo/CORTEX_A2F200_SoftConsole/ParTest.c +++ b/Demo/CORTEX_A2F200_SoftConsole/ParTest.c @@ -113,19 +113,25 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) void vParTestSetLEDFromISR( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) { - if( uxLED < partstMAX_LEDS ) +unsigned portBASE_TYPE uxInterruptFlags; + + uxInterruptFlags = portSET_INTERRUPT_MASK_FROM_ISR(); { - if( xValue == pdTRUE ) - { - ulGPIOState &= ~( 1UL << uxLED ); - } - else + if( uxLED < partstMAX_LEDS ) { - ulGPIOState |= ( 1UL << uxLED ); - } + if( xValue == pdTRUE ) + { + ulGPIOState &= ~( 1UL << uxLED ); + } + else + { + ulGPIOState |= ( 1UL << uxLED ); + } - MSS_GPIO_set_outputs( ulGPIOState ); + MSS_GPIO_set_outputs( ulGPIOState ); + } } + portCLEAR_INTERRUPT_MASK_FROM_ISR( uxInterruptFlags ); } /*-----------------------------------------------------------*/ diff --git a/Demo/CORTEX_A2F200_SoftConsole/main-full.c b/Demo/CORTEX_A2F200_SoftConsole/main-full.c index 182ea4711..9cd725e0d 100644 --- a/Demo/CORTEX_A2F200_SoftConsole/main-full.c +++ b/Demo/CORTEX_A2F200_SoftConsole/main-full.c @@ -424,6 +424,7 @@ static void prvSetupHardware( void ) vParTestInitialise(); /* Setup the GPIO and the NVIC for the switch used in this simple demo. */ + NVIC_SetPriority( GPIO8_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); NVIC_EnableIRQ( GPIO8_IRQn ); MSS_GPIO_config( MSS_GPIO_8, MSS_GPIO_INPUT_MODE | MSS_GPIO_IRQ_EDGE_NEGATIVE ); MSS_GPIO_enable_irq( MSS_GPIO_8 ); @@ -449,6 +450,7 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName /* Run time stack overflow checking is performed if configconfigCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is called if a stack overflow is detected. */ + taskDISABLE_INTERRUPTS(); for( ;; ); } /*-----------------------------------------------------------*/