FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2008 Threads] 8052 port gives incorrect scheduler operationPosted by adam on July 9, 2008 Hello,
I'm trying to port FreeRTOS to the Analog Devices ADuC847. It's a pretty standard 8052 core so I was hoping that once I had the vTaskStartScheduler function passing then the chip would burst into fully coherent life.
Below I have attached my main function and the only other modifications were removing SFRPAGE references in the port file and changing the timer register names.
When I run this the timer interrupt runs correctly (which is why I'm not posting the prvSetupTimerInterrupt changes) however the scheduler appears to completely ignore the TaskDelay function, toggling an output pin shows the function to enter and exit faster than the timer2 tick speed.
Internally the tick count even seems to be blocked by the uxSchedulerSuspended signal which is confusing my little non-embedded brain some.
I'm guessing there's some sort of confusion in the scheduler: has anyone here seen such a problem?
Many Thanks
Adam
---
#include "FreeRTOS.h" #include "task.h"
#define byte unsigned char
static void vLEDFlashTask( void * );
void main( void ) { vPortInitialiseBlocks(); xTaskCreate( vLEDFlashTask, "LEDx", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );
vTaskStartScheduler(); }
static void vLEDFlashTask( void *pvParameters ) { (void) pvParameters; for(;;) { vTaskDelay( 100 ); P0 &= ~(0x40); vTaskDelay( 100 ); P0 |= 0x40; } }
byte _sdcc_external_startup ( void ) { PSW &= ~(0x18); /* Register bank 0 */ EA = 0; /* Disable interrupts */ CFG84x |= 0x01; /* Extended stack diabled, Internal XRAM mapped to lower 2k of external address space */ return 0; }
RE: 8052 port gives incorrect scheduler operationPosted by woops_ on July 9, 2008 Is it possible that the 8051 is resetting over and over?
RE: 8052 port gives incorrect scheduler operaPosted by adam on July 9, 2008 No, I have some startup port signals in the real code which I don't see making it off the chip.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|