From: richardbarry Date: Sun, 10 Feb 2008 20:31:19 +0000 (+0000) Subject: Update Fujitsu port files - work in progress. X-Git-Tag: V4.7.2~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=22324accd7c3cf9061897a53aa94c59cc6397c8e;p=freertos Update Fujitsu port files - work in progress. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@160 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/Softune/MB91460/port.c b/Source/portable/Softune/MB91460/port.c index 54c8398c5..00de8a98c 100644 --- a/Source/portable/Softune/MB91460/port.c +++ b/Source/portable/Softune/MB91460/port.c @@ -219,8 +219,8 @@ portBASE_TYPE xPortStartScheduler( void ) void vPortEndScheduler( void ) { - /* It is unlikely that the AVR port will get stopped. If required simply - disable the tick interrupt here. */ + /* Not implemented - unlikely to ever be required as there is nothing to + return to. */ } /*-----------------------------------------------------------*/ @@ -229,6 +229,8 @@ void vPortEndScheduler( void ) */ static void prvSetupTimerInterrupt( void ) { +/* The peripheral clock divided by 32 is used by the timer. */ +const unsigned portSHORT usReloadValue = ( unsigned portSHORT ) ( ( ( configPER_CLOCK_HZ / configTICK_RATE_HZ ) / 32UL ) - 1UL ); TMCSR0_CNTE=0; /* Count Disable */ TMCSR0_CSL=0x2; /* CLKP/32 */ @@ -236,8 +238,7 @@ static void prvSetupTimerInterrupt( void ) TMCSR0_RELD=1; /* Reload */ TMCSR0_UF=0; /* Clear underflow flag */ - //TMRLR0=0x1F3; /* Tick = 1 ms*/ - TMRLR0=0x1387; /* Tick = 10 ms*/ + TMRLR0=usReloadValue; TMCSR0_INTE=1; /* Interrupt Enable */ TMCSR0_CNTE=1; /* Count Enable */ TMCSR0_TRG=1; /* Trigger */ diff --git a/Source/portable/Softune/MB91460/portmacro.h b/Source/portable/Softune/MB91460/portmacro.h index 210f26dd4..d9f07ab42 100644 --- a/Source/portable/Softune/MB91460/portmacro.h +++ b/Source/portable/Softune/MB91460/portmacro.h @@ -60,7 +60,7 @@ #define portLONG long #define portSHORT int #define portSTACK_TYPE unsigned portSHORT -#define portBASE_TYPE char +#define portBASE_TYPE long /* This is required since SOFTUNE doesn't support inline directive as is. */ #define inline