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

DPSRAM use with freeRTOS

Posted by gatolen on July 5, 2017

Hi , Getting to know freeRTOS better really enjoying using it. I have a training program using a PIC24FJ64GB002 which has a 16 FIFO ADC buffer. I used the FIFO to gather 16 samples then averaging them. Using the info to control servos. I wanted to learn DMA so I moved to the PIC24HJ128GP502 with DMA. The ADC in the 24HJ has just one ADCxBUF so the DMA MOD uses the near memory for its buffer. I adapted the P24FJ files to my working PIC24HJ F file. When I try to build the PIC24HJ I have the new error saying .bss.section no memory for my data. I reduce the heap and I can build my file. I think this is due to the DMA BUFFER. I tried declaring my other two global char arrays which are used for other things, char myarray[] attribute ((far)) , which compiles fine. My question is using the attribute this way allowed and does this then put these arrays in the far mem location. Didn't see any examples showing this. Can I use some other heap functions (heap 4 maybe) to give me more flexibility to my memory? I have room in my program space visibility for data if I understand it correctly that canbe used. Well anyway freeRTOS seems great and when I get more understanding I'll make another donation. Thank you guys so much for making freeRTOS for people like me.


DPSRAM use with freeRTOS

Posted by rtel on July 5, 2017

I'm afraid I don't know what the far attribute does using that compiler, so would have to look it up myself. You should be able to look in the map file output by the compiler to see where the allocation ended up though.

heap_5 is the most flexible.


DPSRAM use with freeRTOS

Posted by gatolen on July 8, 2017

Thanks for your reply. Let me ask you this question, when I am getting close to running out of data memory is there a way with my chip that freeRTOS could use a section of program memory or could I remap program memory myself? This is an area I certainly have not any experience in I would just use the partitions that were currently on the chip. It seems very interesting if I could do this. This is probably a question more for the microchip people. I was able to get my program to run now by changing the amount of heap I set in the freeRTOS config file but I know I must be right at that limit. I'll use the get heap high water mark and see how close I am. I'll study on how to extend if possible my memory. Thank you for your grt rtos.


DPSRAM use with freeRTOS

Posted by richarddamon on July 8, 2017

On the Pic24F series, the Program Memory is Flash, so not really equivalent to data memory. If you have a large amount of read only data, marking it const and telling the compiler to use program memory for it can save data memory (note, you can't take the address of such an object and get a normal data pointer, so you may need to make some adaptations to your code.


[ 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