![](http://datasheet.mmic.net.cn/380000/-PD98405_datasheet_16745025/-PD98405_238.png)
CHAPTER 5 SAR FUNCTION
238
Therefore, the host must confirm that the B bit is set to "0" (that the preceding command has been
completed) by reading the command register once before issuing a new command. Or, it must wait for at
least 2 states (72 clocks) after issuing a command before issuing the next command.
(2) Lock flag (supporting a multi-host system)
In a multi-host system where the
μ
PD98405 is controlled by two or more host CPUs, bit 30 (L bit) of the
command register is used. The L bit functions as a lock flag that prevents two or more host CPUs from
writing a command to the
μ
PD98405 before the completion of command execution by another host.
For example, suppose that one
μ
PD98405 is controlled by two host CPUs, and that both host CPUs
attempt to write a command to the CMR register. The two hosts first read CMR and confirm that the B bit
is not set to "1" (that the
μ
PD98405 is not busy). Next, each host writes its command to the CMR register.
As a result, one host will write its command over the command written by the other host.
To prevent this from happening, the L bit at the 30th bit position of the CMR register functions as a lock flag
that indicates that another host is now accessing the CMR register. When the L bit is set to 1, it indicates
the locked state, that is, that another host is executing a command and the
μ
PD98405 cannot accept
another command. When the L bit is set to 0, it means that no other host is executing a command.
To set or reset the lock flag or L bit, the two addresses of each of the command and command extension
registers are used. The
μ
PD98405 is locked or unlocked as listed in Table 5-11 when the hosts access the
respective registers. In the busy state, however, the lock/unlock state is not changed regardless of which
register is accessed. For example, the
μ
PD98405 will not be unlocked if both the B and L bits, obtained by
reading CMR_L, are 1.
Table 5-11. L Bit State Transition due to Register Access
Operation
L bit state transition
Read
Write
Lock
0 -> 1
CMR
CMR_L
CER
CER_L
CMR_L
CER_L
CMR
CER
CMR_L
Unlock
1 -> 0
CMR
Kept locked
1 -> 1
CMR_L
CER
CER_L
CMR
CER
CER_L
Kept unlocked
0 -> 0