![](http://datasheet.mmic.net.cn/380000/-PD98405_datasheet_16745025/-PD98405_124.png)
CHAPTER 5 SAR FUNCTION
124
5.3 SETTING A MAILBOX
5.3.1 Setting a Mailbox
A mailbox is an area prepared by the host in system memory, that is used to store indications issued by the
μ
PD98405. Such indications consist of the status information that the
μ
PD98405 issues for each
transmit/receive packet. For details of the contents of the transmit/receive indication, see
Section 5.6
.
The
μ
PD98405 can support up to four mailboxes, using two each for transmission and reception. The four
mailboxes are assigned numbers 0 to 3. These numbers identify whether the mailboxes are for transmission or
reception (it is not always necessary to use all four of the mailboxes).
Receive mailboxes:
numbers 0 and 1
Transmit mailboxes:
numbers 2 and 3
The
μ
PD98405 uses the mailboxes as ring buffers in system memory. These buffers are defined by the
following addresses.
Mailbox start address high (MSH): High-order 16 bits of the starting address of a mailbox
Mailbox start address low (MSL):
Low-order 16 bits of the starting address of a mailbox
Mailbox bottom address (MBA):
Low-order 16 bits of the address next to the last address of a mailbox
Mailbox write address (MWA):
Low-order 16 bits of the write pointer managed by the
μ
PD98405
Mailbox tail address (MTA):
Low-order 16 bits of the address that is updated to the location read
by the host
All mailbox pointers consist of 16 bits. The
μ
PD98405 creates 32-bit addresses by concatenating the
pointers with the high-order 16 bits of a mailbox start address. Each mailbox can consist of a maximum of "64K
bytes - one indication". All mailbox pointers are located in the direct address registers of the
μ
PD98405. The
host sets the initial value of each mailbox pointer in a register before starting transmission/reception. The initial
values of MWA and MTA are set in the same manner as MSL.
Cautions 1. A receive indication consists of four words. The size of a receive mailbox must, therefore,
be a multiple of four words.
2. Do not set the same value in both MSL and MBA. If an attempt is made to use the entire
64K-byte area of a mailbox with MSL set to "0000H", MBA will be "0000H" because it exists
at the address next to the last address. To use the entire 64K bytes of a mailbox, therefore,
specify one indication less than 64K bytes for MBA.
Transmission: FFFCH, reception: FFF0H