From 22324accd7c3cf9061897a53aa94c59cc6397c8e Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 10 Feb 2008 20:31:19 +0000 Subject: [PATCH] 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 --- Source/portable/Softune/MB91460/port.c | 9 +++++---- Source/portable/Softune/MB91460/portmacro.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) 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 -- 2.39.5