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

M14K port question

Posted by os21doug on December 10, 2014

Hi,

I am looking at using the MIPS M14K port for a product. I notice that the only FreeRTOS port for the M14K does not make use (take advantage of) the shadow registers. On interrupt entry it saves task context straight away before servicing the interrupt. I can see why this is done - it puts everything in a consistent state, ready for any context switch that the ISR may cause. I suppose that if you take the view that any ISR that is doing 'real work' is likely to post a semaphore or send a message, and that a context switch out of ISR is the typical case, then this makes sense. (I did the same in an RTOS I once wrote). However, there may be cases where we have interrupts that we need to service very quickly, even without the need to communicate with a task, and the speed advantage of the shadow registers is highly desirable. Has anyone looked at the possibility of tweaking the port to do this? Or am I on my own on this?

A related side question, which is more architectural: I notice that FreeRTOS does not have a proper scheduler lock (disable pre-emption mode). Rather it relies heavily on disabling/enabling interrupts for critical sections. Has anyone attempted to address this in any of the ports? It should be simple enough to add a soft lock to the scheduler, so you prevent (actually defer) thread switches during critical sections, without affecting interrupt latency? Quite happy to hack this in myself, but if someone has already done it....

Cheers,

Doug


M14K port question

Posted by os21doug on December 10, 2014

Answering my own question on the 2nd point, it looks like vTaskSuspendAll() and xTaskResumeAll() are what I want (provided I don't block in between the two calls!).

Doug


M14K port question

Posted by rtel on December 10, 2014

The M4K hardware the port was created on didn't implement the shadow registers (from memory) so they were never used. There is no reason not to make use of them, and if you are not using any kernel functionality in the interrupts then you could do that outside of the kernel code. You would probably want to ensure the priority of the interrupts was above configMAXSYSCALLINTERRUPT_PRIORITY though.

Regards.


M14K port question

Posted by rtel on December 10, 2014

You may also be interested in this contribution, although we can't support it directly: http://interactive.freertos.org/entries/67933519-FreeRTOS-8-1-2-for-MIPS32-processor-cores

Regards.


M14K port question

Posted by os21doug on December 10, 2014

Great! Understood. Thanks for the tips!

Cheers,

Doug


[ 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