PEB 20560
Functional Block Description
Semiconductor Group
2-116
2003-08
Data Transfer from the
μ
P to the OAK
The
μ
P tests the MBUSY bit.
The
μ
P writes to the data registers (optional).
The
μ
P writes to the
μ
P-command register (MCMD) (must be performed) - this write
sets automatically the
μ
P mailbox busy bit (MBUSY).
An OAK interrupt (INT2) is activated due to the write to the command register.
The OAK INT2 routine reads MCMD and performs the command (the read of the
command register stops the INT2 activation automatically).
If the command is asking for data (like a read of an OAK register), the interrupt routine
puts the data in the OAK
mailbox registers.
When finished, the INT2 routine resets MBUSY for enabling the
μ
P to send the next
command.
The
μ
P can write consecutive writes to the
μ
P mailbox and it’s up to the user to make
sure that the data has been transferred to the OAK correctly (the busy bit has been reset)
before writing new data to the
μ
P mailbox.
2.10.2
OAK Mailbox
The OAK mailbox includes:
Six general purpose 16-bit registers (ODTx)
An 8-bit command register (OCMD)
One bit busy register (OBUSY). All the registers can be written by the OAK and read
by the
μ
P.
A write of the OAK to the OAK mailbox command register generates an interrupt to the
μ
P (INT Source No.6). Therefore, when the user wants to transfer more data then the
command register must be written last.
A busy bit (OBUSY) which can be read by the OAK is set automatically after a write of
the OAK to the OAK command register and is reset by a direct
μ
P write to it (when the
μ
P has finished reading the OAK mail box contents).
Users can define own opcodes (up to 256 opcodes) for the transfer direction from the
OAK
to the
μ
P.
Data Transfer from the OAK to the
μ
P
The OAK tests the OBUSY bit.
The OAK writes to the data registers (optional).
The OAK writes to the command register (OCMD) (must be performed). This write
operation sets the OAK mailbox busy bit (OBUSY).
A
μ
P interrupt is activated due to the write operation to the command register.
The
μ
P reads the command register and performs the command.
If the command is asking for data (like a read of a
μ
P register), the interrupt routine
puts the data in the
μ
P
mailbox registers.