Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


FreeRTOS for dspic33ep512MU810

Posted by Mayank Raja on May 14, 2012
There are some differences between dsPIC33FJ512GP710 and the dsPIC33EP512MU810 e.g. the way memory is handled. GP710 has tables with PSVPAG register and MU810 has pages with DSRPAG and DSWPAG.

In portasm_dsPIC.s and port.c can I simply replace PSVPAG with DSRPAG? Any other changes I should make to port the RTOS to the new chip?

RE: FreeRTOS for dspic33ep512MU810

Posted by Nathan Wiebe on May 14, 2012
In addition to changing PSVPAG to DSRPAG, you really should add an identical line for DSWPAG (and do this twice in port.c and twice in portasm_dsPIC.S). Note that the PUSHes and POPs should be in reverse order after you add the line. I'm not sure why these changes haven't been added to the distribution yet. It's been several years since the first parts with the EDS came out (e.g. the PIC24FJ256DA210). I suspect two new versions would be required: one for the PIC24 DA210 and PIC24 EP parts, and one for the 33F EP parts, which include the EDS and dsPIC core registers.

RE: FreeRTOS for dspic33ep512MU810

Posted by Mayank Raja on May 25, 2012
Thanks Nathan. I made the changes, but not sure if that worked or not. The demo app keeps halting and when I single step, I see that malloc ran out of space even at 5120 bytes. Doesn't seem right. I even removed LCD tasks.

RE: FreeRTOS for dspic33ep512MU810

Posted by Mayank Raja on May 26, 2012

I followed your advice and the instructions on http://www.freertos.org/porting-a-freertos-demo-to-different-hardware.html starting from a clean project and now I am running two tasks which toggle LEDs at different rate on a MCLV board.

Would like to upload the project if others need it.

RE: FreeRTOS for dspic33ep512MU810

Posted by João Martins on October 29, 2012

I'm porting the FreeRTOS to a hardware platform made by my company that uses the pic24fj128gb206, with EDS.

I'm using the demo project for PIC24 included in FreeRTOS7.2.0. But the pic used on that demo is p24FJ128GA010, that does not have EDS.

I used this topic to make the necessary changes in order to port successfully to gb206 .

It compiles ok, but the problem is that using the simulator I'm having a error saying: CORE-E0004: Trap due to unimplemented FLASH memory access, occurred from instruction at 0x001370

This happens after passing the line:

asm volatile( "return" );

on portBASE_TYPE xPortStartScheduler( void )

I'm sure that the previous line, portRESTORE_CONTEXT, is causing this issue, since is where I substituted PSVPAG for the other 2 registers, and for some reason, the PC gets corrupted after this restore context

What seems to be the problem ? I have inverted the order in which i push and pop registers DSWPAG and DSRPAG.

Can you post your port of FreeRTOS on pics that have EDS ?


RE: FreeRTOS for dspic33ep512MU810

Posted by Damien Etienne on August 27, 2013
+1, if you could post the port would be really helpful. thanks.

RE: FreeRTOS for dspic33ep512MU810

Posted by Damien Etienne on August 27, 2013
“ptjmartins ”

It might happen because of a mishandled pointer. With the EP devices, the first address bit is not used for addressing. You can find more details here: http://www.microchip.com/forums/m698417.aspx

RE: FreeRTOS for dspic33ep512MU810

Posted by Mayank Raja on August 27, 2013
I am not able to post the code. It thinks I am posting spam!

RE: FreeRTOS for dspic33ep512MU810

Posted by Damien Etienne on August 27, 2013
Would you mind to send a copy to my mailbox at damien.eti at gmail ?

RE: FreeRTOS for dspic33ep512MU810

Posted by Richard on August 28, 2013
Please post code to http://interactive.freertos.org, then you can also post links here.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner