Quality RTOS & Embedded Software

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


HCS12 timing

Posted by Jeff Smith on October 26, 2005
I'm working more on the GCC/HCS12 port for MC9S12DP256. I think I've got the port ready to run the full demo as it works in the official CodeWarrior/HCS12 (banked) port. I have some questions about serial.

I have been testing with my own application which sends wireless packets through SCI at 9600 (actually 9615) baud. I am losing sync when reading the packets only when running with the RTOS.

I wonder if it is taking very long to switch tasks. Any Idea how long that takes in the CodeWarrior/HCS12 FreeRTOS port?

RE: HCS12 timing

Posted by Richard on October 26, 2005
Naturally the RTOS will add an overhead to some extent. Conversely it can also be used to reduce the amount of time interrupts are disabled within your driver.

9600 baud should not be a problem, but is dependent on what else your application is doing.

Here are a couple of threads that might be of help:



RE: HCS12 timing

Posted by Jeff Smith on October 26, 2005
K, but one thing I'm certain of is that this GCC port will generate less optimized code, therefore taking longer than CW for the task swap. I have it ticking about 1 KHz. Perhaps I'll scope it to find out what percent of that is typically the switch.

I am not using an interrupt, just to test this. I admit I haven't put a check in there yet to see if the SCI input is overflowing, just guessing that's happening :)

It's hard with this GCC because I don't have a source level debugger going yet.

RE: HCS12 timing

Posted by Nobody/Anonymous on October 26, 2005
The saving and restoring of registers context is asm code so will be the same between cw and gcc. The switch C functions will be different but these are very small so hopefully not too different.

RE: HCS12 timing

Posted by Jeff Smith on October 26, 2005
I know... I wrote it. I'm talking about the scheduler code which is C.

RE: HCS12 timing

Posted by Jeff Smith on December 1, 2005
I found that the timing wasn't a significant problem durring task swapping.

Scope time for various task swaps in micro seconds:
37, 12, 8

FreeRTOS tick interrupt looks steady at 1024 uS.

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

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

Latest News

Version 10.1.0 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner