11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

the first instruction fetch). If the IRQA signal is released (pulled high) after a minimum <strong>of</strong>4T but less than 128K T cycles, no IRQA interrupt will occur, and the instruction fetchedafter stop cycle 8 will be the next sequential instruction (n4 in Figure 7-18). An IRQAinterrupt will be serviced as shown in Figure 7-18 if 1) the IRQA signal had previouslybeen initialized as level sensitive, 2) IRQA is held low from the end <strong>of</strong> the 128K T cycledelay counter to the end <strong>of</strong> stop cycle count 8, and 3) no interrupt with a higher interruptlevel is pending. If IRQA is not asserted during the last part <strong>of</strong> the STOP instructionsequence (6, 7, and 8) and if no interrupts are pending, the processor will refetch thenext sequential instruction (n4). Since the IRQA signal is asserted (see Figure 7-18), theprocessor will recognize the interrupt and fetch and execute the instructions at P:$0008and P:$0009 (the IRQA interrupt vector locations).To ensure servicing IRQA immediately after leaving the stop state, the following stepsmust be taken before the execution <strong>of</strong> the STOP instruction:-1. Define IRQA as level sensitive - an edge-triggered interrupt will not be serviced.2. Define IRQA priority as higher than the other sources and higher than the programpriority.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 assertedfor 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 lastthree cycles; otherwise, NMI will be serviced before IRQA because NMI priorityis higher.6. The exact elapsed time for clock recovery is unpredictable. The externaldevice that asserts IRQA must wait for some positive feedback, such as specificmemory access or a change in some predetermined I/O pin, before deassertingIRQA.The STOP sequence totals 131,104 T cycles (if SD=O) or 48 T cycles (if SD=1) in additionto the period with no clocks from the stop fetch to the IRQA vector fetch (or nextinstruction). However, there is an additional delay if the internal oscillator is used. Anindeterminate period <strong>of</strong> time is needed for the oscillator to begin oscillating and then stabilizeits amplitude. The processor will still count 131,072 T cycles (or 16 T cycles), but

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!