跳到主要内容

16.6 Mailbox

16.6.1 Overview

The Mailbox module provides an inter-OS communication mechanism on the chip. The module is implemented with multi-channel FIFOs and interrupts. The sender writes data into the FIFO of a mailbox channel, and an interrupt notifies the receiver to read the data. Each channel has an independent FIFO and configurable threshold, and the transfer direction of each channel can be configured flexibly.

16.6.2 Features

The Mailbox module provides the following features:

  • 16 channels for mailbox_ns and 8 channels for mailbox_s, with each channel providing an 8 × 32-bit FIFO
  • Each channel supports empty and not-full interrupt events
  • Independent empty and not-full interrupt thresholds for each channel
  • Configurable transfer direction for each channel

16.6.3 Functional Description

The Mailbox module enables point-to-point communication between different operating systems running on the chip. The design is parameterizable and supports up to 16 mailbox instances and 8 users. In the current chip configuration, two users are supported, corresponding to the Secure and Non-secure domains, with 16 mailbox channels for the Non-secure domain and 8 mailbox channels for the Secure domain. Each mailbox channel provides a FIFO with a depth of 8 × 32-bit words. The mapping between mailbox channels and users is defined by software. Using the default configuration as an example:

  • Channel 0 and Channel 1 are used for messages from User0 to User1.
  • Channel 2 and Channel 3 are conventionally used for messages from User1 to User0.

There are no hardware restrictions on channel assignment. If message traffic is asymmetric between users, software can allocate mailbox channels accordingly.

16.6.4 Registers

Register NameTypeRegister Width (Bits)Address Offset
MAILBOX_REVISIONR320x000
MAILBOX_SYSCONFIGR/W1C320x010
MAILBOX_MESSAGE_mR/W320x040 + (0x4 * m)
MAILBOX_FIFOSTATUS_mR/W1C320x080 + (0x4 * m)
MAILBOX_MSGSTATUS_mR/W1C320x0C0 + (0x4 * m)
MAILBOX_IRQSTATUS_RAW_uR/W1S320x100 + (0x10 * u)
MAILBOX_IRQSTATUS_CLR_uR/W1C320x104 + (0x10 * u)
MAILBOX_IRQENABLE_SET_uR/W1S320x108 + (0x10 * u)
MAILBOX_IRQENABLE_CLR_uR/W1C320x10C + (0x10 * u)
MAILBOX_IRQTHR0_uR/W320x180 + (0x10 * u)
MAILBOX_IRQTHR1_uR/W320x184 + (0x10 * u)
MAILBOX_IRQTHR2_uR/W320x188 + (0x10 * u)
MAILBOX_IRQTHR3_uR/W320x18C + (0x10 * u)

16.6.4.1 Register Description

MAILBOX_REVISION

Offset: 0x0000

BitsFieldTypeResetDescription
31:0REVISIONR0xAAAA_5555Mailbox version, used to verify that the bus is connected correctly

MAILBOX_SYSCONFIG

Each bit represents one mailbox instance. Writing 1 to the corresponding bit clears the FIFO of that mailbox instance.

Offset: 0x0010

BitsFieldTypeResetDescription
31:16RSVDRO0x0Reserved for future use.
15FIFO_CLR_15R/W1C0x0Mailbox 15 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
14FIFO_CLR_14R/W1C0x0Mailbox 14 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
13FIFO_CLR_13R/W1C0x0Mailbox 13 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
12FIFO_CLR_12R/W1C0x0Mailbox 12 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
11FIFO_CLR_11R/W1C0x0Mailbox 11 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
10FIFO_CLR_10R/W1C0x0Mailbox 10 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
9FIFO_CLR_9R/W1C0x0Mailbox 9 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
8FIFO_CLR_8R/W1C0x0Mailbox 8 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
7FIFO_CLR_7R/W1C0x0Mailbox 7 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
6FIFO_CLR_6R/W1C0x0Mailbox 6 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
5FIFO_CLEAR_5R/W1C0x0Mailbox 5 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
4FIFO_CLEAR_4R/W1C0x0Mailbox 4 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
3FIFO_CLEAR_3R/W1C0x0Mailbox 3 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
2FIFO_CLEAR_2R/W1C0x0Mailbox 2 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
1FIFO_CLEAR_1R/W1C0x0Mailbox 1 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear
0FIFO_CLEAR_0R/W1C0x0Mailbox 0 FIFO clear
Read 0: FIFO clear is complete
Write 0: No action
Read 1: FIFO clear is not complete
Write 1: Perform FIFO clear

