LPC1769 AHBRAM not work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1769 AHBRAM not work

1,217 Views
vasishthd
Contributor I

Hi,

I am using LPC1769 with MCUExpresso and LPCOpen library to develop my application. At initial stage of application development the global data/stack/heap etc stored in main RAM(32 KB), but at one stage of my application development, i have identify main RAM (32 KB) has fully acquired, so i have decided to put my application globals/stack/heap etc into RAMAHB32 aka AHBRAM. Consider below stages i have been pass to access AHBSRAM.

  • Simple program (without any initialization) which writes dummy data into AHBRAM by using buffer below
    __DATA(RAM2) uint32_t ram2_buffer[32768/4];
    i have write data into AHBRAM using for loop (counter) and same data has been read successfully for entire AHBSRAM size (32 KB), means AHBSRAM works.
  • If i put some of application globals like below the behavior of app_data variable is uncertain.
    __DATA(RAM2) uint32_t app_data;
  • Now i tried to add my application data to AHBSRAM by change in settings from project->properties->MCU Linker->Manage Linker script and change all possible settings to put application data/heap/stack into AHBSRAM, for compile time console shows percentage data allocated to AHBSRAM. but during run time, it always falls under the exception/hard faults.
  • I have tried to modify firmware_DebugLPC1769.ld file directly to ensure required memory sections are put in RAMAHB properly, then there is no compilation error but still gives run time exception/hard faults.
  • In my application i have use FreeRTOS and create all my application tasks statically and allocate task stack from RAMAHB, then it cames into run time FreeRTOS exception of vApplicationStackOverflowHook(), even i allocate much more amount of memory the task has required.

So any how when RAMAHB is in picture, there always be a run time exceptions/faults. 

Is there any possibility that AHBRAM32 has slower access speed? If so, how to fix it?

If there is some initialization problem, then why the first point works successfully?

Thanks.

LPC176x_memory.png

Labels (1)
Tags (3)
0 Kudos
Reply
1 Reply

1,092 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Vasishth Desai,

Thanks for contacting our technical support, I will serve for you.

First of all , please use the latest version MCUXpresso IDE v10.3.MCUXpresso IDE|Eclipse-based Integrated Development Environment (IDE) | NXP   

- I test on a LPCopen project, includes the header file cr_section_macros.h, then add app_data as your description:

#include <cr_section_macros.h>

_DATA(RAM3) uint32_t app_data;

After build , we can see this variate is placed in RamAHB32 section:

pastedImage_15.png

-If you want to put all global date into RamAHB32, there is a simple method, the Managed Linker Script
mechanism  allow the user to specify a specific memory region to be used for the global data:

pastedImage_16.png

- If you want to put all of the data into RamAHB32 ,  just config it as the first ram:

pastedImage_17.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply