• Aucun résultat trouvé

CLOCK STOPPED"~

Dans le document III III III III (Page 183-188)

IROA = INTERRUPT REQUEST A SIGNAL n = NORMAL INSTRUCTION WORD STOP = DECODED STOP INSTRUCTION"

..

'4 n4

'4

'4 5 6 7 8 (91

~'1 L

RESUME STOP CYCLE CO INTERRUPTS ENABLED - 131072 T OR 16 T CYCLE COUN

Figure 8-17. STOP Instruction Sequence

UNT 4,

T STARTED

Figure 8-18 illustrates restarting the system by asserting the IRQA signal. If the exit from stop state was caused by a low level on the IRQA pin, then the processor will service the highest priority pending interrupt. If no interrupt is pending, then the processor resumes at the instruction following the STOP instruction that caused the entry into the stop state.

IROA

FETCH n3 n4 -

-DECODE n2 STOP -

-EXECUTE n1 n2 STOP

-STOP CYCLE COUNT 1 2 3 " 4

CLOCK STOPPED

J

IROA = INTERRUPT REQUEST A SIGNAL n = NORMAL INSTRUCTION WORD STOP = DECODED STOP INSTRUCTION

mnn

ii1

5 6 7 8 (91

~L

RESUME STOP CYCLE C OUNT 4, INTERRUPTS ENABLED

i - -131,072 T R 16 T CYCLE CO a UNT STARTED

Figure 8-18. STOP Instruction Sequence Followed by IRQA

MOTOROLA OSP56000/0SP56001 USER'S MANUAL 8-39

II

An IRQA deasserted before the end of the stop cycle count will not be recognized as pending. If IRQA is asserted when the stop cycle count completes, then an IRQA interrupt will be recognized as pending and will. be arbitrated with any other interrupts.

Specifically, when IRQA is asserted, the internal clock generator is started and begins a delay determined by the SD bit of the OMR. If the internal clock oscillator is used, the SD bit should be set to zero, which enables a delay count of 128K T cycles (131,072 T cycles) to allow the clock oscillator to stabilize. If a stable external clock is used, the SD bit may be set to one, which enables a 16 T cycle delay.

The following description assumes that SD

= °

(the 128K T counter is used). During the 128K T count, interrupts are ignored until the last few count cycles. At this time, the interrupts are synchronized. At the end of the 128K T cycle delay period, the chip restarts instruction processing, stop cycle 4 is completed (interrupt arbitration occurs at this time), and stop cycles 5, 6, 7, and 8 are executed (it takes 17T from the end of the 128K T delay to the first instruction fetch). If the IRQA signal is released (pulled high) after a minimum of 4T but less than 128K T cycles, no IRQA interrupt will occur, and the instruction fetched after stop cycle 8 will be the next sequential instruction (n4 in Figure 8-18). An IRQA interrupt will be serviced (as shown in Figure 8-18) if 1) the IRQA signal had previously been initialized as level sensitive, 2) IRQA is held low from the end of the 128K T cycle delay counter to the end of stop cycle count 8, and 3) no interrupt with a higher interrupt level is pending.

If IRQA is not asserted during the last part of the STOP instruction sequence (6, 7, and 8) and if no interrupts are pending, the processor will refetch the next sequential instruction (n4). Since the IRQA signal is asserted (see Figure 8-18), the processor will recognize the interrupt and fetch and execute the instructions at P:$0008 and P:$0009 (the IRQA interrup.t vector locations).

To ensure servicing IRQA immediately after leaving the stop state, the following steps must be taken before the execution of the STOP instruction:

1. Define IRQA as level sensitive.

2. Define IRQA priority as higher than the other sources and higher than the program priority.

3. Ensure that no stack error or trace interrupts are pending.

4. Execute the STOP instruction and enter the stop state.

5. Recover from the stop state by asserting the IRQA pin and holding it asserted for the whole clock recovery time. If it is low, the IRQA vector will be fetched. Also, the user must ensure that NMI will not be asserted during these last three cycles; otherwise, NMI will be serviced before IRQA because NMI priority is higher;

6. The exact elapsed time for clock recovery is unpredictable. The external device that asserts IRQA must wait for some positive feedback, such as specific memory access or a change in some predetermined 1/0 pin, before deasserting IRQA.

8-40 DSP56000/0SP56001 USER'S MANUAL MOTOROLA

The STOP sequence totals 131,104 T cycles (if SD=O) or 16 T cycles (if SD=1) in addition to the period with no clocks from the stop fetch to the IROA vector fetch (or next instruction).

However, there is an additional delay if the internal oscillator is used. An indeterminant period of time is needed for the oscillator to begin oscillating and then stabilize its am-plitude. The processor will still count 131,104 T cycles (or 16 T cycles), but the period of the first oscillator cycles will be irregular; thus, an additional 'period of 19,000 T cycles should be allowed for oscillator irregularity (the specification recommends a total minimum period of 150,000 T cycles for oscillator stabilization). If an external oscillator is used that is already stabilized, no additional time is needed.

If the STOP instruction is executed when the IROA signal is asserted, the clock generator will not be stopped, but the four-phase clock will be disabled for the duration of the 128K T cycle (or 19 T cycle) delay count. In this case, the STOP looks like a 131,072K

+

35 T cycle (or 51 T cycle) NOP, since the STOP instruction itself is eight instruction cycles long (32 T).