MAILBOX_MESSAGE_m

Offset: 0x0040 + (0x4 * m)

This register stores messages and operates on the FIFO. m ranges from 0 to 15. Before accessing this register, software must confirm the FIFO status through MAILBOX_FIFOSTATUS_m or MAILBOX_MSGSTATUS_m.

BitsFieldTypeResetDescription
31:0MESSAGER/W0x0Message data in mailbox m

MAILBOX_FIFOSTATUS_m

Offset: 0x0080 + (0x4 * m)

This register provides FIFO status flags. Bit [28] records a previous write-full event, and bit [29] records a previous read-empty event. These flags are cleared by writing 1.

BitsFieldTypeResetDescription
31:30RSVDR0x0Reserved
29RD_EMPTY_FLAGR/W1C0x0Mailbox m read-empty flag
This bit is set when mailbox m is read while empty
28WR_FULL_FLAGR/W1C0x0Mailbox m write-full flag
This bit is set when mailbox m is written while full
27:2RSVDR0x0Reserved
1EMPTY_STATUSR0x1Mailbox m empty status
1: Empty
0: Not empty
0FULL_STATUSR0x0Mailbox m full status
1: Full
0: Not full

MAILBOX_MSGSTATUS_m

Offset: 0x00C0 + (0x4 * m)

This register records the number of data words currently stored in the FIFO. Bits [29:28] have the same function as in MAILBOX_FIFOSTATUS_m and are set and cleared in the same manner.

BitsFieldTypeResetDescription
31:30RSVDR0x0Reserved
29RD_EMPTY_FLAGR/W1C0x0Mailbox m read-empty flag
This bit is set when mailbox m is read while empty
28WR_FULL_FLAGR/W1C0x0Mailbox m write-full flag
This bit is set when mailbox m is written while full
27:4RSVDR0x0Reserved
3:0MSG_COUNTR0x0Number of messages in mailbox m (0 to 8)

MAILBOX_IRQSTATUS_RAW_u

Offset: 0x0100 + (0x10 * u)

Interrupt status register, including Not Full interrupt status and New Message interrupt status. The Not Full interrupt indicates that the FIFO is not full; that is, under the current configuration, the number of data words in the FIFO is less than 8. The New Message interrupt indicates that the FIFO is not empty; that is, the number of data words in the FIFO is between 1 and 7. This register cannot be cleared by software. It can be set manually to 1 for debugging purposes.

BitsFieldTypeResetDescription
31NOT_FULL_15R/W1S0x0Not full status of mailbox 15
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
30NEW_MSG_15R/W1S0x0New message status of mailbox 15
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
29NOT_FULL_14R/W1S0x0Not full status of mailbox 14
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
28NEW_MSG_14R/W1S0x0New message status of mailbox 14
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
27NOT_FULL_13R/W1S0x0Not full status of mailbox 13
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
26NEW_MSG_13R/W1S0x0New message status of mailbox 13
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
25NOT_FULL_12R/W1S0x0Not full status of mailbox 12
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
24NEW_MSG_12R/W1S0x0New message status of mailbox 12
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
23NOT_FULL_11R/W1S0x0Not full status of mailbox 11
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
22NEW_MSG_11R/W1S0x0New message status of mailbox 11
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
21NOT_FULL_10R/W1S0x0Not full status of mailbox 10
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
20NEW_MSG_10R/W1S0x0New message status of mailbox 10
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
19NOT_FULL_9R/W1S0x0Not full status of mailbox 9
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
18NEW_MSG_9R/W1S0x0New message status of mailbox 9
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
17NOT_FULL_8R/W1S0x0Not full status of mailbox 8
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
16NEW_MSG_8R/W1S0x0New message status of mailbox 8
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
15NOT_FULL_7R/W1S0x0Not full status of mailbox 7
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
14NEW_MSG_7R/W1S0x0New message status of mailbox 7
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
13NOT_FULL_6R/W1S0x0Not full status of mailbox 6
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
12NEW_MSG_6R/W1S0x0New message status of mailbox 6
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
11NOT_FULL_5R/W1S0x0Not full status of mailbox 5
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
10NEW_MSG_5R/W1S0x0New message status of mailbox 5
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
9NOT_FULL_4R/W1S0x0Not full status of mailbox 4
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
8NEW_MSG_4R/W1S0x0New message status of mailbox 4
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
7NOT_FULL_3R/W1S0x0Not full status of mailbox 3
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
6NEW_MSG_3R/W1S0x0New message status of mailbox 3
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
5NOT_FULL_2R/W1S0x0Not full status of mailbox 2
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
4NEW_MSG_2R/W1S0x0New message status of mailbox 2
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
3NOT_FULL_1R/W1S0x0Not full status of mailbox 1
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
2NEW_MSG_1R/W1S0x0New message status of mailbox 1
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
1NOT_FULL_0R/W1S0x0Not full status of mailbox 0
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
0NEW_MSG_0R/W1S0x0New message status of mailbox 0
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)

MAILBOX_IRQSTATUS_CLR_u

Offset: 0x0104 + (0x10 * u)

Interrupt status clear register. Writing 1 to a bit in this register clears the corresponding interrupt status.

BitsFieldTypeResetDescription
31NOT_FULL_15R/W1C0x0Not full status of mailbox 15
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
30NEW_MSG_15R/W1C0x0New message status of mailbox 15
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
29NOT_FULL_14R/W1C0x0Not full status of mailbox 14
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
28NEW_MSG_14R/W1C0x0New message status of mailbox 14
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
27NOT_FULL_13R/W1C0x0Not full status of mailbox 13
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
26NEW_MSG_13R/W1C0x0New message status of mailbox 13
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
25NOT_FULL_12R/W1C0x0Not full status of mailbox 12
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
24NEW_MSG_12R/W1C0x0New message status of mailbox 12
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
23NOT_FULL_11R/W1C0x0Not full status of mailbox 11
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
22NEW_MSG_11R/W1C0x0New message status of mailbox 11
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
21NOT_FULL_10R/W1C0x0Not full status of mailbox 10
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
20NEW_MSG_10R/W1C0x0New message status of mailbox 10
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
19NOT_FULL_9R/W1C0x0Not full status of mailbox 9
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
18NEW_MSG_9R/W1C0x0New message status of mailbox 9
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
17NOT_FULL_8R/W1C0x0Not full status of mailbox 8
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
16NEW_MSG_8R/W1C0x0New message status of mailbox 8
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
15NOT_FULL_7R/W1C0x0Not full status of mailbox 7
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
14NEW_MSG_7R/W1C0x0New message status of mailbox 7
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
13NOT_FULL_6R/W1C0x0Not full status of mailbox 6
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
12NEW_MSG_6R/W1C0x0New message status of mailbox 6
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
11NOT_FULL_5R/W1C0x0Not full status of mailbox 5
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
10NEW_MSG_5R/W1C0x0New message status of mailbox 5
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
9NOT_FULL_4R/W1C0x0Not full status of mailbox 4
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
8NEW_MSG_4R/W1C0x0New message status of mailbox 4
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
7NOT_FULL_3R/W1C0x0Not full status of mailbox 3
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
6NEW_MSG_3R/W1C0x0New message status of mailbox 3
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
5NOT_FULL_2R/W1C0x0Not full status of mailbox 2
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
4NEW_MSG_2R/W1C0x0New message status of mailbox 2
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)
3NOT_FULL_1R/W1C0x0Not full status of mailbox 1
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: clear the event (for debug)
2NEW_MSG_1R/W1C0x0New message status of mailbox 1
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: set the event (for debug)
1NOT_FULL_0R/W1C0x0Not full status of mailbox 0
• Read 0: No event (message queue full)
• Write 0: no action
• Read 1: event pending (message queue not full)
• Write 1: set the event (for debug)
0NEW_MSG_0R/W1C0x0New message status of mailbox 0
• Read 0: No event (Message)
• Write 0: no action
• Read 1: Event (message) pending
• Write 1: clear the event (for debug)

MAILBOX_IRQENABLE_SET_u

Offset: 0x0108 + (0x10 * u)

Interrupt enable register. It specifies which mailbox interrupts are received by the corresponding user. Writing 1 sets the corresponding enable bit.

BitsFieldTypeResetDescription
31NOT_FULL_EN_15R/W1S0x0Not full interrupt enable of mailbox 15
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
30NEW_MSG_EN_15R/W1S0x0New message interrupt enable of mailbox 15
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
29NOT_FULL_EN_14R/W1S0x0Not full interrupt enable of mailbox 14
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
28NEW_MSG_EN_14R/W1S0x0New message interrupt enable of mailbox 14
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
27NOT_FULL_EN_13R/W1S0x0Not full interrupt enable of mailbox 13
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
26NEW_MSG_EN_13R/W1S0x0New message interrupt enable of mailbox 13
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
25NOT_FULL_EN_12R/W1S0x0Not full interrupt enable of mailbox 12
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
24NEW_MSG_EN_12R/W1S0x0New message interrupt enable of mailbox 12
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
23NOT_FULL_EN_11R/W1S0x0Not full interrupt enable of mailbox 11
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
22NEW_MSG_EN_11R/W1S0x0New message interrupt enable of mailbox 11
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
21NOT_FULL_IE_10R/W1S0x0Not full interrupt enable of mailbox 10
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
20NEW_MSG_IE_10R/W1S0x0New message interrupt enable of mailbox 10
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
19NOT_FULL_IE_9R/W1S0x0Not full interrupt enable of mailbox 9
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
18NEW_MSG_IE_9R/W1S0x0New message interrupt enable of mailbox 9
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
17NOT_FULL_IE_8R/W1S0x0Not full interrupt enable of mailbox 8
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
16NEW_MSG_IE_8R/W1S0x0New message interrupt enable of mailbox 8
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
15NOT_FULL_IE_7R/W1S0x0Not full interrupt enable of mailbox 7
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
14NEW_MSG_IE_7R/W1S0x0New message interrupt enable of mailbox 7
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
13NOT_FULL_IE_6R/W1S0x0Not full interrupt enable of mailbox 6
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
12NEW_MSG_IE_6R/W1S0x0New message interrupt enable of mailbox 6
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
11NOT_FULL_IE_5R/W1S0x0Not full interrupt enable of mailbox 5
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
10NEW_MSG_IE_5R/W1S0x0New message interrupt enable of mailbox 5
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
9NOT_FULL_IE_4R/W1S0x0Not full interrupt enable of mailbox 4
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
8NEW_MSG_IE_4R/W1S0x0New message interrupt enable of mailbox 4
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
7NOT_FULL_IE_3R/W1S0x0Not full interrupt enable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
6NEW_MSG_IE_3R/W1S0x0New message interrupt enable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
5NOT_FULL_IE_2R/W1S0x0Not full interrupt enable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
4NEW_MSG_IE_2R/W1S0x0New message interrupt enable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
3NOT_FULL_IE_1R/W1S0x0Not full interrupt enable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
2NEW_MSG_IE_1R/W1S0x0New message interrupt enable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
1NOT_FULL_IE_0R/W1S0x0Not full interrupt enable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt
0NEW_MSG_IE_0R/W1S0x0New message interrupt enable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: enable interrupt

MAILBOX_IRQENABLE_CLR_u

Offset: 0x010C + (0x10 * u)

This register clears interrupt enables. Writing 1 clears the corresponding enable bit.

