I am writing code for a serial communication gateway using MSP430F2619 with Code Composer Studio 6.1.
The gateway has two different modes of operation:
Wizard , this is the default mode. He will interrogate the data as a bus master on the RS485 bus, and then send it to another board with a different protocol.
Slave in which it responds to the PC application on the serial port.
The program will either be in master or slave mode, since the same RS-485 bus is used in conjunction with a PC and other slave boards.
Instead of using 2 different memory buffers for each mode, I am trying to figure out if the same physical memory can be used by both buffers.
I tried searching the Composer Studio memory overlap function without success.
Essentially, I have this:
char Slaverxbuffer[2048]; char Masterrxbuffer[2048];
I want both of these buffers to have shared memory, so I will use 2 KB of memory instead of 4 KB.
I need a way for Slaverxbuffer and Masterrxbuffer use the same memory area, something like:
char Sharedbuffer[2048];
prasad
source share