A trace or stack error interrupt pending before entering the stop state is not cleared and will remain pending. During the clock stabilization delay, all peripheral and external inter-rupts are cleared and ignored (includes all SCI, SSI, HI, IROA, IROB, and NMI interinter-rupts, but nottrace or stack error).lfthe SCI, SSI, or HI have interrupts enabled in 1) their respective control registers and 2) in the interrupt priority register, then interrupts like SCI transmitter empty will be immediately pending after the clock recovery delay and will be serviced before continuing with the next instruction. If peripheral interrupts must be disabled, the user should disable them with either the control registers or the interrupt priority register before the STOP instruction is executed.

If RESET is used to restart the processor (see Figure 8-19), the 128K T cycle delay counter would not be used, all pending interrupts would be discarded, and the processor would immediately enter the reset processing state as described in 8.3 RESET PROCESSING STATE. The stabilization time required for the clock (RESET should be asserted for this time) is only 50 T for a stabilized external clock but is the same 150,000 T for the internal oscillator. These stabilization times are recommended times but are not imposed by internal timers or time delays. The DSP fetches instructions immediately after exiting reset. If the user wishes to use the 128K T (or 16 T) delay counter, it can be started by asserting IROA for a short time (about two clock cycles).

During the stop mode, the port A bus is frozen. The state of each pin immediately before executing the STOP instruction will be held until the DSP leaves the stop state. Port A is not three-stated, and the BR/BG circuits are not operational. However, port A will remain three-stated if BG was asserted before the STOP instruction was executed. One way to release the port A bus for use while the DSP is in the stop state is to use a port B or port C pin to initiate a bus request before executing the STOP instruction.

MOTOROLA OSP56000/0SP56001 USER'S MANUAL 8-41

-III

8-42

PROCESSOR ENTERS RESET STATE

-INTERRUPT CONTROL CYCLE 1 INTERRUPT CONTROL CYCLE 2

FETCH n3 n4 -

-DECODE n2 STOP -

-EXECUTE nl n2 STOP

-STOP CYCLE COUNT 1 2 3 4

IJ

CLOCK STOPPED

RESET = SIGNAL APPLIED TO RESET PIN n = NORMAL INSTRUCTION WORD nA, nB, nC = INSTRUCTIONS IN RESET ROUTINE

STOP = DECODED STOP INSTRUCTION

PROCESSOR LEAVES RESET STATE

-I

.~

.~~

~~

~~ nap nA nB nC nD nE

J..~ nap nap nA nB nC nD

~~ nap nap nap nA nB nC

~~

,

Figure 8·19. STOP Instruction Sequence Recovering with RESET

DSP56000/DSP56001 USER'S MANUAL MOTOROLA

SECTION 9 PORTA

Port A is the memory expansion port that can be used for either memory expansion or for memory-mapped I/O (see 2.9.1 Expansion Port (Port A)). A number of features make port A versatile and easy to use. These features provide a low-parts-count connection with fast memories, slow memories/devices, and multiple bus master systems.

The port A data bus is 24 bits wide with a separate 16-bit address bus capable of a sustained rate of one memory access per machine cycle (using no-wait-state memory). External memory is divided into three 64K-word x 24-bit spaces - X:, V:, and P:. An internal wait-state generator can be programmed to insert up to 15 wait wait-states if access to slower memory or I/O devices is required. A bus wait signal allows an external device to control the number of wait states inserted in a bus access operation. Bus arbitration signals allow an external device (e.g., a DMA controller or another processor) use ofthe bus while internal operations continue using the internal memories. Two power-reduction features are specific to port A. The first power-reduction feature is that accessing the internal memory spaces does not toggle the external memory signals, eliminating unneeded switching current. The second power-reduction feature is that, if lower memory speed is acceptable, wait states can be added to external memory accesses to significantly reduce power while accessing those memories.

9.1 PORT A INTERFACE

One or more of the digital signal processor (DSP) memory sources (X data memory, V data memory, and program memory) can be accessed during the execution of an instruc-tion. Each of these memorysources may be either internal or external to the DSP. Three address buses (XAB, VAB, and PAB) and four data buses (XDB, VDB, PDB, and GDB) are available for internal memory accesses during one instruction cycle, but only one address bus and one data bus (port A) are available for external memory accesses. If all memory sources are internal to the DSP, one or more of the three memory sources may be accessed in one instruction cycle (i.e., program memory access or program memory access plus an X, V, XV, or L memory reference). However, when one or more of the memories are external to the DSP56000/DSP56001, memory references may require additional instruction cycles because only one external memory access can occur per instruction cycle.

If more than one external access is required in one instruction cycle, the accesses will be made in the following priority: X memory, V memory, and program memory. It takes one instruction cycle for each external memory access - i.e., one access can be executed in one instruction cycle, two accesses take two instruction cycles, etc. Since the external bus is only 24 bits wide, one XV or long external access will take two instruction cycles.

MOTOROLA OSP56000/0SP56001 USER'S MANUAL 9-1

Figure 9-1 shows the port A signals divided into their three functional groups. The bus control signals can be subdivided into three additional groups: read/write control, address space selection, and bus access control. The read/write controls are self-descriptive. They can be used as decoded read and write controls, or, as seen in Figures 9-2, 9-3, 9-4, and 9-6, the write signal can be used as the read/write control, and the read signal can be used

16-BIT INTERNAL . ADDRESS BUSES

X ADDRESS IXA)

Y ADDRESS IYA)

PROGRAM ADDRESS WA)

24-BIT INTERNAL DATA BUSES

X DATA (XD)

Y DATA IYD)

PROGRAM DATA WD)

GLOBAL DATA !GO)

9-2

)

)

ADDRESS BUS EXTERNAL SWITCH

~ V

)

-V ~

EXTERNAL

Dans le document III III III III (Page 183-188)