BitsFieldTypeResetDescription
31NOT_FULL_DIS_3R/W1C0x0Not full interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
30NEW_MSG_DIS_3R/W1C0x0New message interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
29NOT_FULL_DIS_2R/W1C0x0Not full interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
28NEW_MSG_DIS_2R/W1C0x0New message interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
27NOT_FULL_DIS_1R/W1C0x0Not full interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
26NEW_MSG_DIS_1R/W1C0x0New message interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
25NOT_FULL_DIS_0R/W1C0x0Not full interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
24NEW_MSG_DIS_0R/W1C0x0New message interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
23NOT_FULL_DIS_3_2R/W1C0x0Not full interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
22NEW_MSG_DIS_3_2R/W1C0x0New message interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
21NOT_FULL_DIS_2R/W1C0x0Not full interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
20NEW_MSG_DIS_2R/W1C0x0New message interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
19NOT_FULL_DIS_1R/W1C0x0Not full interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
18NEW_MSG_DIS_1R/W1C0x0New message interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
17NOT_FULL_DIS_0R/W1C0x0Not full interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
16NEW_MSG_DIS_0R/W1C0x0New message interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
15NOT_FULL_DIS_3R/W1C0x0Not full interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
14NEW_MSG_DIS_3R/W1C0x0New message interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
13NOT_FULL_DIS_2R/W1C0x0Not full interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
12NEW_MSG_DIS_2R/W1C0x0New message interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
11NOT_FULL_DIS_1R/W1C0x0Not full interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action 
• Read 1: interrupt enabled 
• Write 1: disable interrupt
10NEW_MSG_DIS_1R/W1C0x0New message interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
9NOT_FULL_DIS_0R/W1C0x0Not full interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
8NEW_MSG_DIS_0R/W1C0x0New message interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
7NOT_FULL_DIS_3R/W1C0x0Not full interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
6NEW_MSG_DIS_3R/W1C0x0New message interrupt disable of mailbox 3
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
5NOT_FULL_DIS_2R/W1C0x0Not full interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
4NEW_MSG_DIS_2R/W1C0x0New message interrupt disable of mailbox 2
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
3NOT_FULL_DIS_1R/W1C0x0Not full interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
2NEW_MSG_DIS_1R/W1C0x0New message interrupt disable of mailbox 1
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
1NOT_FULL_DIS_0R/W1C0x0Not full interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action
• Read 1: interrupt enabled
• Write 1: disable interrupt
0NEW_MSG_DIS_0R/W1C0x0New message interrupt disable of mailbox 0
• Read 0: Interrupt disabled
• Write 0: no action 
• Read 1: interrupt enabled 
• Write 1: disable interrupt |

MAILBOX_IRQTHR0_u

Offset: 0x0180 + (0x10 * u)

Interrupt threshold register. A Not Full interrupt is generated when the Not Full interrupt is enabled and the number of data words in the FIFO is less than the configured Not Full threshold. A New Message interrupt is generated when the New Message interrupt is enabled and the number of data words in the FIFO is greater than the configured New Message threshold. The threshold mechanism is provided to avoid excessive interrupt generation.

BitsFieldTypeResetDescription
31:28M3_NOT_FULL_THR/W0x8Mailbox 3 not full interrupt threshold of user u
m3 not full is generated, only when num of messages in m3 < [31:28]
27:24M3_NEW_MSG_THR/W0x0Mailbox 3 new message interrupt threshold of user u
m3 new message is generated, only when num of messages in m3 > [27:24]
23:20M2_NOT_FULL_THR/W0x8Mailbox 2 not full interrupt threshold of user u
m2 not full is generated, only when num of messages in m2 < [23:20]
19:16M2_NEW_MSG_THR/W0x0Mailbox 2 new message interrupt threshold of user u
m2 new message is generated, only when num of messages in m2 > [19:16]
15:12M1_NOT_FULL_THR/W0x8Mailbox 1 not full interrupt threshold of user u
m1 not full is generated, only when num of messages in m1 < [15:12]
11:8M1_NEW_MSG_THR/W0x0Mailbox 1 new message interrupt threshold of user u
m1 new message is generated, only when num of messages in m1 > [11:8]
7:4M0_NOT_FULL_THR/W0x8Mailbox 0 not full interrupt threshold of user u
m0 not full is generated, only when num of messages in m0 < [7:4]
3:0M0_NEW_MSG_THR/W0x0Mailbox 0 new message interrupt threshold of user u
m0 new message is generated, only when num of messages in m0 > [3:0]

MAILBOX_IRQTHR1_u

Offset: 0x0184 + (0x10 * u)

BitsFieldTypeResetDescription
31:28M7_NOT_FULL_THR/W0x8Mailbox 7 not full interrupt threshold of user u
m7 not full is generated, only when num of messages in m7 < [31:28]
27:24M7_NEW_MSG_THR/W0x0Mailbox 7 new message interrupt threshold of user u
m7 new message is generated, only when num of messages in m7 > [27:24]
23:20M6_NOT_FULL_THR/W0x8Mailbox 6 not full interrupt threshold of user u
m6 not full is generated, only when num of messages in m6 < [23:20]
19:16M6_NEW_MSG_THR/W0x0Mailbox 6 new message interrupt threshold of user u
m6 new message is generated, only when num of messages in m6 > [19:16]
15:12M5_NOT_FULL_THR/W0x8Mailbox 5 not full interrupt threshold of user u
m5 not full is generated, only when num of messages in m5 < [15:12]
11:8M5_NEW_MSG_THR/W0x0Mailbox 5 new message interrupt threshold of user u
m5 new message is generated, only when num of messages in m5 > [11:8]
7:4M4_NOT_FULL_THR/W0x8Mailbox 4 not full interrupt threshold of user u
m4 not full is generated, only when num of messages in m4 < [7:4]
3:0M4_NEW_MSG_THR/W0x0Mailbox 4 new message interrupt threshold of user u
m4 new message is generated, only when num of messages in m4 > [3:0]

MAILBOX_IRQTHR2_u

Offset: 0x0188 + (0x10 * u)

BitsFieldTypeResetDescription
31:28M11_NOT_FULL_THR/W0x8Mailbox 11 not full interrupt threshold of user u
m11 not full is generated, only when num of messages in m11 < [31:28]
27:24M11_NEW_MSG_THR/W0x0Mailbox 11 new message interrupt threshold of user u
m11 new message is generated, only when num of messages in m11 > [27:24]
23:20M10_NOT_FULL_THR/W0x8Mailbox 10 not full interrupt threshold of user u
m10 not full is generated, only when num of messages in m10 < [23:20]
19:16M10_NEW_MSG_THR/W0x0Mailbox 10 new message interrupt threshold of user u
m10 new message is generated, only when num of messages in m10 > [19:16]
15:12M9_NOT_FULL_THR/W0x8Mailbox 9 not full interrupt threshold of user u
m9 not full is generated, only when num of messages in m9 < [15:12]
11:8M9_NEW_MSG_THR/W0x0Mailbox 9 new message interrupt threshold of user u
m9 new message is generated, only when num of messages in m9 > [11:8]
7:4M8_NOT_FULL_THR/W0x8Mailbox 8 not full interrupt threshold of user u
m8 not full is generated, only when num of messages in m8 < [7:4]
3:0M8_NEW_MSG_THR/W0x0Mailbox 8 new message interrupt threshold of user u
m8 new message is generated, only when num of messages in m8 > [3:0]

MAILBOX_IRQTHR3_u

Offset: 0x018C + (0x10 * u)

BitsFieldTypeResetDescription
31:28M15_NOT_FULL_THR/W0x8Mailbox 15 not full interrupt threshold of user u
m15 not full is generated, only when num of messages in m15 < [31:28]
27:24M15_NEW_MSG_THR/W0x0Mailbox 15 new message interrupt threshold of user u
m15 new message is generated, only when num of messages in m15 > [27:24]
23:20M14_NOT_FULL_THR/W0x8Mailbox 14 not full interrupt threshold of user u
m14 not full is generated, only when num of messages in m14 < [23:20]
19:16M14_NEW_MSG_THR/W0x0Mailbox 14 new message interrupt threshold of user u
m14 new message is generated, only when num of messages in m14 > [19:16]
15:12M13_NOT_FULL_THR/W0x8Mailbox 13 not full interrupt threshold of user u
m13 not full is generated, only when num of messages in m13 < [15:12]
11:8M13_NEW_MSG_THR/W0x0Mailbox 13 new message interrupt threshold of user u
m13 new message is generated, only when num of messages in m13 > [11:8]
7:4M12_NOT_FULL_THR/W0x8Mailbox 12 not full interrupt threshold of user u
m12 not full is generated, only when num of messages in m12 < [7:4]
3:0M12_NEW_MSG_THR/W0x0Mailbox 12 new message interrupt threshold of user u
m12 new message is generated, only when num of messages in m12 > [3:0]

16.6.5 Programming Model

16.6.5.1 Mailbox New Message Interrupt

[User0 sends messages to User1]

  1. User1 enables the New Message interrupt for Mailbox0 by writing 0x1 to MAILBOX_IRQENABLE_SET_1[1:0], and then waits for the interrupt.
  2. Before sending messages, User0 checks the status of Mailbox0:
    • MAILBOX_FIFOSTATUS_0[0] != 1, or
    • MAILBOX_MSGSTATUS_0[3:0] < 0x8.
  3. User0 writes one or more messages to MAILBOX_MESSAGE_0, ensuring that the FIFO does not overflow.
  4. After the first message is written, the FIFO contains data. If no interrupt threshold is configured, User1 receives an interrupt (MAILBOX_IRQSTATUS_RAW_1[0] = 1).
  5. In the interrupt service routine:
    • Clear the New Message interrupt enable and interrupt status for Mailbox0.
    • Read MAILBOX_MSGSTATUS_0[3:0] to obtain the number of messages in the FIFO.
    • Repeatedly read MAILBOX_MESSAGE_0 until all messages have been retrieved.
  6. After all messages have been processed, re-enable the interrupt. The message transfer is then complete.

[User1 sends messages to User0]

The procedure is the same as in [User0 sends messages to User1], except that the corresponding registers are different.

16.6.5.2 Mailbox Not Full Interrupt

[User0 sends multiple messages to User1]

When the message length exceeds 8 × 32-bit words, the FIFO may become full. In this case, User0 waits for a Not Full interrupt, which is triggered after User1 reads data, before continuing to send messages.

  1. According to the channel assignment, User0 uses Mailbox1 to send messages to User1. Before writing, User0 checks MAILBOX_MSGSTATUS_1[3:0] to ensure that the Mailbox1 FIFO is not full. User0 then writes multiple messages to MAILBOX_MESSAGE_1 until the FIFO becomes full.
  2. If User1 is slow to read messages or is busy with other tasks, User0 may perform other operations while waiting for User1 to read data from the FIFO. Once space becomes available, a Not Full interrupt is generated. To receive this interrupt, User0 writes 2'b10 to MAILBOX_IRQENABLE_SET_0[3:2] to enable the Not Full interrupt from Mailbox1. After the interrupt occurs, User0 can resume sending messages.
  3. After User1 reads messages from the FIFO, User0 receives the interrupt. User0 checks MAILBOX_IRQSTATUS_RAW_0 to confirm that the interrupt is the Not Full event from Mailbox1, and then continues sending messages to the mailbox.

The procedure for testing Not Full interrupts between other CPUs is similar.

16.6.5.3 Mailbox Interrupt Thresholds

[Not Full Interrupt Threshold]

Due to possible performance differences between User0 and User1, for example, User0 running at 2 GHz and User1 at 200 MHz, when User0 sends a large amount of data to User1, the slower read rate of User1 may cause frequent Not Full interrupts on User0. To mitigate this issue, a Not Full interrupt threshold register is provided.

  1. According to the channel assignment, User0 can use Mailbox0 to send messages to User1. Before writing, User0 reads MAILBOX_MSGSTATUS_0[3:0] to ensure that the Mailbox0 FIFO is not full, and then writes multiple messages to MAILBOX_MESSAGE_0 until the FIFO becomes full.
  2. User0 writes 0x4 to MAILBOX_IRQTHR_0[7:4], which means a Not Full interrupt is triggered only when the number of entries in Mailbox0 drops below 4 × 32-bit words. User0 then writes 2'b10 to MAILBOX_IRQENABLE_SET_0[1:0] to enable the Not Full interrupt from Mailbox0 to User0.
  3. When User1 reads messages, if the number of entries in Mailbox0 becomes smaller than the configured threshold, User0 receives the interrupt. User0 checks MAILBOX_IRQSTATUS_RAW_0 to confirm that the interrupt is the Not Full interrupt from Mailbox0, and then continues sending messages to the mailbox.

[New Message Interrupt Threshold]

Similarly, when User1 sends messages to User0, User1 may write messages relatively slowly while User0 reads them quickly. In this case, a New Message interrupt may be triggered immediately after each write, causing frequent interrupts and allowing User0 to read only one message at a time. To avoid this issue, a New Message interrupt threshold register is provided.

  1. User0 writes 0x4 to MAILBOX_IRQTHR_0[19:16], which means a New Message interrupt is generated only when Mailbox2 contains at least 5 × 32-bit words. User0 then writes 2'b01 to MAILBOX_IRQENABLE_SET_0[5:4] to enable the New Message interrupt from Mailbox2 to User0.
  2. According to the channel assignment, User1 can use Mailbox2 to send messages to User0. Before writing, User1 reads MAILBOX_MSGSTATUS_2[3:0] to ensure that the Mailbox2 FIFO is not full, and then writes multiple messages to MAILBOX_MESSAGE_2 until the FIFO becomes full.
  3. User1 continues writing messages until the number of entries in Mailbox2 exceeds the configured threshold. At this point, User0 receives the New Message interrupt, checks MAILBOX_IRQSTATUS_RAW_0 to confirm that the interrupt originates from Mailbox2, and reads MAILBOX_MESSAGE_2 to retrieve the messages.