nobody wrote on Wednesday, October 19, 2005:
Hello,
i started yesterday porting FreeRTOS on ADUC7026, with KEIL LPC2129 Demo as startpoint. So i did the following changes in FreeRTOS\Demo\ARM7_LPC2129_Keil:
/********in FreeRTOSConfig.h **********/
change #include <lpc21xx.h>
to #include <aduc7026.h>
change #define configTOTAL_HEAP_SIZE ((size_t) 14812 )
to #define configTOTAL_HEAP_SIZE 8192
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 45000000 )
/***** In startup.s *******/
setup PLL Multiplier to 1 ;(No division of the core frequency)
/******* in PartTest.c*****************************/
change IOSET0 to GP4SET and IOCLR1 to GP4CLR
( GP4CLR is connected to a LEd on the Evaluation board)
/*** ******** in MAIn in setupHardware() ********************/
setting up the ADC and the DAC.
Setting up the GPIO Port 4 as Output.
/********** in Port.c ***************/
prvSetupTimerInterrupt() in Source/portable/Keil/ARM7/port.c
configures the ADUC7026 timer 0 to generate the RTOS tick.
–Generating RTOS TICK:
// timer0 configuration
T0LD = 0xB020;
// 45088/45088000Hz = 1ms
T0CON = 0xC0;// count down
// periodic mode enable time 0
Now My problem ist that ADUC7026 Doesnot use vectored Interrupt System. Please Could you have any idea, any reference , how i can setup my Interupts registers, so that FreeRTOS work in supervisor mode. Or simply suitably work?
ADUC7026 Interrupt System is described here at page 63
http://www.keil.com/dd/docs/datashts/adi/aduc702x_ds.pdf
Here is the current source code of the funktion
static void prvSetupTimerInterrupt( void )
{
unsigned portLONG ulCompareMatch;
// timer0 configuration
T0LD = 0xB020; // 45088/45088000Hz = 1ms
T0CON = 0xC0; // count down
// periodic mode enable time 0
/* Setup the VIC for the timer. */
VICIntSelect &= ~( portTIMER_VIC_CHANNEL_BIT );
VICIntEnable |= portTIMER_VIC_CHANNEL_BIT;
/* The ISR installed depends on whether the preemptive or cooperative
scheduler is being used. */
#if configUSE_PREEMPTION == 1
{
#ifdef KEIL_THUMB_INTERWORK
extern void ( vPreemptiveTick )( void ) __arm __task;
#else
extern void ( vPreemptiveTick )( void ) __task;
#endif
VICVectAddr0 = ( unsigned portLONG ) vPreemptiveTick;
}
#else
{
extern void ( vNonPreemptiveTick )( void ) __irq;
/########## I have not changed the following code from FreeRTOS Demo #########
VICVectAddr0 = ( portLONG ) vNonPreemptiveTick;
}
#endif
VICVectCntl0 = portTIMER_VIC_CHANNEL | portTIMER_VIC_ENABLE;
/* Start the timer - interrupts are disabled when this function is called
so it is okay to do this here. */
T0TCR = portENABLE_TIMER;
}
I will be very gratiffull for any Help.
Regards
-Emeric