issue about how to use AHB SRAM in LPC1759

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

issue about how to use AHB SRAM in LPC1759

445 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by crudo on Wed Aug 05 08:39:18 MST 2015
I'm trying to use AHB SRAM in LPC1759 (bank0: 0x2007C000 - 0x2007FFFF; bank1: 0x20080000 - 0x20083FFF;) but I'm having some issues when executing the application. I created a test code which blink a LED using timer 1 as the following pseudo code:


static unsigned char array[1024*16] __attribute__((section(".data.$AHB_RAM")));

setup_led();
setup_timer1();

// while(1); // test point 1
use_memory_in_AHB_region(); // assume this function fill array with some data
// while(1); // test point 2

void timer1_handler()
{
  toggle_led();
}



Uncommenting test point 1 line led blink as expected, uncommenting test point 2 the led doesn't blink, timer1 is somehow affected by writing data to array. My questions are: can I use AHB RAM to general purpose as I did with array variable? If so, what could be wrong?

I checked linker definitions and they are pointing to right address.




Labels (1)
0 Kudos
2 Replies

338 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by crudo on Wed Aug 05 10:59:34 MST 2015
I was assuming so, but I actually don't know. This memory is being used as heap to freeRTOS. I'm trying to debug.
0 Kudos

338 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Aug 05 08:52:30 MST 2015
Are you sure
use_memory_in_AHB_region();
is doing what you think it is doing? Try debugging and see what is happening.
0 Kudos