From: richardbarry Date: Wed, 7 May 2008 17:58:20 +0000 (+0000) Subject: Move the call to start the high frequency timer to inside a task to ensure it does... X-Git-Tag: V5.0.2~56 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de577c0eec88d22cf00d2311c9fc09b430922196;p=freertos Move the call to start the high frequency timer to inside a task to ensure it does not trigger before the scheduler has started. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@341 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/PIC32MX_MPLAB/main.c b/Demo/PIC32MX_MPLAB/main.c index 5e4075af7..12e9912f1 100644 --- a/Demo/PIC32MX_MPLAB/main.c +++ b/Demo/PIC32MX_MPLAB/main.c @@ -190,7 +190,6 @@ unsigned portLONG ulRegTest1Cycles = 0, ulRegTest2Cycles = 0; /*-----------------------------------------------------------*/ - /* * Create the demo tasks then start the scheduler. */ @@ -219,9 +218,6 @@ int main( void ) /* prvCheckTask uses sprintf so requires more stack. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE * 2, NULL, mainCHECK_TASK_PRIORITY, NULL ); - /* Setup the high frequency, high priority, timer test. */ - vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY ); - /* Finally start the scheduler. */ vTaskStartScheduler(); @@ -290,6 +286,10 @@ static portCHAR cStringBuffer[ mainMAX_STRING_LENGTH ]; extern unsigned portLONG ulMaxJitter ; xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; + /* Setup the high frequency, high priority, timer test. It is setup here + to ensure it does not fire before the scheduler is started. */ + vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY ); + /* Initialise the variable used to control our iteration rate prior to its first use. */ xLastExecutionTime = xTaskGetTickCount(); @@ -367,7 +367,13 @@ xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; } /*-----------------------------------------------------------*/ -void vApplicationGeneralExceptionHandler( unsigned portLONG ulCause, unsigned portLONG ulStatus ) +void vApplicationStackOverflowHook( void ) +{ + for( ;; ); +} +/*-----------------------------------------------------------*/ + +void _general_exception_handler( unsigned portLONG ulCause, unsigned portLONG ulStatus ) { /* This overrides the definition provided by the kernel. Other exceptions should be handled here. */