Professional Documents
Culture Documents
Purpose:
This course provides an overview of the Direct Memory Access
Controller and the Interrupt Controller on the SH-2 and SH-2A
families of 32-bit RISC microcontrollers, which are members of the
SuperH series
Objectives:
Gain a basic knowledge of the features and operation of the direct
memory access controller
Learn about the features and operation of the interrupt controller
Content:
Learning Time:
27 pages
4 questions
20 minutes
1
2008, Renesas Technology America, Inc., All Rights Reserved
Flash
RAM
Multi-function Timer
Pulse Unit
Data Transfer
Controller
Compare-Match
Timer
Bus State
Controller
Watchdog Timer
Direct Memory
Access Controller
A/D Converter
Interrupt Controller
High-performance
User Debug Interface
User Break
Controller
Advanced User
Debugger
Serial Communication
Interface
Bus
Interface
I/O
Ports
Clock Pulse
Generator
External
Memory
between:
DMAC
On-chip
Peripherals
SuperH
CPU
3
2008, Renesas Technology America, Inc., All Rights Reserved
External
Devices
with DACK
Memorymapped I/O
On-chip
Memory
Microcontroller
DMAC Features
SCIF x 8 sources
IIC3 x 2 sources (supported by SH-2A only)
ADC x 2 sources
MTU2 x 5 sources
CMT x 2 sources (supported by SH-2A only)
Dual-Address Mode
5
2008, Renesas Technology America, Inc., All Rights Reserved
Single-Address Mode
6
2008, Renesas Technology America, Inc., All Rights Reserved
7
2008, Renesas Technology America, Inc., All Rights Reserved
PROPERTIES
On passing, 'Finish' button:
On failing, 'Finish' button:
Allow user to leave quiz:
User may view slides after quiz:
User may attempt quiz:
Channel Priority
When more than one DMAC channel is triggered, channelpriority modes determine the order of transfers.
DMAC has two channel priority modes:
Fixed
The priority among channels remains fixed
Two schemes are available:
CH0 > CH1 > CH2 > CH3 > CH4 > CH5 > CH6 > CH7
CH0 > CH4 > CH1 > CH5 > CH2 > CH6 > CH3 > CH7
Round robin
Priority changes after each unit is transferred
Channel of just-completed transfer moves to the position of lowest priority
Priority after reset:
CH0 > CH1 > CH2 > CH3 > CH4 > CH5 > CH6 > CH7
9
2008, Renesas Technology America, Inc., All Rights Reserved
Bus Modes
Two bus modes direct the use of the microcontrollers buses
Cycle-steal mode
Normal
Upon completion of a transfer, the bus is given to another bus master
(CPU, external bus request, etc.)
Bus released for 1 cycle
Burst mode
Fastest way to transfer data
DMAC doesnt release the bus until all requested transfers have been
completed
10
2008, Renesas Technology America, Inc., All Rights Reserved
Interrupt Controller
Controls interrupt
requests to the CPU
Interrupt
Source 1
Interrupt
Source 2
Interrupt
Source 3
INTC
Interrupt
Source 4
. .
11
2008, Renesas Technology America, Inc., All Rights Reserved
Interrupt
Source n
CPU
Stack
grows
down
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
Stack
Low Address
R13
R14
R15
31
Status Register
MQI3I2I1I0ST
Global Base Register
GBR
Vector Base Register
VBR
Jump Table Base Register
TBR
MAC Registers
MAC H
MAC L
Procedure Register
PR
Program Counter
PC
14
2008, Renesas Technology America, Inc., All Rights Reserved
PROPERTIES
On passing, 'Finish' button:
On failing, 'Finish' button:
Allow user to leave quiz:
User may view slides after quiz:
User may attempt quiz:
16
2008, Renesas Technology America, Inc., All Rights Reserved
0 or 1
X ( 0)
7 + m1 + m2 + m3
9 + m1 + m3
_________________________________________________________________________________________
Response, minimum:
10
12
0.25s to 0.3s
_________________________________________________________________________________________
Time, maximum:
12 + 2 (m1 + m2 + m3) + m4
13 + 2 (m1 + m2 + m3) + m4
0.48s @ 40MHz
_____________________________________________________________________________________________________________________
Note: m1 m4 are the number of states needed for the following memory accesses:
m1: SR save (longword); m2: PC save (longword write); m3: vector address read (longword write); m4: fetch first ISR instruction
17
2008, Renesas Technology America, Inc., All Rights Reserved
PROPERTIES
On passing, 'Finish' button:
On failing, 'Finish' button:
Allow user to leave quiz:
User may view slides after quiz:
User may attempt quiz:
19
2008, Renesas Technology America, Inc., All Rights Reserved
20
2008, Renesas Technology America, Inc., All Rights Reserved
21
2008, Renesas Technology America, Inc., All Rights Reserved
22
2008, Renesas Technology America, Inc., All Rights Reserved
Vector Table
Interrupt
source
Vector
table
address
Interrupt Source
Vector Vector
Vector
Table
Addressoffset
Offset
0x00000100-0x00000103
IRQ0
64
0x00000104-0x00000107
IRQ1
65
0x00000108-0x0000010B
IRQ2
66
0x0000010C-0x0000010F
IRQ3
67
0x00000110-0x00000113
IRQ4
68
0x00000114-0x00000117
IRQ5
69
0x00000118-0x0000011B
IRQ6
70
0x0000011C-0x0000011F
IRQ7
71
0x00000120-0x00000123
On-chip peripheral modules 72
...
...
0x000003FC-0x000003FF
255
Exception Processing-Instructions
Exceptions can be triggered by instructions
TRAPA
General illegal (unimplemented) op-code
Illegal slots
General illegal instruction
Instruction that rewrites the PC
PROPERTIES
On passing, 'Finish' button:
On failing, 'Finish' button:
Allow user to leave quiz:
User may view slides after quiz:
User may attempt quiz:
Course Summary
27
2008, Renesas Technology America, Inc., All Rights Reserved