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

Very fast context switching with TI's MCU?

Posted by terbo1 on April 28, 2015

Hello.

I'm new to freeRTOS and have two questions. We have two “applications” to be merged into one software where one of the app’s is very time critical. We’re currently using a Texas Instrument TMS320F28069 MCU (C2000 family) running on a 20Mhz crystal (and no RTOS).

REQUIREMENTS: Max 150 uSec CPU-time can be consumed by the non-critical task/thread (every 650 uSec). If these 150 uSec are exceeded, severe damage to the hardware may occur. We use a Texas Instrument (TI) TMS320F28069 MCU (C2000 family) running on a 20Mhz crystal and Code Composer Studio (CCS) IDE.

Q-1: Is it easy/simple to use/implement the freeRTOS under TI's CCS IDE for this MCU? Q-2: Would you recommend to implement these very hard/tough real-time requirements under freeRTOS's control?

best regards terje bohler


Very fast context switching with TI's MCU?

Posted by rtel on April 28, 2015

There are CCS ports for Cortex-M and MSP430X, but not C2000.

Your timing constraints are very tight, but could possibly be achieved using an RTOS port that supports a full interrupt nesting model that includes a sub-set of interrupt priorities that are never disabled. You could then implement the high frequency real time control by using that subset of interrupts without the risk of the interrupts ever being delayed by the activity of the RTOS.

You ask would I recommend doing this, and the answer would have to be, I would recommend setting up an experiment with a dummy/simple/small application to test if the requirements can be met as soon as possible into the project so you can determine quickly if it is worth pursuing or not.

Regards.


Very fast context switching with TI's MCU?

Posted by terbo1 on April 28, 2015

Thank you very much. best regards terje bøhler


Very fast context switching with TI's MCU?

Posted by terbo1 on April 28, 2015

And by the way ... If you can recomment an RTOS suitable (possibly) for our needs I would appreciate that very much. best regards terje bøhler


Very fast context switching with TI's MCU?

Posted by heinbali01 on April 28, 2015

If you can recommend an RTOS suitable

FreeRTOS of course :-) Why FreeRTOS would be a good choice? Because it is deterministic. The internal algorithms and data structures are chosen in such a way that the same actions last the same amount of time each time they're executed.

You write that the crystal gives 20 MHz, but I suppose that your TMS320F28069 will run at 90 MHz?

Like Richard suggested, I would write a simulation and test for yourself if the constraints can be met.

Every 650 uSec, there are at most 150 uSec available to do a secondary task. After that your primary task will run doing important things?

The TMS320 has three 32-bits timers.

One timer can be set-up with a small divisor so it runs very fast just to measure micro seconds and see if the constraints are being met.

Suppose your primary task is sleeping in a xTaskNotifyWait().

A second 32-bit timer will serve as an alarm clock and will wake-up the primary task after N uSec by calling xTaskNotifyFromISR(). Now the primary task becomes runnable and if it has the highest priority, it will run.

The time needed for a task-switch should be far below 1 uSec. It will be important for you to know exactly which interrupts are to be expected and how long it takes to handle them.

Good luck.


Very fast context switching with TI's MCU?

Posted by terbo1 on April 28, 2015

Thanks Hein!

I think I need a little clarification here... My first response on my post (see above) says: "There are CCS ports for Cortex-M and MSP430X, but not C2000." And you say "If you can recommend an RTOS suitable, FreeRTOS of course :-)".

Are you positive that we can use the freeRTOS for our MCU & (CCS-) IDE? I'll appreciate clarification on this matter.

best regards terje bøhler


Very fast context switching with TI's MCU?

Posted by rtel on April 28, 2015

I believe there is at least one contributed C2000 port somewhere, as it used to be in the FreeRTOS Interactive site. I know nothing about it though, and we can't support it ourselves as it is third party code. We don't have a port ourselves, but you could potentially create one.

Regards.


Very fast context switching with TI's MCU?

Posted by terbo1 on April 28, 2015

Thank you for the information. best regards terje bøhler


Very fast context switching with TI's MCU?

Posted by heinbali01 on April 28, 2015

Sorry Terje, I was only responding to your question Q-2 as I know nothing about that particular FreeRTOS port.

Regards.


Very fast context switching with TI's MCU?

Posted by richard_damon on April 29, 2015

My first comment is that these requirements:

REQUIREMENTS: Max 150 uSec CPU-time can be consumed by the non-critical task/thread (every 650 uSec). If these 150 uSec are exceeded, severe damage to the hardware may occur. We use a Texas Instrument (TI) TMS320F28069 MCU (C2000 family) running on a 20Mhz crystal and Code Composer Studio (CCS) IDE.

seem to be written wrong. It is almost a certainty that the critical need isn't to limit the tie spent in the background thread, but that some task (or set of tasks) has some very tight requirements with HARD deadlines to meet.

Understanding the nature of these requirements would be an essential piece of being able to see the suitability of any given system to your requirements.


[ 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