Public Version
www.ti.com
IPC Mailbox Functional Description
14.3.2 Mailbox Assignment
14.3.2.1 Description
To assign a receiver to a mailbox, set the new message interrupt enable bit corresponding to the desired
mailbox in the MAILBOX.
register. The receiver reads the
MAILBOX.
register to retrieve a message from the mailbox.
An alternate method for the receiver that does not use the interrupts is to poll the
MAILBOX.
and/or MAILBOX.
registers to know
when to send or retrieve a message to or from the mailbox. This method does not require assigning a
receiver to a mailbox. Because this method does not include the explicit assignment of the mailbox, the
software must avoid having multiple receivers use the same mailbox, which can result in incoherency.
To assign a sender to a mailbox, set the queue-not-full interrupt enable bit of the desired mailbox in the
MAILBOX.
register, where u is the number of the receiving user. However,
direct allocation of a mailbox to a sender is not recommended because it can cause the sending processor
to be constantly interrupted.
It is recommended that register polling be used to:
•
Check the status of either the MAILBOX.
or
registers
•
Write the message to the corresponding MAILBOX.
register, if space is
available.
The sender should use the queue-not-full interrupt when the initial mailbox status check indicates the
mailbox is full. In this case, the sender can enable the queue-not-full interrupt for its mailbox in the
appropriate MAILBOX.
register. This allows the sender to be notified by
interrupt only when a FIFO queue has at least one available entry.
Reading the MAILBOX.
register determines the status of the new message and
the queue-not-full interrupts for a particular user. Writing 1 to the corresponding bit in the same register
location acknowledges, and subsequently clears, an interrupt.
CAUTION
Assigning multiple senders or multiple receivers to the same mailbox is not
recommended.
14.3.3 Sending and Receiving Messages
14.3.3.1 Description
When a 32-bit message is written to the MAILBOX.
register, the message is
appended into the FIFO queue. This queue holds four messages. If the queue is full, the message is
discarded.
Queue overflow can be avoided by first reading the MAILBOX.
register to
check that the mailbox message queue is not full before writing a new message to it.
Reading the MAILBOX.
register returns the message at the beginning of the
FIFO queue and removes it from the queue. If the FIFO queue is empty when the
MAILBOX.
register is read, the value 0 is returned.
The new message interrupt is asserted when at least one message is in the mailbox message FIFO
queue. To determine the number of messages in the mailbox message FIFO queue, read the
MAILBOX.
register.
2651
SWPU177N – December 2009 – Revised November 2010
Interprocessor Communication
Copyright © 2009–2010, Texas Instruments Incorporated