DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
F
T D
RAFT DR
AFT D
DRA
F
T DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
<Document ID> All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
User manual Rev. 00.05 — 18 May 2011 16 of 825
NXP Semiconductors
LPC4000
Chapter 2: LPC4000 Internal Process Communication (IPC)
2.3.3 Example
Assume a certain task with ID 0x1234 should be executed by the M0. For example, read
data from a register level interface controlled by the M0. Text in bold indicates a register.
The registers can either be located in the M0 SRAM, for more deterministic access times,
or in shared SRAM. If the M0 SRAM is used, then the register data needs to be copied at
initialization time. This copying takes time. The M4 can poll a status register to determine
when the transfer has finished.
The M4 initializes the command and message queues by loading the start- and end
addresses and write and read pointers.
Then the M4 loads the register values in a reserved area in common SRAM memory. (An
alternative approach is that the M4 writes register per register, however this requires more
communication overhead than loading all data in one go.)
Once all data has been set up, the M0 task can be started.
Table 5. Message list
Message Bit mask Description
MSG_SRV_ID 0xTTTT.SS00 M0 request servicing for the task with ID =
0xTTTT. The service type is coded in bytes SS.
The meaning of SS is proprietary per task.
SS=0x00 means the task has finished.
MSG_RD_ID 0xTTTT.PPP1, VALUE M0 responds with VALUE to a read of WORD
with argument ID=0xPPP* from the task with ID
= 0xTTTT.
MSG_RD_STS_ID 0xTTTT.PPPR M0 response to a read of WORD with argument
ID=0xPPP* from the task with ID = 0xTTTT fails.
Cause of the failure is coded in R; R = 2...4
2 = invalid argument
3 = reserved
4 = reserved
MSG_WR_STS_ID 0xTTTT.PPPW M0 response to a write with argument
ID=0xPPP* from the task with ID = 0xTTTT.
Response is coded in W; W = 5...7
5 = write was successful
6 = write failed
7 = reserved
Table 6. Command responses
Command Possible responses Description
CMD_RD_ID MSG_RD_ID, VALUE read acknowledged
MSG_RD_STS_ID read failed
CMD_WR, WORD MSG_WR_STS_ID write is acknowledged as a success or failure