Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

8052 port gives incorrect scheduler operation

Posted 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 operation

Posted by woops_ on July 9, 2008
Is it possible that the 8051 is resetting over and over?

RE: 8052 port gives incorrect scheduler opera

Posted 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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS