Interprocessor Communication
10-3
MPU/DSP Shared Peripherals
10.2 Interprocessor Communication
The MPU and DSP processors communicate with each other via a
mailbox-interrupt mechanism. This mechanism provides a very flexible
software protocol between the processors. The mailboxes are located in the
shared memory space (byte address 0xFFFC:E000 for MPU; word address
0x0F800 for DSP).
10.2.1 Mailbox Register Data Structure
There are four sets of mailbox registers: two for the MPU to send messages
and issue an interrupt to the DSP, the other two for the DSP to send messages
and issue an interrupt to the MPU. Each set of mailbox registers consists of
two 16-bit registers and a 1-bit flag register. The interrupting processor can use
one 16-bit register to pass a data word to the interrupted processor and the
other 16-bit register to pass a command word.
Table 10–1 shows the mailbox registers, and Figure 10–2 shows the interrupt
generating mechanism for the DSP-to-MPU scenario. The mechanism for
MPU-to-DSP interrupt generation uses identical hardware.
The data word from the interrupting processor is user-defined but can be an
address pointer or status information.
Upon writing to the command word processor, an interrupt is generated to the
other processor and the 1-bit flag register is set. Use of the data word is option-
al and at the discretion of the software, but the data word must always be writ-
ten before the command field. The ARM2DSP1 and ARMDSP2 interrupts are
registered as INT5 and INT19, respectively, in the DSP. The DSP2ARM1 and
DSP2ARM2 interrupts are mapped to the MPU level 1 interrupt handler as
IRQ10 and IRQ11, respectively.
The interrupted processor must acknowledge the interrupt by reading the data
word (if necessary) and the command word for the associated interrupt. The
interrupt is reset and the 1-bit flag register is cleared when the command word
is read by the interrupted processor. If software uses the data word, it must al-
ways read the data field prior to the command field.
The interrupts that are generated are level sensitive, and writing to the com-
mand register of any mailbox generates an interrupt. If the interrupt is masked
in the interrupt handler when the command register is written, no interrupt is
generated to the processor. However, the command flag for the particular mail-
box is set. If the interrupt is unmasked at a later time, an interrupt is generated
to the processor. Only the interrupting processor can read the corresponding
flag bit (that is, only MPU can read ARM2DSP1_FLAG. So if polling is used