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




Loading

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:

http://sourceforge.net/forum/message.php?msg_id=3381733
http://sourceforge.net/forum/message.php?msg_id=3341669

Regards.

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 ]    [ 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