Receive data from either CPU
Embedded Coder Support Package for Texas Instruments C2000 Processors / F2837xD
CPU1 transmits data to its allocated memory (CPU1-to-CPU2 Message RAM) and receives data from the allocated memory of CPU2 (CPU2-to-CPU1 Message RAM). CPU2 transmits data to CPU2-to-CPU1 Message RAM and receives data from CPU1-to-CPU2 Message RAM.
A hardware interrupt block can be used along with the IPC Receive block
for receiving data based on hardware interrupts. Channels 0, 1, 2, and 3 are configured for
hardware interrupts — IPC0, IPC1, IPC2, and IPC3. These hardware interrupts can be set in
the hardware interrupt block using these parameters: CPU interrupt
1 and PIE interrupt numbers
Out— IPC receive
Data read from the other CPU.
Status— IPC receive status
The status port outputs one of these values:
0 — No errors
1 — Data not available
2 — Data type mismatch
3 — Data length mismatch
Channel— Channel selected to receive data
0(default) | 0–31
The channel at which you want to receive data. Each channel is a separate memory location in the shared memory.
The transmitter and receiver have 32 channels each to transmit and receive data. For data transmission and reception, the transmitter and receiver must be set to the same channel number.
Data type— Type of data to be received
uint16(default) | single | int8 | uint8 | int16 | int32 | uint32 | boolean
The type of data the block receives.
Vector data is stored in the global shared RAM, and the address of the data is stored in the MSGRAM.
Data length— Size of data to be received
1(default) | positive integer
The number of data units received at each sample time. If the data length is 1, the block interprets each incoming piece of data as a scalar value; if the data length is greater than 1, the block interprets each incoming piece of data as a vector with length equal to Data length. The maximum size for scalar and vector data is 32 bits.
Enable blocking— Specify if CPU must wait to read data
off(default) | on
When enabled, the CPU waits until data is available from the other CPU.
Sample time— Interval at which block reads data
–1| positive scalar
The time between data samples, measured in seconds. When you set this parameter to
-1, Simulink® determines the best sample time for the block based on the block context
within the model.