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


dsPIC33E port

Posted by dragonflight1 on February 6, 2015


I know your position on this (it is even in the code), but I thought I would point out a couple of points that may influence you.

Firstly, it would appear that no-one with the exception of swissembeded has used the DSP features of any PIC! and he seems to have come and gone.

Secondly, while on the surface it appears that the dsPIC24/30's allow the saving/restoring of the DO registers, in reality there is a limit of 7 levels (read-only 3-bit nest register) and in practice they are limited to 2 levels (hardware stack) as Microchip's dsp library makes no accomodation for a software stack. Worse the DSP accumulator status flags (overflow and saturate) are read only and not restorable (except for testing and executing code to set the flags). To be fair I could not find any code in the libraries which used those flags. All of which to say that, practically, on the dsPIC24/30's one is restricted to 1 process and on the dsPIC33E's 2 processes using the DSP engine.

Of course you are asking yourself, if no-one is using the dsp then why bother? Given the PIC's many, many varieties it can be a peripheral choice. In particular the dsPIC33EPxxxGP/MC50X has a CAN peripheral while the PIC24EPxxx's do not. The EP series is interesting because it has the largest flash size available (512Mb) as well as a decent amount of RAM (48Kb)

Finally, as you may remember there is a port on the FreeRTOS interactive site for the dsPIC33Es which I don't mind maintaining (albeit slowly and not during the summer - can't waste the short sailing season)


dsPIC33E port

Posted by rtel on February 6, 2015

Other than the

statement in the port file, which could be commented out, I don't think there is anything particularly stopping the use of FreeRTOS on the E parts provided the user understands that certain hardware features are not thread safe. Those non thread-safe features could be used in a single task, or somehow protected using a semaphore. The PIC24E is supported after all.


dsPIC33E port

Posted by dragonflight1 on February 6, 2015

There is a bit more to it than that. It needs to be added to portasm_dsPIC.S, should probably not bother saving DO resisters, it has EDS (different registers), so requires several changes in port.c

mike PS. At the same time port.c should remove its dependence on MPLAB i.e. #ifdef MPLABDSPICPORT should be changed to #ifdef __DSP__

PPS Martin Hollenweger had a minimal change port to support PIC33E http://interactive.freertos.org/entries/27667473-FreeRTOS-V-7-5-2-port-for-dsPIC33E-max-32KB-RAM- Or if really bold, you could use a variant of mine - eliminates the asm files and I would be happy to remove the hardware stack checking or make it conditional so there would be no operational difference


[ 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