CHAPTER 4 BUS CONTROL FUNCTION
User’s Manual U13850EJ6V0UD
133
4.5.2 External wait function
When an extremely slow device, I/O, or asynchronous system is connected, any number of wait states can be
inserted in the bus cycle by sampling the external wait pin (WAIT) to synchronize with the external device.
The external wait signal is data wait only, and does not affect the access times of the internal ROM, internal RAM,
and on-chip peripheral I/O areas, similar to programmable wait.
Input of the external WAIT signal can be done asynchronously to CLKOUT and is sampled at the falling edge of
the clock in the T2 and TW states of a bus cycle. If the setup/hold time at sampling timing is not satisfied, the wait
state may or may not be inserted in the next state.
Caution
Because the A1 pin and WAIT pin are alternate-function pins, the wait function by the WAIT pin
cannot be used when using a separate bus (programmable wait can be used, however).
Similarly, a separate bus cannot be used when the wait function by the WAIT pin is being used.
4.5.3 Relationship between programmable wait and external wait
A wait cycle is inserted as a result of an OR operation between the wait cycle specified by the set value of
programmable wait and the wait cycle controlled by the WAIT pin. In other words, the number of wait cycles is
determined by whichever has the greater number.
Figure 4-5. Wait Control
Wait control
Programmable wait
Wait by WAIT pin
For example, if the number of programmable waits and the timing of the WAIT pin input signal are as illustrated
below, three wait states will be inserted in the bus cycle.
Figure 4-6. Example of Inserting Wait States
CLKOUT
T1
T2
TW
TW
TW
T3
WAIT pin
Wait by WAIT pin
Programmable wait
Wait control
Remark
{
: Valid sampling timing