summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-05-07 17:58:20 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-05-07 17:58:20 +0000
commitd03d219d4384ffb8084eb0b657077f0046ff0b88 (patch)
tree0943600c77b4489c0b0ec94768cfdf925c43b4dd
parent0174a86bd82c09c6bd7c6b57c839d7fe451b7bd2 (diff)
downloadfreertos-d03d219d4384ffb8084eb0b657077f0046ff0b88.tar.gz
freertos-d03d219d4384ffb8084eb0b657077f0046ff0b88.tar.bz2
freertos-d03d219d4384ffb8084eb0b657077f0046ff0b88.tar.xz
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://freertos.svn.sourceforge.net/svnroot/freertos/trunk@341 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r--Demo/PIC32MX_MPLAB/main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/Demo/PIC32MX_MPLAB/main.c b/Demo/PIC32MX_MPLAB/main.c
index 5e4075af..12e9912f 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. */