- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
NXP LPC2478 General Purpose SRAM allocation
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-02-2009 11:09 AM
I ran into a problem with my design and I hope you can help me. I used all of the 64K internal SRAM and wanted to know how I can use the Ethernet SRAM as general purpose SRAM. How might I initialize it for general purpose?
Solved! Go to Solution.
Re: NXP LPC2478 General Purpose SRAM allocation
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-02-2009 11:16 AM
There’s nothing you really have to do, just use it
To specify buffers in that RAM area you can do something like this:
#define UART_BUFFER_BASE 0x7FE00000
/* RX and TX buffers. */
#define RX_BUFFER1 ((unsigned char *)(UART_BUFFER_BASE))
#define TX_BUFFER1 ((unsigned char *)(UART_BUFFER_BASE + 16))
#define RX_BUFFER2 ((unsigned char *)(UART_BUFFER_BASE + 32))
#define TX_BUFFER2 ((unsigned char *)(UART_BUFFER_BASE + 48))
This gives you 16 byte buffers.
Then to use it:
unsigned char RX_buffer1 = RX_BUFFER1; or just use RX_BUFFER1 as a passing parameter to any function requiring an pointer for an argument.
now you can use RX_buffer1[i] to access location I in RX buffer 1;



