35
32117DS–AVR-01/12
AT32UC3C
relative to EVBA. The autovector offset has 14 address bits, giving an offset of maximum 16384
bytes. The target address of the event handler is calculated as (EVBA | event_handler_offset),
not (EVBA + event_handler_offset), so EVBA and exception code segments must be set up
appropriately. The same mechanisms are used to service all different types of events, including
interrupt requests, yielding a uniform event handling scheme.
An interrupt controller does the priority handling of the interrupts and provides the autovector off-
set to the CPU.
4.5.1
System Stack Issues
Event handling in AVR32UC uses the system stack pointed to by the system stack pointer,
SP_SYS, for pushing and popping R8-R12, LR, status register, and return address. Since event
code may be timing-critical, SP_SYS should point to memory addresses in the IRAM section,
since the timing of accesses to this memory section is both fast and deterministic.
The user must also make sure that the system stack is large enough so that any event is able to
push the required registers to stack. If the system stack is full, and an event occurs, the system
will enter an UNDEFINED state.
4.5.2
Exceptions and Interrupt Requests
When an event other than scall or debug request is received by the core, the following actions
are performed atomically:
1.
The pending event will not be accepted if it is masked. The I3M, I2M, I1M, I0M, EM, and
GM bits in the Status Register are used to mask different events. Not all events can be
masked. A few critical events (NMI, Unrecoverable Exception, TLB Multiple Hit, and
Bus Error) can not be masked. When an event is accepted, hardware automatically
sets the mask bits corresponding to all sources with equal or lower priority. This inhibits
acceptance of other events of the same or lower priority, except for the critical events
listed above. Software may choose to clear some or all of these bits after saving the
necessary state if other priority schemes are desired. It is the event source’s respons-
ability to ensure that their events are left pending until accepted by the CPU.
2.
When a request is accepted, the Status Register and Program Counter of the current
context is stored to the system stack. If the event is an INT0, INT1, INT2, or INT3, reg-
isters R8-R12 and LR are also automatically stored to stack. Storing the Status
Register ensures that the core is returned to the previous execution mode when the
current event handling is completed. When exceptions occur, both the EM and GM bits
are set, and the application may manually enable nested exceptions if desired by clear-
ing the appropriate bit. Each exception handler has a dedicated handler address, and
this address uniquely identifies the exception source.
3.
The Mode bits are set to reflect the priority of the accepted event, and the correct regis-
ter file bank is selected. The address of the event handler, as shown in Table 4-4 on
page 38, is loaded into the Program Counter.
The execution of the event handler routine then continues from the effective address calculated.
The rete instruction signals the end of the event. When encountered, the Return Status Register
and Return Address Register are popped from the system stack and restored to the Status Reg-
ister and Program Counter. If the rete instruction returns from INT0, INT1, INT2, or INT3,
registers R8-R12 and LR are also popped from the system stack. The restored Status Register
contains information allowing the core to resume operation in the previous execution mode. This
concludes the event handling.
相关PDF资料
AT32UC3C2512C-A2ZT IC MCU 32BIT 512KB FLASH 64TQFP
AT32UC3L016-D3HR MCU AVR32 16K FLASH 48TTLGA
AT42QT5480-CU QS444 IC SENSOR DUAL TOUCH 49-BGA
AT6010H-4QI IC FPGA 4NS 240PQFP
AT80C31X2-SLRUM MCU ROMLESS 31X2 5V 44-PLCC
AT80C51RD2-SLRUM IC MCU 80C51 HI PERFORM 44PLCC
AT85C51SND3B1-RTTUL IC DECODER/ENCODER DGTL 100-LQFP
AT87251G2D-RLTUM IC MCU 8/16BIT 32K OTP 44-VQFP
相关代理商/技术参数
AT32UC3C2512C-A2ZR 功能描述:32位微控制器 - MCU 512KB FL,-40/125oC AUTO RoHS:否 制造商:Texas Instruments 核心:C28x 处理器系列:TMS320F28x 数据总线宽度:32 bit 最大时钟频率:90 MHz 程序存储器大小:64 KB 数据 RAM 大小:26 KB 片上 ADC:Yes 工作电源电压:2.97 V to 3.63 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:LQFP-80 安装风格:SMD/SMT
AT32UC3C2512C-A2ZT 功能描述:32位微控制器 - MCU 512KB FL,-40/125oC AUTO RoHS:否 制造商:Texas Instruments 核心:C28x 处理器系列:TMS320F28x 数据总线宽度:32 bit 最大时钟频率:90 MHz 程序存储器大小:64 KB 数据 RAM 大小:26 KB 片上 ADC:Yes 工作电源电压:2.97 V to 3.63 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:LQFP-80 安装风格:SMD/SMT
AT32UC3C2512C-Z2UR 制造商:Atmel Corporation 功能描述:MCU 32-bit AT32 AVR RISC 512KB Flash 3.3V/5V 64-Pin QFN EP T/R 制造商:Atmel Corporation 功能描述:512KB FLASH 64QFN(-40?C TO 85?C) T&R - Tape and Reel 制造商:Atmel Corporation 功能描述:IC MCU 32BIT 512KB FLASH 64QFN 制造商:Atmel Corporation 功能描述:32-bit Microcontrollers - MCU 512KB Flash 64QFN (-40oC to 85oC) 制造商:Atmel Corporation 功能描述:512KB Flash 64QFN(-40C to 85C) T&R
AT32UC3C2512C-Z2UT 制造商:Atmel Corporation 功能描述:512KFLASH AUTO - Trays
AT32UC3C2512C-Z2ZES 制造商:Atmel Corporation 功能描述:512KFLASH UC3C AUTO - QFN64 ENG SAMPLE - Bulk
AT32UC3C2512C-Z2ZR 功能描述:32位微控制器 - MCU 512KB FL,-40/125oC AUTO RoHS:否 制造商:Texas Instruments 核心:C28x 处理器系列:TMS320F28x 数据总线宽度:32 bit 最大时钟频率:90 MHz 程序存储器大小:64 KB 数据 RAM 大小:26 KB 片上 ADC:Yes 工作电源电压:2.97 V to 3.63 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:LQFP-80 安装风格:SMD/SMT
AT32UC3C2512C-Z2ZT 功能描述:32位微控制器 - MCU 512KB FL,-40/125oC AUTO RoHS:否 制造商:Texas Instruments 核心:C28x 处理器系列:TMS320F28x 数据总线宽度:32 bit 最大时钟频率:90 MHz 程序存储器大小:64 KB 数据 RAM 大小:26 KB 片上 ADC:Yes 工作电源电压:2.97 V to 3.63 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:LQFP-80 安装风格:SMD/SMT
AT32UC3C264C-A2UR 功能描述:32位微控制器 - MCU UC3C 64K FLASH 16K SRAM RoHS:否 制造商:Texas Instruments 核心:C28x 处理器系列:TMS320F28x 数据总线宽度:32 bit 最大时钟频率:90 MHz 程序存储器大小:64 KB 数据 RAM 大小:26 KB 片上 ADC:Yes 工作电源电压:2.97 V to 3.63 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:LQFP-80 安装风格:SMD/SMT