AnsweredAssumed Answered

LPC1769 AHBRAM not work

Question asked by Vasishth Desai on Feb 14, 2019
Latest reply on Feb 17, 2019 by Alice_Yang

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

 

 

Outcomes