Quality RTOS & Embedded Software

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


8052 port gives incorrect scheduler operation

Posted by adam on July 9, 2008

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



#include "FreeRTOS.h"
#include "task.h"

#define byte unsigned char

static void vLEDFlashTask( void * );

void main( void )
xTaskCreate( vLEDFlashTask, "LEDx", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );


static void vLEDFlashTask( void *pvParameters )
(void) pvParameters;
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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists