
CHAPTER 5 SAR FUNCTION
242
(2) Lock flag (multi-host system support)
Bit 30 (L bit) of the command register is used in a multi-host system, in which the
μ
PD98405 is controlled
by more than one host CPU. The L bit functions as a lock flag to prevent each of the hosts from writing a
command for which an indication is issued before a similar command, issued by another host, has
terminated. When the L bit is set to 1, it indicates the locked state, that is, that another host is executing a
command. When the L bit is set to 0, it means that no other host is executing a command.
The two addresses in the command register and command expansion register are used to set and reset
the L bit, being used as the lock flag. Table 5-13 lists whether the hosts are in a locked state when they
read-access their respective registers. Write-accessing these registers does not affect the locked/unlocked
state. In the busy state, accessing a register does not cause transition from the locked state to the
unlocked state, or vice versa. For example, if the B and L bits are set to 1 when the CMR_L is read, the
locked state is maintained.
Table 5-13. L Bit State Transition due to Register Read-Access
Operation
Lock
L bit state transition
0 -> 1
Read
CMR
CMR_L
CER
CER_L
Unlock
1 -> 0
CMR_L
CER_L
Kept locked
1 -> 1
CMR
CER
Kept unlocked
0 -> 0
Before issuing a command for which an indication will be returned, or using the command extension
register (CER), all of the hosts are required to read the CMR register. A host has the right to issue a
command only when the L bit of the CMR register is found to be 0. If the L bit is set to 1, the hosts must
wait until the L bit becomes 0. Once a host obtains the right to issue a command, the host keeps the L bit
set to 1 until it finishes executing the command. When a host receives an indication corresponding to the
command it issued, it resets the L bit to 0 for unlocking.
Some accesses enable a command shift with the L bit setting held to 1. By maintaining the locked state,
the user can allow one host to take precedence over the others in issuing commands.
For commands that do not return an indication, and those commands that do not use the command
extension register (CER), the hosts do not have to check either the L bit or the B bit. A host can issue a
command for which no indication will be issued at any time, regardless of whether the host is in the locked
or busy state. Once issued, a command is stored in the command FIFO. A command for which an
indication will not be issued can be issued at any time, but once it has been issued, the command register
must not be read-accessed. Read-accessing the command register causes transition between locked and
unlocked states, while write-accessing does not.