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

Separate interrupt stack Coldfire MCF52259

Posted by Per Klint on July 17, 2013
Hi!

We are using FreeRTOS Version 7.01 with a port very similar to the reference Coldfire 52259 demo.

Due to the problem that interrupts will use the interrupted task's stack to run, every task in the system needs to have extra stack allocated for this. We have up to 17 task running in ours system, so this extra stack eats a lot of valuable ram.

Is there a port handling interrupts in a separate stack for the Coldfire/68K family architecture?

I read on the forum that the PIC32 port has this and the stack is configured with configISR_STACK_SIZE parameter.

Best regards,

/// Per

RE: Separate interrupt stack Coldfire MCF52259

Posted by Richard on July 17, 2013
While all the newer ports maintain a separate interrupt stack, unfortunately being one of the older ports, the ColdFire port does not. Also, with Freescale spending many more dollars on Kinetis marketing over ColdFire marketing, it is unlikely the Coldfire port will get updated to do the same.

That said, I think it would be simple enough to implement the change (?). You would need to keep an interrupt nesting count. On interrupt entry (before interrupts are enabled), if the nest count is 0 then switch to a statically allocated system stack after the task context is saved. On exit, after decremented the count, if it is zero again, switch back to the task stack - which would probably happen anyway. Of course, it is always easier to say than do - I would have to refamiliarise myself with the Coldfire port to know for sure. You can re-use the stack that is already allocated by your linker for use by the main() function as the system stack.

The PIC32 does do this, but most is done in assembly so maybe not so easy to follow. The new A9 port goes a step further and only saves the task context if a context switch is actually needed.

Regards.

RE: Separate interrupt stack Coldfire MCF52259

Posted by Per Klint on July 19, 2013
Thanks for your answer!

I think I understand how it should be done, hopefully it will not be that difficult to implement.

Best regards,

/// Per


[ 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