AT91SAM7XC512-CU Atmel, AT91SAM7XC512-CU Datasheet

MCU ARM 512K HS FLASH 100-TFBGA

AT91SAM7XC512-CU

Manufacturer Part Number
AT91SAM7XC512-CU
Description
MCU ARM 512K HS FLASH 100-TFBGA
Manufacturer
Atmel
Series
AT91SAMr
Datasheets

Specifications of AT91SAM7XC512-CU

Core Processor
ARM7
Core Size
16/32-Bit
Speed
55MHz
Connectivity
CAN, Ethernet, I²C, SPI, SSC, UART/USART, USB
Peripherals
Brown-out Detect/Reset, DMA, POR, PWM, WDT
Number Of I /o
62
Program Memory Size
512KB (512K x 8)
Program Memory Type
FLASH
Ram Size
128K x 8
Voltage - Supply (vcc/vdd)
1.65 V ~ 1.95 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
100-TFBGA
Processor Series
AT91SAMx
Core
ARM7TDMI
Data Bus Width
32 bit
Data Ram Size
128 KB
Interface Type
MII, SPI, TWI
Maximum Clock Frequency
55 MHz
Number Of Programmable I/os
62
Number Of Timers
3
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
JTRACE-ARM-2M, KSK-AT91SAM7X-PL, MDK-ARM, RL-ARM, ULINK2
Development Tools By Supplier
AT91SAM-ICE, AT91-ISP, AT91SAM7XC-EK
Minimum Operating Temperature
- 40 C
On-chip Adc
10 bit, 8 Channel
For Use With
AT91SAM-ICE - EMULATOR FOR AT91 ARM7/ARM9AT91SAM7XC-EK - KIT EVAL FOR AT91SAM7XC256/128
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT91SAM7XC512-CU
Manufacturer:
Atmel
Quantity:
10 000
Features
Incorporates the ARM7TDMI
Internal High-speed Flash
Internal High-speed SRAM, Single-cycle Access at Maximum Speed
Memory Controller (MC)
Reset Controller (RSTC)
Clock Generator (CKGR)
Power Management Controller (PMC)
Advanced Interrupt Controller (AIC)
Debug Unit (DBGU)
Periodic Interval Timer (PIT)
Windowed Watchdog (WDT)
– High-performance 32-bit RISC Architecture
– High-density 16-bit Instruction Set
– Leader in MIPS/Watt
– EmbeddedICE
– 512 Kbytes (AT91SAM7XC512) Organized in Two Banks of 1024 Pages of 256 Bytes
– 256 Kbytes (AT91SAM7XC256) Organized in 1024 Pages of 256 Bytes (Single
– 128 Kbytes (AT91SAM7XC128) Organized in 512 Pages of 256 Bytes (Single Plane)
– 128 Kbytes (AT91SAM7XC512)
– 64 Kbytes (AT91SAM7XC256)
– 32 Kbytes (AT91SAM7XC128)
– Embedded Flash Controller, Abort Status and Misalignment Detection
– Based on Power-on Reset Cells and Low-power Factory-calibrated Brownout
– Provides External Reset Signal Shaping and Reset Source Status
– Low-power RC Oscillator, 3 to 20 MHz On-chip Oscillator and one PLL
– Power Optimization Capabilities, Including Slow Clock Mode (Down to 500 Hz) and
– Four Programmable External Clock Signals
– Individually Maskable, Eight-level Priority, Vectored Interrupt Sources
– Two External Interrupt Sources and One Fast Interrupt Source, Spurious Interrupt
– 2-wire UART and Support for Debug Communication Channel interrupt,
– Mode for General Purpose 2-wire UART Serial Communication
– 20-bit Programmable Counter plus 12-bit Interval Counter
– 12-bit Key-protected Programmable Counter
– Provides Reset or Interrupt Signals to the System
– Counter May Be Stopped While the Processor is in Debug State or in Idle Mode
(Dual Plane)
Plane)
Detector
Idle Mode
Protected
Programmable ICE Access Prevention
• Single Cycle Access at Up to 30 MHz in Worst Case Conditions
• Prefetch Buffer Optimizing Thumb Instruction Execution at Maximum Speed
• Page Programming Time: 6 ms, Including Page Auto-erase,
• 10,000 Write Cycles, 10-year Data Retention Capability,
• Fast Flash Programming Interface for High Volume Production
Full Erase Time: 15 ms
Sector Lock Capabilities, Flash Security Bit
In-circuit Emulation, Debug Communication Channel Support
®
ARM
®
Thumb
®
Processor
AT91 ARM
Thumb-based
Microcontrollers
AT91SAM7XC512
AT91SAM7XC256
AT91SAM7XC128
Preliminary
6209F–ATARM–17-Feb-09

Related parts for AT91SAM7XC512-CU

AT91SAM7XC512-CU Summary of contents

Page 1

... EmbeddedICE In-circuit Emulation, Debug Communication Channel Support • Internal High-speed Flash – 512 Kbytes (AT91SAM7XC512) Organized in Two Banks of 1024 Pages of 256 Bytes (Dual Plane) – 256 Kbytes (AT91SAM7XC256) Organized in 1024 Pages of 256 Bytes (Single Plane) – 128 Kbytes (AT91SAM7XC128) Organized in 512 Pages of 256 Bytes (Single Plane) • ...

Page 2

... Seventeen Peripheral DMA Controller (PDC) Channels • One Advanced Encryption System (AES) – 256-, 192-, 128-bit Key Algorithm, Compliant with FIPS PUB 197 Specifications (AT91SAM7XC512) – 128-bit Key Algorithm, Compliant with FIPS PUB 197 Specifications (AT91SAM7XC256/128) – Buffer Encryption/Decryption Capabilities with PDC • ...

Page 3

... Fully Static Operation MHz at 1.65V and 85° C Worst Case Conditions • Available in 100-lead LQFP Green and 100-ball TFBGA Green Packages 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 3 ...

Page 4

... Description Atmel's AT91SAM7XC512/256/128 is a member of a series of highly integrated Flash microcon- trollers based on the 32-bit ARM RISC processor. It features 512/256/128 Kbyte high-speed Flash and 128/64/32 Kbyte SRAM, a large set of peripherals, including an 802.3 Ethernet MAC, a CAN controller, an AES 128 Encryption accelerator and a Triple Data Encryption System. A complete set of system functions minimizes the number of external components ...

Page 5

... AT91SAM7XC512/256/128 Block Diagram Figure 2-1. JTAGSEL IRQ0-IRQ1 PCK0-PCK3 VDDCORE VDDFLASH VDDCORE SPI0_NPCS0 SPI0_NPCS1 SPI0_NPCS2 SPI0_NPCS3 SPI0_MISO SPI0_MOSI SPI0_SPCK SPI1_NPCS0 SPI1_NPCS1 SPI1_NPCS2 SPI1_NPCS3 SPI1_MISO SPI1_MOSI SPI1_SPCK 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary AT91SAM7XC512/256/128 Block Diagram TDI TDO ICE JTAG TMS SCAN TCK System Controller ...

Page 6

... Test Mode Select DRXD Debug Receive Data DTXD Debug Transmit Data IRQ0 - IRQ1 External Interrupt Inputs FIQ Fast Interrupt Input PA0 - PA30 Parallel IO Controller A PB0 - PB30 Parallel IO Controller B AT91SAM7XC512/256/128 Preliminary 6 Active Type Level Power Power Power Power Power Power Power Ground ...

Page 7

... Master Out Slave In SPIx_SPCK SPI Serial Clock SPIx_NPCS0 SPI Peripheral Chip Select 0 SPIx_NPCS1-NPCS3 SPI Peripheral Chip Select TWD Two-wire Serial Data TWCK Two-wire Serial Clock 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Type USB Device Port Analog Analog USART I/O I/O Input Output Input Input ...

Page 8

... ECRS Carrier Sense ECOL Collision Detected EMDC Management Data Clock EMDIO Management Data Input/Output EF100 Force 100 Mbits/sec. Note: 1. Refer to Section 6. ”I/O Lines AT91SAM7XC512/256/128 Preliminary 8 Type Analog-to-Digital Converter Analog Analog Input Analog Fast Flash Programming Interface Input Input I/O Output Output ...

Page 9

... Package The AT91SAM7XC512/256/128 is available in 100-lead LQFP Green and 100-ball TFBGA RoHS-compliant packages. 4.1 100-lead LQFP Package Outline Figure 4-1 tion is given in the Mechanical Characteristics section of the full datasheet. Figure 4-1. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary shows the orientation of the 100-lead LQFP package. A detailed mechanical descrip- ...

Page 10

... VDDCORE 40 16 GND 41 17 VDDIO 42 18 PA10/PGMM2 43 19 PA11/PGMM3 44 20 PA12/PGMD0 45 21 PA13/PGMD1 46 22 PA14/PGMD2 47 23 PA15/PGMD3 48 24 PA16/PGMD4 49 25 PA17/PGMD5 50 AT91SAM7XC512/256/128 Preliminary 10 PA18/PGMD6 51 PB9 52 PB8 53 PB14 54 PB13 55 PA23/PGMD11 PB6 56 PA24/PGMD12 GND 57 VDDIO 58 PB5 59 PA25/PGMD13 PB15 60 PA26/PGMD14 PB17 61 VDDCORE 62 VDDCORE PB7 ...

Page 11

... PA16/PGMD4 E4 B10 PA17/PGMD5 E5 C1 PB16 E6 C2 PB4 E7 C3 PB10 E8 C4 PB3 E9 C5 PB0 E10 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary shows the orientation of the 100-ball TFBGA package. A detailed mechanical 100-ball TFBGA Package Orientation (Top View BALL A1 Signal Name Pin Signal Name PB17 F1 ...

Page 12

... Power Consumption The AT91SAM7XC512/256/128 has a static current of less than 60 µA on VDDCORE at 25°C, including the RC oscillator, the voltage regulator and the power-on reset when the brownout detector is deactivated. Activating the brownout detector adds 28 µA static current. ...

Page 13

... For example, two capacitors can be used in parallel: 100 nF NPO and 4.7 µF X7R. 5.4 Typical Powering Schematics The AT91SAM7XC512/256/128 supports a 3.3V single supply mode. The internal regulator input connected to the 3.3V source and its output feeds VDDCORE and the VDDPLL. 1 shows the power schematics to be used for USB bus-powered systems ...

Page 14

... Test Pin AT91SAM7XC512/256/128 when asserted high. The TST pin integrates a permanent pull-down resistor of about 15 kΩ to GND. To eliminate any risk of entering the test mode due to noise on the TST pin, it should be tied to GND if the FFPI is not used, or pulled down with an external low-value resistor (such as 1 kΩ) . ...

Page 15

... The PIO lines PA0 to PA3 are high-drive current capable. Each of these I/O lines can drive permanently. The remaining I/O lines can draw only 8 mA. However, the total current drawn by all the I/O lines cannot exceed 200 mA. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 15 ...

Page 16

... Alignment checking of all data accesses – Abort generation in case of misalignment • Remap Command – Remaps the SRAM in place of the embedded non-volatile memory – Allows handling of dynamic exception vectors AT91SAM7XC512/256/128 Preliminary 16 ® high-performance 32-bit instruction set ® high code density 16-bit instruction set Controller 6209F– ...

Page 17

... Low bus arbitration overhead – One Master Clock cycle needed for a transfer from memory to peripheral – Two Master Clock cycles needed for a transfer from peripheral to memory • Next Pointer management for reducing interrupt latency requirements 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary wait states 17 ...

Page 18

... Full chip erase time – 10,000 write cycles, 10-year data retention capability – 8 lock bits, each protecting 8 sectors of 64 pages – Protection Mode to secure contents of the Flash • 32 Kbytes of Fast SRAM – Single-cycle access at full speed AT91SAM7XC512/256/128 Preliminary 18 6209F–ATARM–17-Feb-09 ...

Page 19

... Figure 8-1. AT91SAM7XC512/256/128 Memory Mapping Address Memory Space 0x0000 0000 Internal Memories 256 MBytes 0x0FFF FFFF 0x1000 0000 Undefined 14 x 256 MBytes (Abort) 3,584 MBytes 0xEFFF FFFF 0xF000 0000 Internal Peripherals 256 MBytes 0xFFFF FFFF 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Internal Memory Mapping ...

Page 20

... After reset and until the Remap Command is performed, the SRAM is only accessible at address 0x0020 0000. After Remap, the SRAM also becomes available at address 0x0. 8.4.2 Internal ROM The AT91SAM7XC512/256/128 embeds an Internal ROM. At any time, the ROM is mapped at address 0x30 0000. The ROM contains the FFPI and the SAM-BA program. 8.4.3 Internal Flash • ...

Page 21

... Embedded Flash 8.5.1 Flash Overview • The Flash of the AT91SAM7XC512 is organized in two banks (dual plane) 0f 1254 pages of 256 bytes. The 524, 288 bytes are organized in 32-bit words. • The Flash of the AT91SAM7XC256 is organized in 1024 pages of 256 bytes (single plane). It reads as 65,536 32-bit words. ...

Page 22

... Asserting the ERASE pin clears the lock bits, thus unlocking the entire Flash. 8.5.4 Security Bit Feature The AT91SAM7XC512/256/128 features a security bit, based on a specific NVM-Bit. When the security is enabled, any access to the Flash, either through the ICE interface or through the Fast AT91SAM7XC512/256/128 Preliminary 22 6209F– ...

Page 23

... The SAM-BA Boot Assistant is a default Boot Program that provides an easy way to program in- situ the on-chip Flash memory. The SAM-BA Boot Assistant supports serial communication via the DBGU or the USB Device Port. • Communication via the DBGU supports a wide range of crystals from MHz via software auto-detection. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 23 ...

Page 24

... The SAM-BA Boot is in ROM and is mapped at address 0x0 when the GPNVM Bit 2 is set to 0. When GPNVM bit 2 is set to 1, the device boots from the Flash. When GPNVM bit 2 is set to 0, the device boots from ROM (SAM-BA). AT91SAM7XC512/256/128 Preliminary 24 6209F–ATARM–17-Feb-09 ...

Page 25

... Figure 9-1 on page 26 Figure 8-1 on page 19 erals. Note that the Memory Controller configuration user interface is also mapped within this address space. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary shows the System Controller Block Diagram. shows the mapping of the User Interface of the System Controller periph- 25 ...

Page 26

... Figure 9-1. NRST XIN XOUT PLLRC PA0-PA30 PB0-PB30 AT91SAM7XC512/256/128 Preliminary 26 System Controller Block Diagram System Controller irq0-irq1 Advanced fiq Interrupt Controller periph_irq[2..19] pit_irq rtt_irq wdt_irq dbgu_irq pmc_irq rstc_irq efc_irq MCK Debug periph_nreset Unit dbgu_rxd Periodic MCK debug Interval periph_nreset Timer SLCK ...

Page 27

... Brownout Detector and Power-on Reset The AT91SAM7XC512/256/128 embeds one brownout detection circuit and a power-on reset cell. The power-on reset is supplied with and monitors VDDCORE. Both signals are provided to the Flash to prevent any code corruption during power-up or power- down sequences or if brownouts occur on the power supplies. ...

Page 28

... RC Oscillator ranges between 22 KHz and 42 KHz • Main Oscillator frequency ranges between 3 and 20 MHz • Main Oscillator can be bypassed • PLL output ranges between 80 and 200 MHz It provides SLCK, MAINCK and PLLCK. Figure 9-2. AT91SAM7XC512/256/128 Preliminary 28 Clock Generator Block Diagram Clock Generator Embedded RC ...

Page 29

... Programmable positive/negative edge-triggered or high/low level-sensitive external • 8-level Priority Controller – Drives the normal interrupt nIRQ of the processor – Handles priority of the interrupt sources 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Power Management Controller Block Diagram Master Clock Controller SLCK Prescaler MAINCK /1,/2,/4, ...

Page 30

... Offers visibility of COMMRX and COMMTX signals from the ARM Processor • Chip ID Registers – Identification of the device revision, sizes of the embedded memories, set of – Chip ID is 0x271C 0A40 (VERSION 0) for AT91SAM7XC512 – Chip ID is 0x271B 0940 (VERSION 0) for AT91SAM7XC256 – Chip ID is 0x271A 0740 (VERSION 0) for AT91SAM7XC128 9 ...

Page 31

... Synchronous output, provides Set and Clear of several I/O lines in a single write 9.10 Voltage Regulator Controller The purpose of this controller is to select the Power Mode of the Voltage Regulator between Normal Mode (bit 0 is cleared) or Standby Mode (bit 0 is set). 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 31 ...

Page 32

... FFFF. Each peripheral is allocated 16 Kbytes of address space. A complete memory map is provided in 10.2 Peripheral Identifiers The AT91SAM7XC512/256/128 embeds a wide range of peripherals. Peripheral Identifiers of the AT91SAM7XC512/256/128. Unique peripheral identifiers are defined for both the Advanced Interrupt Controller and the Power Management Controller. Table 10-1. Peripheral ID 0 ...

Page 33

... Peripheral Multiplexing on PIO Lines The AT91SAM7XC512/256/128 features two PIO controllers, PIOA and PIOB, that multiplex the I/O lines of the peripheral set. Each PIO Controller controls 31 lines. Each line can be assigned to one of two peripheral func- tions Some of them can also be multiplexed with the analog inputs of the ADC Controller ...

Page 34

... CANRX PA20 CANTX PA21 TF PA22 TK PA23 TD PA24 RD PA25 RK PA26 RF PA27 DRXD PA28 DTXD PA29 FIQ PA30 IRQ0 AT91SAM7XC512/256/128 Preliminary 34 Peripheral B Comments High-Drive High-Drive SPI1_NPCS1 High-Drive SPI1_NPCS2 High-Drive SPI1_NPCS3 SPI0_NPCS1 SPI0_NPCS2 SPI0_NPCS3 PCK1 IRQ1 TCLK2 SPI1_NPCS0 SPI1_SPCK SPI1_MOSI SPI1_MISO SPI1_NPCS1 SPI1_NPCS2 PCK3 ...

Page 35

... PB22 PWM3 PB23 TIOA0 PB24 TIOB0 PB25 TIOA1 PB26 TIOB1 PB27 TIOA2 PB28 TIOB2 PB29 PCK1 PB30 PCK2 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Peripheral B Comments PCK0 SPI1_NPCS1 SPI1_NPCS2 TCLK0 SPI0_NPCS1 SPI0_NPCS2 SPI1_NPCS3 SPI0_NPCS3 ADTRG TCLK1 PCK0 PCK1 PCK2 DCD1 DSR1 DTR1 ...

Page 36

... Programmable phase and polarity per chip select – Programmable transfer delays per chip select, between consecutive transfers and – Programmable delay between consecutive transfers – Selectable mode fault detection – Maximum frequency Master Clock AT91SAM7XC512/256/128 Preliminary 36 peripherals Sensors between clock and data ® ...

Page 37

... Receiver and transmitter can be programmed to start automatically or on detection of different event on the frame sync signal • Receiver and transmitter include a data signal, a clock signal and a frame synchronization signal 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 2 C compatible devices (refer to the TWI section of the datasheet) 37 ...

Page 38

... Independent enable/disable commands – Independent clock selection – Independent period and duty cycle, with double buffering – Programmable selection of the output waveform polarity – Programmable center or left aligned output waveform AT91SAM7XC512/256/128 Preliminary 38 Table 10-4 Timer Counter Clocks Assignment Clock MCK/2 ...

Page 39

... Data, remote, error and overload frame handling 10.15 128-bit Advanced Encryption Standard • Compliant with FIPS Publication 197, Advanced Encryption Standard (AES) • 128-bit (AT91SAM7XC256/128) or 128-bit/192-bit/256-bit (AT91SAM7XC512) Cryptographic Key • 12-clock Cycles Encryption/Decryption Processing Time (AT91SAM7XC256/128) • 12/13/14-clock Cycles Encryption/Decryption Processing Time (AT91SAM7XC512) • ...

Page 40

... External voltage reference for better accuracy on low voltage inputs • Individual enable and disable of each channel • Multiple trigger sources – Hardware or software trigger – External trigger pin – Timer Counter outputs TIOA0 to TIOA2 trigger • Sleep Mode and conversion sequencer AT91SAM7XC512/256/128 Preliminary 40 6209F–ATARM–17-Feb-09 ...

Page 41

... Automatic wakeup on trigger and back to sleep mode after conversions of all • Four of eight analog inputs shared with digital signals 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary enabled channels 41 ...

Page 42

... AT91SAM7XC512/256/128 Preliminary 42 6209F–ATARM–17-Feb-09 ...

Page 43

... Two Instruction Sets – ARM – Thumb • Three-Stage Pipeline Architecture – Instruction Fetch (F) – Instruction Decode (D) – Execute (E) 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary ® High-performance 32-bit Instruction Set ® High Code Density 16-bit Instruction Set ® ® and 16-bit Thumb ...

Page 44

... At any one time 16 registers are visible to the user. The remainder are synonyms used to speed up exception processing. Register 15 is the Program Counter (PC) and can be used in all instructions to reference data relative to the current instruction. R14 holds the return address after a subroutine call. R13 is used (by software convention stack pointer. AT91SAM7XC512/256/128 Preliminary 44 6209F–ATARM–17-Feb-09 ...

Page 45

... R13 is banked across exception modes to provide each exception handler with a private stack pointer. The fast interrupt mode also banks registers that interrupt processing can begin with- out having to save these registers. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary ARM7TDMI ARM Modes and Registers Layout Supervisor Mode Abort Mode ...

Page 46

... Coprocessor instructions • Exception-generating instructions ARM instructions can be executed conditionally. Every instruction contains a 4-bit condition code field (bit[31:28]). Table 11-2 AT91SAM7XC512/256/128 Preliminary 46 supports five types of exception and a privileged processing mode for each type. gives the ARM instruction mnemonic list. 6209F–ATARM–17-Feb-09 ...

Page 47

... In Thumb mode, eight general-purpose registers R7, are available that are the same physical registers when executing ARM instructions. Some Thumb instructions also access to the Program Counter (ARM Register 15), the Link Register (ARM Register 14) and the 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary ARM Instruction Mnemonic List Operation Move ...

Page 48

... TST AND EOR LSL ASR MUL B BX LDR LDRH LDRB LDRSH LDMIA PUSH AT91SAM7XC512/256/128 Preliminary 48 gives the Thumb instruction mnemonic list. Thumb Instruction Mnemonic List Operation Move Add Subtract Compare Test Logical AND Logical Exclusive OR Logical Shift Left Arithmetic Shift Right ...

Page 49

... A set of dedicated debug and test input/output pins gives direct access to these capabilities from a PC-based test environment. 12.2 Block Diagram Figure 12-1. Debug and Test Block Diagram Boundary TAP ARM7TDMI PDC 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary ICE/JTAG TAP Reset ICE and Test DBGU TMS TCK ...

Page 50

... Application Examples 12.3.1 Debug Environment Figure 12-2 standard debugging functions, such as downloading code and single-stepping through the program. Figure 12-2. Application Debug Environment Example AT91SAM7XC512/256/128 Preliminary 50 shows a complete debug environment example. The ICE/JTAG interface is used for ICE/JTAG Interface ICE/JTAG Connector RS232 ...

Page 51

... NRST TST TCK TDI TDO TMS JTAGSEL DRXD DTXD 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary shows a test environment example. Test vectors are sent and interpreted by the tes- Test Adaptor JTAG Interface ICE/JTAG Chip n Connector AT91SAM7XCxx AT91SAM7XCxx-based Application Board In Test Debug and Test Pin List ...

Page 52

... A specific register, the Debug Unit Chip ID Register, gives information about the product version and its internal configuration. The AT91SAM7XC512 Debug Unit Chip ID value is 0x271C 0A40 on 32-bit width. The AT91SAM7XC256 Debug Unit Chip ID value is 0x271B 0940 on 32-bit width. The AT91SAM7XC128 Debug Unit Chip ID value is 0x271A 0740 on 32-bit width. ...

Page 53

... The INPUT bit facilitates the observability of data applied to the pad. The CONTROL bit selects the direction of the pad. Table 12-2. Number 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary AT91SAM7XC JTAG Boundary Scan Register Bit Pin Name 187 ...

Page 54

... Table 12-2. Number AT91SAM7XC512/256/128 Preliminary 54 AT91SAM7XC JTAG Boundary Scan Register (Continued) Bit Pin Name 159 158 PB27/TIOA2/PWM0/AD0 157 156 155 PB28/TIOB2/PWM1/AD1 154 153 152 PB29/PCK1/PWM2/AD2 151 150 149 PB30/PCK2/PWM3/AD3 148 147 146 PA8/RTS1/SPI0_NPCS2 145 144 143 PA9/CTS1/SPI0_NPCS3 142 141 140 PA10/TWD ...

Page 55

... Table 12-2. Number 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary AT91SAM7XC JTAG Boundary Scan Register (Continued) Bit Pin Name 117 116 PA18/SPI0_SPCK 115 114 113 PB9/EMDIO 112 111 110 PB8/EMDC 109 108 107 PB14/ERX3/SPI0_NPCS2 106 105 104 PB13/ERX2/SPI0_NPCS1 103 102 101 PB6/ERX1 100 ...

Page 56

... Table 12-2. Number AT91SAM7XC512/256/128 Preliminary 56 AT91SAM7XC JTAG Boundary Scan Register (Continued) Bit Pin Name 75 74 PB3/ETX1 PB10/ETX2/SPI1_NPCS1 PB11/ETX3/SPI1_NPCS2 PA19/CANRX PA20/CANTX PA21/TF/SPI1_NPCS0 PA22/TK/SPI1_SPCK PB16/ECOL/SPI1_NPCS3 PB4/ECRS PA23/TD/SPI1_MOSI PA24/RD/SPI1_MISO PA25/RK/SPI1_NPCS1 PA26/RF/SPI1_NPCS2 PB18/EF100/ADTRG 34 Associated BSR Pin Type Cells INPUT PB3/ETX1 OUTPUT CONTROL INPUT IN/OUT OUTPUT ...

Page 57

... Table 12-2. Number 30 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary AT91SAM7XC JTAG Boundary Scan Register (Continued) Bit Pin Name 33 32 PB19/PWM0/TCLK1 31 29 PB20/PWM1/PCK0 PB21/PWM2/PCK2 PB22/PWM3/PCK2 PB23/TIOA0/DCD1 PB24/TIOB0/DSR1 PB25/TIOA1/DTR1 PB26/TIOB1/RI1 PA27DRXD/PCK3 PA28/DTXD PA29/FIQ/SPI1_NPCS3 1 Associated BSR Pin Type Cells INPUT IN/OUT OUTPUT CONTROL INPUT IN/OUT ...

Page 58

... PART NUMBER[27:12]: Product Part Number AT91SAM7XC512: 0x5B19 AT91SAM7XC256: 0x5B10 AT91SAM7XC128: 0x5B0F • MANUFACTURER IDENTITY[11:1] Set to 0x01F. Bit[0] Required by IEEE Std. 1149.1. Set to 0x1. AT91SAM7XC512: JTAG ID Code value is 05B1_903F AT91SAM7XC256: JTAG ID Code value is 05B1_003F AT91SAM7XC128: JTAG ID Code value is 05B0_F03F AT91SAM7XC512/256/128 Preliminary ...

Page 59

... A brownout detection is also available to prevent the processor from falling into an unpredictable state. 13.1 Block Diagram Figure 13-1. Reset Controller Block Diagram Main Supply 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Reset Controller bod_rst_en Brownout Manager brown_out Startup POR Counter ...

Page 60

... As soon as the pin NRST is asserted, the bit URSTS in RSTC_SR is set. This bit clears only when RSTC_SR is read. The Reset Controller can also be programmed to generate an interrupt instead of generating a reset so, the bit URSTIEN in RSTC_MR must be written at 1. AT91SAM7XC512/256/128 Preliminary 60 Figure 13-2 shows the block diagram of the NRST Manager. ...

Page 61

... The bit BODSTS can trigger an interrupt if the bit BODIEN is set in the RSTC_MR. At factory, the brownout reset is disabled. Figure 13-3. Brownout Manager 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Slow Clock cycles. This gives the approximate duration of an assertion between 60 µs bod_rst_en RSTC_SR brown_out ...

Page 62

... When VDDCORE is detected low by the Main Supply POR Cell, all reset signals are asserted immediately. Figure 13-4. Power-up Reset SLCK MCK Main Supply POR output proc_nreset periph_nreset NRST (nrst_out) AT91SAM7XC512/256/128 Preliminary 62 Figure 13-4, is hardcoded to comply with the Slow Clock Oscillator Startup Time Processor Startup = 3 cycles EXTERNAL RESET LENGTH = 2 cycles Any Freq. ...

Page 63

... NRST actually rises. Figure 13-5. User Reset State SLCK Any MCK Freq. NRST Resynch. 2 cycles proc_nreset RSTTYP Any periph_nreset NRST (nrst_out) 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Resynch. 2 cycles XXX >= EXTERNAL RESET LENGTH Processor Startup = 3 cycles 0x4 = User Reset ...

Page 64

... Brownout Reset. Figure 13-6. Brownout Reset State SLCK Any MCK Freq. brown_out or bod_reset proc_nreset RSTTYP Any periph_nreset NRST (nrst_out) AT91SAM7XC512/256/128 Preliminary 64 Resynch. Processor Startup 2 cycles = 3 cycles XXX 0x5 = Brownout Reset EXTERNAL RESET LENGTH 8 cycles (ERSTL=2) 6209F–ATARM–17-Feb-09 ...

Page 65

... As soon as a software operation is detected, the bit SRCMP (Software Reset Command in Progress) is set in the Status Register (RSTC_SR cleared as soon as the software reset is left. No other software reset can be performed while the SRCMP bit is set, and writing any value in RSTC_CR has no effect. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 65 ...

Page 66

... Figure 13-7. Software Reset AT91SAM7XC512/256/128 Preliminary 66 SLCK Any MCK Freq. Write RSTC_CR Resynch. 1 cycle proc_nreset if PROCRST=1 RSTTYP Any periph_nreset if PERRST=1 NRST (nrst_out) if EXTRST=1 SRCMP in RSTC_SR Processor Startup = 3 cycles XXX 0x3 = Software Reset EXTERNAL RESET LENGTH 8 cycles (ERSTL=2) 6209F–ATARM–17-Feb-09 ...

Page 67

... Reset, and the Watchdog is enabled by default and with a period set to a maximum. When the WDRSTEN in WDT_MR bit is reset, the watchdog fault has no impact on the reset controller. Figure 13-8. Watchdog Reset Only if WDRPROC = 0 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary SLCK Any MCK Freq. wd_fault proc_nreset ...

Page 68

... A watchdog event has priority over the current state. – The NRST has no effect. • When in Watchdog Reset: – The processor reset is active and so a Software Reset cannot be programmed. – A User Reset cannot be entered. AT91SAM7XC512/256/128 Preliminary 68 proc_nreset signal. 6209F–ATARM–17-Feb-09 ...

Page 69

... Reading the RSTC_SR register resets the BODSTS bit and clears the interrupt. Figure 13-9. Reset Controller Status and Interrupt MCK Peripheral Access 2 cycle resynchronization NRST NRSTL URSTS rstc_irq if (URSTEN = 0) and (URSTIEN = 1) 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 2 cycle resynchronization Figure read RSTC_SR 69 ...

Page 70

... Reset Controller (RSTC) User Interface Table 13-1. Register Mapping Offset Register 0x00 Control Register 0x04 Status Register 0x08 Mode Register AT91SAM7XC512/256/128 Preliminary 70 Name Access RSTC_CR Write-only RSTC_SR Read-only RSTC_MR Read-write Reset - 0x0000_0000 0x0000_0000 6209F–ATARM–17-Feb-09 ...

Page 71

... No effect KEY is correct, resets the peripherals. • EXTRST: External Reset effect KEY is correct, asserts the NRST pin. • KEY: Password Should be written at value 0xA5. Writing any other value in this field aborts the write operation. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary KEY – ...

Page 72

... Registers the NRST Pin Level at Master Clock (MCK). • SRCMP: Software Reset Command in Progress software command is being performed by the reset controller. The reset controller is ready for a software command software reset command is being performed by the reset controller. The reset controller is busy. AT91SAM7XC512/256/128 Preliminary – ...

Page 73

... This field defines the external reset length. The external reset is asserted during a time of 2 allows assertion duration to be programmed between 60 µs and 2 seconds. • KEY: Password Should be written at value 0xA5. Writing any other value in this field aborts the write operation. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary KEY ...

Page 74

... AT91SAM7XC512/256/128 Preliminary 74 6209F–ATARM–17-Feb-09 ...

Page 75

... Thus if the RTT is configured to trigger an interrupt, the interrupt occurs during 2 Slow Clock cycles after reading RTT_SR. To prevent several executions of the interrupt handler, the interrupt must be disabled in the interrupt handler and re-enabled when the status register is clear. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary set 0 RTT_SR RTTINC ...

Page 76

... RTT RTTINC (RTT_SR) ALMS (RTT_SR) APB Interface AT91SAM7XC512/256/128 Preliminary 76 Because of the asynchronism between the Slow Clock (SCLK) and the System Clock (MCK): 1) The restart of the counter and the reset of the RTT_VR current value register is effective only 2 slow clock cycles after the write of the RTTRST bit in the RTT_MR register. ...

Page 77

... Real-time Timer (RTT) User Interface Table 14-1. Register Mapping Offset Register 0x00 Mode Register 0x04 Alarm Register 0x08 Value Register 0x0C Status Register 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Name RTT_MR RTT_AR RTT_VR RTT_SR Access Reset Read-write 0x0000_8000 Read-write 0xFFFF_FFFF Read-only 0x0000_0000 ...

Page 78

... RTTINCIEN: Real-time Timer Increment Interrupt Enable 0 = The bit RTTINC in RTT_SR has no effect on interrupt The bit RTTINC in RTT_SR asserts interrupt. • RTTRST: Real-time Timer Restart 1 = Reloads and restarts the clock divider with the new programmed value. This also resets the 32-bit counter. AT91SAM7XC512/256/128 Preliminary – ...

Page 79

... Defines the alarm value (ALMV+1) compared with the Real-time Timer. 14.4.3 Real-time Timer Value Register Register Name: RTT_VR Access Type: Read-only • CRTV: Current Real-time Value Returns the current value of the Real-time Timer. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary ALMV ALMV ALMV ALMV 29 ...

Page 80

... The Real-time Alarm occurred since the last read of RTT_SR. • RTTINC: Real-time Timer Increment 0 = The Real-time Timer has not been incremented since the last read of the RTT_SR The Real-time Timer has been incremented since the last read of the RTT_SR. AT91SAM7XC512/256/128 Preliminary – ...

Page 81

... Multi-drive capability similar to an open drain I/O line. • Control of the the pull-up of the I/O line. • Input visibility and output control. The PIO Controller also features a synchronous output providing bits of data output in a single write operation. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 81 ...

Page 82

... Block Diagram Figure 15-1. Block Diagram AIC PMC Embedded Peripheral Embedded Peripheral Figure 15-2. Application Block Diagram Keyboard Driver Keyboard Driver AT91SAM7XC512/256/128 Preliminary 82 PIO Controller PIO Interrupt PIO Clock Data, Enable peripheral IOs Data, Enable peripheral IOs APB On-Chip Peripheral Drivers Control & ...

Page 83

... PIO Controller interrupt lines are connected among the interrupt sources 2 to 31. Refer to the PIO Controller peripheral identifier in the product description to identify the interrupt sources dedicated to the PIO Controllers. The PIO Controller interrupt can be generated only if the PIO Controller clock is enabled. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 83 ...

Page 84

... Figure 15-3. I/O Line Control Logic PIO_OER[0] PIO_OSR[0] PIO_ODR[0] Peripheral A Output Enable 0 Peripheral B 1 Output Enable PIO_ASR[0] PIO_ABSR[0] PIO_BSR[0] Peripheral A 0 Output 1 Peripheral B Output PIO_IFER[0] PIO_IFDR[0] AT91SAM7XC512/256/128 Preliminary 84 Figure 1 0 PIO_PER[0] PIO_PSR[0] PIO_PDR[0] PIO_MDER[0] PIO_MDDR[0] 0 PIO_SODR[0] 1 PIO_ODSR[0] PIO_CODR[0] PIO_PDSR[0] PIO_ISR[0] 0 Edge Detector Glitch ...

Page 85

... I/O line is controlled by the peripheral. Peripheral depending on the value in PIO_ABSR, determines whether the pin is driven or not. When the I/O line is controlled by the PIO controller, the pin can be configured to be driven. This is done by writing PIO_OER (Output Enable Register) and PIO_ODR (Output Disable Register). 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 85 ...

Page 86

... Output Line Timings Figure 15-4 directly writing PIO_ODSR. This last case is valid only if the corresponding bit in PIO_OWSR is set. Figure 15-4 AT91SAM7XC512/256/128 Preliminary 86 shows how the outputs are driven either by writing PIO_SODR or PIO_CODR also shows when the feedback in PIO_PDSR is available. 6209F–ATARM–17-Feb-09 ...

Page 87

... When the glitch filter is enabled, it does not modify the behavior of the inputs on the peripherals. It acts only on the value read in PIO_PDSR and on the input change interrupt detection. The glitch filters require that the PIO Controller clock is enabled. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary APB Access 2 cycles APB Access ...

Page 88

... When the software reads PIO_ISR, all the interrupts are automatically cleared. This signifies that all the interrupts that are pending when PIO_ISR is read must be handled. Figure 15-6. Input Change Interrupt Timings MCK Pin Level PIO_ISR Read PIO_ISR AT91SAM7XC512/256/128 Preliminary 1.5 cycles 1 cycle APB Access 1 cycle 2 cycles ...

Page 89

... I/O lines assigned to peripheral A functions with pull-up resistor • I/O lines assigned to peripheral B functions, no pull-up resistor • I/O line assigned to peripheral A with Input Change Interrupt and pull-up resistor Table 15-1. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Table 15-1 Programming Example Register PIO_PER ...

Page 90

... Multi-driver Enable Register 0x0054 Multi-driver Disable Register 0x0058 Multi-driver Status Register 0x005C Reserved 0x0060 Pull-up Disable Register 0x0064 Pull-up Enable Register 0x0068 Pad Pull-up Status Register 0x006C Reserved AT91SAM7XC512/256/128 Preliminary 90 Name PIO_PER PIO_PDR PIO_PSR PIO_OER PIO_ODR PIO_OSR PIO_IFER PIO_IFDR PIO_IFSR PIO_SODR PIO_CODR PIO_ODSR ...

Page 91

... PIO_ISR is reset at 0x0. However, the first read of the register may read a different value as input changes may have occurred. 5. Only this set of registers clears the status by writing 1 in the first register and sets the status by writing 1 in the second register. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Name (5) PIO_ASR (5) ...

Page 92

... Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: PIO Disable effect Disables the PIO from controlling the corresponding pin (enables peripheral control of the pin). AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 5 ...

Page 93

... PIO Controller Output Enable Register Name: PIO_OER Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Output Enable effect Enables the output on the I/O line. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 94

... PIO Controller Output Status Register Name: PIO_OSR Access Type: Read-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Output Status 0 = The I/O line is a pure input The I/O line is enabled in output. AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 95

... PIO_IFDR Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Input Filter Disable effect Disables the input glitch filter on the I/O line. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 96

... PIO Controller Set Output Data Register Name: PIO_SODR Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Set Output Data effect Sets the data to be driven on the I/O line. AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 97

... P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Output Data Status 0 = The data to be driven on the I/O line The data to be driven on the I/O line is 1. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 ...

Page 98

... PIO Controller Interrupt Enable Register Name: PIO_IER Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Input Change Interrupt Enable effect Enables the Input Change Interrupt on the I/O line. AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 99

... P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Input Change Interrupt Mask 0 = Input Change Interrupt is disabled on the I/O line Input Change Interrupt is enabled on the I/O line. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 ...

Page 100

... PIO Multi-driver Enable Register Name: PIO_MDER Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Multi Drive Enable effect Enables Multi Drive on the I/O line. AT91SAM7XC512/256/128 Preliminary 100 P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 101

... P7 P6 • P0-P31: Multi Drive Status The Multi Drive is disabled on the I/O line. The pin is driven at high and low level The Multi Drive is enabled on the I/O line. The pin is driven at low level only. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 ...

Page 102

... PIO Pull Up Enable Register Name: PIO_PUER Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Pull Up Enable effect Enables the pull up resistor on the I/O line. AT91SAM7XC512/256/128 Preliminary 102 P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 103

... PIO Peripheral A Select Register Name: PIO_ASR Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Peripheral A Select effect Assigns the I/O line to the Peripheral A function. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 104

... Access Type: Read-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Peripheral A B Status The I/O line is assigned to the Peripheral The I/O line is assigned to the Peripheral B. AT91SAM7XC512/256/128 Preliminary 104 P29 P28 P27 P21 P20 P19 P13 P12 P11 5 ...

Page 105

... Name: PIO_OWDR Access Type: Write-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Output Write Disable effect Disables writing PIO_ODSR for the I/O line. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 106

... Read-only 31 30 P31 P30 23 22 P23 P22 15 14 P15 P14 • P0-P31: Output Write Status Writing PIO_ODSR does not affect the I/O line Writing PIO_ODSR affects the I/O line. AT91SAM7XC512/256/128 Preliminary 106 P29 P28 P27 P21 P20 P19 P13 P12 P11 ...

Page 107

... Block Diagram Figure 16-1. Periodic Interval Timer 0 MCK 20-bit Counter MCK/16 CPIV Prescaler CPIV 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary PIT_MR PIV = ? 0 1 PIT_PIVR PIT_PIIR set 0 PIT_SR PITS reset 0 ...

Page 108

... PIT counting. After the PIT Enable bit is reset (PITEN= 0), the CPIV goes on counting until the PIV value is reached, and is then reset. PIT restarts counting, only if the PITEN is set again. The PIT is stopped when the core enters debug state. AT91SAM7XC512/256/128 Preliminary 108 Figure 16-2 illustrates 6209F– ...

Page 109

... Figure 16-2. Enabling/Disabling PIT with PITEN 15 MCK Prescaler 0 PITEN CPIV 0 PICNT PITS (PIT_SR) APB Interface 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary MCK 1 PIV - 1 PIV 1 0 read PIT_PIVR APB cycle APB cycle restarts MCK Prescaler 109 ...

Page 110

... Periodic Interval Timer (PIT) User Interface Table 16-1. Register Mapping Offset Register 0x00 Mode Register 0x04 Status Register 0x08 Periodic Interval Value Register 0x0C Periodic Interval Image Register AT91SAM7XC512/256/128 Preliminary 110 Name Access PIT_MR Read-write PIT_SR Read-only PIT_PIVR Read-only PIT_PIIR Read-only Reset ...

Page 111

... PITS: Periodic Interval Timer Status 0 = The Periodic Interval timer has not reached PIV since the last read of PIT_PIVR The Periodic Interval timer has reached PIV since the last read of PIT_PIVR. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary – – – ...

Page 112

... PIT_PIIR Access Type: Read-only PICNT • CPIV: Current Periodic Interval Value Returns the current value of the periodic interval timer. • PICNT: Periodic Interval Counter Returns the number of occurrences of periodic intervals since the last read of PIT_PIVR. AT91SAM7XC512/256/128 Preliminary 112 PICNT CPIV CPIV ...

Page 113

... Block Diagram Figure 17-1. Watchdog Timer Block Diagram write WDT_MR WDT_CR WDRSTT WDT_MR read WDT_SR or reset 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary WDT_MR WDV reload 1 0 12-bit Down Counter WDD Current Value <= WDD ...

Page 114

... Writing the WDT_MR reloads and restarts the down counter. While the processor is in debug state or in idle mode, the counter may be stopped depending on the value programmed for the bits WDIDLEHLT and WDDBGHLT in the WDT_MR. AT91SAM7XC512/256/128 Preliminary 114 6209F–ATARM–17-Feb-09 ...

Page 115

... Figure 17-2. Watchdog Behavior FFF Normal behavior WDV Forbidden Window WDD Permitted Window 0 Watchdog Fault 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Watchdog Error WDT_CR = WDRSTT Watchdog Underflow if WDRSTEN WDRSTEN is 0 115 ...

Page 116

... WDRSTT: Watchdog Restart 0: No effect. 1: Restarts the Watchdog. • KEY: Password Should be written at value 0xA5. Writing any other value in this field aborts the write operation. AT91SAM7XC512/256/128 Preliminary 116 Name WDT_CR WDT_MR WDT_SR KEY – – ...

Page 117

... WDIDLEHLT: Watchdog Idle Halt 0: The Watchdog runs when the system is in idle mode. 1: The Watchdog stops when the system is in idle state. • WDDIS: Watchdog Disable 0: Enables the Watchdog Timer. 1: Disables the Watchdog Timer. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary WDDBGHLT 21 20 ...

Page 118

... No Watchdog underflow occurred since the last read of WDT_SR least one Watchdog underflow occurred since the last read of WDT_SR. • WDERR: Watchdog Error 0: No Watchdog error occurred since the last read of WDT_SR least one Watchdog error occurred since the last read of WDT_SR. AT91SAM7XC512/256/128 Preliminary 118 – ...

Page 119

... Mode Register. Its offset is 0x60 with respect to the System Controller offset. This register controls the Voltage Regulator Mode. Setting PSTDBY (bit 0) puts the Voltage Regulator in Standby Mode or Low-power Mode. On reset, the PSTDBY is reset wake up the Voltage Regulator in Normal Mode. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 119 ...

Page 120

... Access Type: Read/Write 31 30 – – – – – – – – • PSTDBY: Periodic Interval Value 0 = Voltage regulator in normal mode Voltage regulator in standby mode (low-power mode). AT91SAM7XC512/256/128 Preliminary 120 Name VREG_MR – – – – – – – – – ...

Page 121

... Embedded Flash Controller. 19.2 Block Diagram Figure 19-1. Memory Controller Block Diagram ARM7TDMI Processor Abort EMAC DMA Peripheral DMA Controller 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Memory Controller ASB Abort Status Address Misalignment Decoder Bus Detector Arbiter User Interface ...

Page 122

... One 256-Mbyte address space reserved for the embedded peripherals • An undefined address space of 3584M bytes representing fourteen 256-Mbyte areas that return an Abort if accessed Figure 19-2 Figure 19-2. Memory Areas AT91SAM7XC512/256/128 Preliminary 122 shows the assignment of the 256-Mbyte memory areas. 0x0000 0000 256M Bytes ...

Page 123

... The Remap Command can be cancelled by writing the MC_RCR RCB field to one, which acts as a toggling command. This allows easy debug of the user-defined boot sequence by offering a simple way to put the chip in the same configuration as after a reset. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 0x0000 0000 Internal Memory Area 0 0x000F FFFF ...

Page 124

... Note that the accesses of the ARM processor when it is fetching instructions are not checked. AT91SAM7XC512/256/128 Preliminary 124 6209F–ATARM–17-Feb-09 ...

Page 125

... As the requested address is saved in the Abort Status Register and the address of the instruc- tion generating the misalignment is saved in the Abort Link Register of the processor, detection and fix of this kind of software bugs is simplified. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 125 ...

Page 126

... MC Abort Status Register 0x08 MC Abort Address Status Register 0x10-0x5C Reserved 0x60 EFC0 Configuration Registers (1) 0x70 EFC1 Configuration Registers Note: 1. EFC1 pertains to AT91SAM7XC512 only. AT91SAM7XC512/256/128 Preliminary 126 Name Access MC_RCR Write-only MC_ASR Read-only MC_AASR Read-only See the Embedded Flash Controller Section Reset ...

Page 127

... RCB: Remap Command Bit 0: No effect. 1: This Command Bit acts on a toggle basis: writing a 1 alternatively cancels and restores the remapping of the page zero memory devices. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary – – – – – ...

Page 128

... ABTSZ • ABTTYP: Abort Type Status ABTTYP • MST_EMAC: EMAC Abort Source 0: The last aborted access was not due to the EMAC. 1: The last aborted access was due to the EMAC. AT91SAM7XC512/256/128 Preliminary 128 – – – – – – – – – ...

Page 129

... At least one abort due to the PDC occurred since the last read of MC_ASR. • SVMST_ARM: Saved ARM Abort Source 0: No abort due to the ARM occurred since the last read of MC_ASR notified in the bit MST_ARM least one abort due to the ARM occurred since the last read of MC_ASR. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 129 ...

Page 130

... MC Abort Address Status Register Register Name: MC_AASR Access Type: Read-only Reset Value: 0x0 Offset: 0x08 • ABTADD: Abort Address This field contains the address of the last aborted access. AT91SAM7XC512/256/128 Preliminary 130 ABTADD ABTADD ABTADD ABTADD 6209F–ATARM–17-Feb-09 ...

Page 131

... Code Fetch with its system of 32-bit buffers. It also manages the programming, erasing, locking and unlocking sequences using a full set of commands. The AT91SAM7XC512 is equipped with two EFCs, EFC0 and EFC1. EFC1 does not feature the Security bit and GPNVM bits. The Security and GPNVM bits embedded only on EFC0 apply to the two blocks in the AT91SAM7XC512 ...

Page 132

... The Flash memory is accessible through 8-, 16- and 32-bit reads. As the Flash block size is smaller than the address space reserved for the internal memory area, the embedded Flash wraps around the address space and appears to be repeated within it. AT91SAM7XC512/256/128 Preliminary 132 Flash Memory ...

Page 133

... Flash Access Buffer (32 bits) Data To ARM Note: When FWS is equal case of sequential reads, all the accesses are performed in a single-cycle access (except for the first one). 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary @Byte 8 @Byte 6 @Byte 4 Bytes 4-7 Bytes 8-11 Bytes 4-7 Bytes 0-3 ...

Page 134

... Table 20-2. Command Write page Set Lock Bit Write Page and Lock Clear Lock Bit Erase all Set General-purpose NVM Bit Clear General-purpose NVM Bit Set Security Bit AT91SAM7XC512/256/128 Preliminary 134 3 Wait State Cycles 3 Wait State Cycles @ Bytes 4-7 Bytes 0-3 ...

Page 135

... When the current command writes or erases a page in a locked region, the command has no effect on the whole memory plane; however, the LOCKE flag is set in the MC_FSR register. This flag is automatically cleared by a read access to the MC_FSR register. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 135 ...

Page 136

... NEBP bit in the MC_FMR register before writing the command in the MC_FCR register. By setting the NEBP bit in the MC_FMR register, a page can be programmed in several steps if it has been erased before (see AT91SAM7XC512/256/128 Preliminary 136 Read Status: MC_FSR No ...

Page 137

... Lock Error: The page to be programmed belongs to a locked region. A command must be previously run to unlock the corresponding region. 20.2.4.2 Erase All Command The entire memory can be erased if the Erase All Command (EA) in the Flash Command Regis- ter MC_FCR is written. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 32 bits wide ... ...

Page 138

... The Unlock command programs the lock bit to 1; the corresponding bit LOCKSx in MC_FSR reads 0. The Lock command programs the lock bit to 0; the corresponding bit LOCKSx in MC_FSR reads 1. Note: AT91SAM7XC512/256/128 Preliminary 138 Access to the Flash in Read Mode is permitted when a Lock or Unlock command is performed. 6209F–ATARM–17-Feb-09 ...

Page 139

... The goal of the security bit is to prevent external access to the internal bus system. (Does not apply to EFC1 on the AT91SAM7XC512.) JTAG, Fast Flash Programming and Flash Serial Test Interface features are disabled. Once set, this bit can be reset only by an external hardware ERASE request to the chip ...

Page 140

... When the locking completes, the bit FRDY in the Flash Programming Status Register (MC_FSR) rises interrupt has been enabled by setting the bit FRDY in MC_FMR, the interrupt line of the Memory Controller is activated. When the security bit is active, the SECURITY bit in the MC_FSR is set. AT91SAM7XC512/256/128 Preliminary 140 6209F–ATARM–17-Feb-09 ...

Page 141

... Embedded Flash Controller (EFC ) User Interface The User Interface of the EFC is integrated within the Memory Controller with Base Address: 0xFFFF FF00. The AT91SAM7XC512 is equipped with two EFCs, EFC0 and EFC1, as described in the Register Mapping tables and Reg- ister descriptions that follow. ...

Page 142

... Programming Error generates an interrupt. • NEBP: No Erase Before Programming 0: A page erase is performed before programming erase is performed before programming. • FWS: Flash Wait State This field defines the number of wait states for read and write operations: FWS AT91SAM7XC512/256/128 Preliminary 142 – – – ...

Page 143

... When writing the rest of the Flash, this field defines the number of Master Clock cycles in 1.5 microseconds. This number must be rounded up. Warning: The value 0 is only allowed for a master clock period superior to 30 microseconds. Warning: In order to guarantee valid operations on the flash memory, the field Flash Microsecond Cycle Number (FMCN) must be correctly programmed. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 143 ...

Page 144

... FCMD: Flash Command This field defines the Flash commands: FCMD 0000 0001 0010 0011 0100 1000 1011 1101 1111 Others AT91SAM7XC512/256/128 Preliminary 144 KEY – – – PAGEN – – Operations No command. Does not raise the Programming Error Status flag in the Flash Status Register MC_FSR. ...

Page 145

... This field should be written with the value 0x5A to enable the command defined by the bits of the register. If the field is writ- ten with a different value, the write is not performed and no action is started. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary PAGEN Description PAGEN defines the page number to be written. ...

Page 146

... SECURITY: Security Bit Status (Does not apply to EFC1 on the AT91SAM7XC512.) 0: The security bit is inactive. 1: The security bit is active. • GPNVMx: General-purpose NVM Bit Status (Does not apply to EFC1 on the AT91SAM7XC512.) 0: The corresponding general-purpose NVM bit is inactive. 1: The corresponding general-purpose NVM bit is active. ...

Page 147

... In Fast Flash Programming Mode, the device specific test mode. Only a certain set of pins is significant, the rest of the PIOs are used as inputs with a pull-up. The crystal oscillator is in bypass mode. Other pins must be left unconnected. Figure 21-1. Parallel Programming Interface 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary TST VDDIO PGMEN0 VDDIO ...

Page 148

... Depending on the MODE settings, DATA is latched in different internal registers. Table 21-2. MODE[3:0] 0000 0001 0010 0101 Default When MODE is equal to CMDE, then a new command (strobed on DATA[15:0] signals) is stored in the command register. AT91SAM7XC512/256/128 Preliminary 148 Type Power Power Power Power Power Ground Clocks ...

Page 149

... GGPB SSE GSE WRAM SEFC GVE 1. Applies to AT91SAM7XC512 external clock is available. POR_RESET POR_RESET After reset, the device is clocked by the internal RC oscillator. Before clearing RDY signal external clock ( > 32 kHz) is connected to XIN, then the device switches on the external clock. Else, XIN input is not considered. A higher frequency on XIN speeds up the programmer handshake ...

Page 150

... Waits for RDY low 4 Releases MODE and DATA signals 5 Sets NCMD signal 6 Waits for RDY high 21.2.4.2 Read Handshaking For details on the read handshaking sequence, refer to Figure 21-3. AT91SAM7XC512/256/128 Preliminary 150 NCMD 2 3 RDY NOE NVALID DATA[15:0] 1 MODE[3:0] Device Action Waits for NCMD low ...

Page 151

... AT91SAM7XC512/256/128 Preliminary Device Action Waits for NCMD low Latch MODE and DATA Clears RDY signal Waits for NOE Low Sets DATA bus in output mode and outputs the flash contents. Clears NVALID signal Waits for NOE high ...

Page 152

... This command is used to erase the Flash memory planes. All lock regions must be unlocked before the Full Erase command by using the CLB command. Otherwise, the erase command is aborted and no page is erased. Table 21-8. Step 1 2 AT91SAM7XC512/256/128 Preliminary 152 Write Command Handshake Sequence MODE[3:0] Write handshaking CMDE ...

Page 153

... General-purpose NVM bits can be read using the Get GPNVM Bit command (GGPB). The n GP NVM bit is active when bit n of the bit mask is set.. Table 21-12. Get GP NVM Bit Command Step 1 2 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Set and Clear Lock Bit Command Handshake Sequence Write handshaking Write handshaking Handshake Sequence Write handshaking ...

Page 154

... Fast Flash programming is disabled. No other command can be run. An event on the Erase pin can erase the security bit once the contents of the Flash have been erased. The AT91SAM7XC512 security bit is controlled by the EFC0. To use the Set Security Bit com- mand, the EFC0 must be selected using the Select EFC command Table 21-13 ...

Page 155

... Get Version Command The Get Version (GVE) command retrieves the version of the FFPI interface. Table 21-16. Get Version Command Step 1 2 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Handshake Sequence MODE[3:0] ... ... Write handshaking ADDR0 Write handshaking ADDR1 Write handshaking DATA ...

Page 156

... I/O Lines Power Supply VDDCORE Core Power Supply VDDPLL PLL Power Supply GND Ground Main Clock Input. This input can be tied to GND. In this XIN case, the device is clocked by the internal RC oscillator. AT91SAM7XC512/256/128 Preliminary 156 VDDIO TST VDDIO PGMEN0 VDDIO PGMEN1 TDI TDO TMS TCK ...

Page 157

... Note: Table 21-18. Reset TAP Controller and Go to Select-DR-Scan 21.3.3 Read/Write Handshake The read/write handshake is done by carrying out read/write operations on two registers of the device that are accessible through the JTAG: 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Type Test Input Input Input JTAG ...

Page 158

... Debug Comms Registers. 21.3.4.1 Flash Read Command This command is used to read the Flash contents. The memory map is accessible through this command. Memory is seen as an array of words (32-bit wide). The read command can start at AT91SAM7XC512/256/128 Preliminary 158 r/w 4 Address ...

Page 159

... Flash Erase Page and Write the Lock command (EWPL) combines EWP and WPL commands. 21.3.4.3 Flash Full Erase Command This command is used to erase the Flash memory planes. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary DR Data (Number of Words to Read) << READ Address Memory [address] Memory [address+4] ...

Page 160

... GP NVM bits can be read using Get GPNVM Bit command (GGPB). When a bit set in the Bit Mask is returned, then the corresponding GPNVM bit is set. Table 21-25. Get General-purpose NVM Bit Command Read/Write Write Read AT91SAM7XC512/256/128 Preliminary 160 DR Data EA DR Data SLB or CLB ...

Page 161

... Fast Flash programming is disabled. No other command can be run. Only an event on the Erase pin can erase the security bit once the contents of the Flash have been erased. The AT91SAM7XC512 security bit is controlled by the EFC0. To use the Set Security Bit com- mand, the EFC0 must be selected using the Select EFC command. ...

Page 162

... Get Version Command The Get Version (GVE) command retrieves the version of the FFPI interface. Table 21-29. Get Version Command Read/Write Write Read AT91SAM7XC512/256/128 Preliminary 162 DR Data GVE Version 6209F–ATARM–17-Feb-09 ...

Page 163

... PLL setup: PLL is initialized to generate a 48 MHz clock necessary to use the USB Device 9. Disable of the Watchdog and enable of the user reset 10. Initialization of the USB Device Port 11. Jump to SAM-BA Boot sequence (see 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary ® Boot is then executed. It waits for transactions either on the USB device the Device USB Enumeration Setup ...

Page 164

... The SAM-BA boot principle is to: – Check if USB Device enumeration has occurred – Check if the AutoBaudrate sequence has succeeded (see Figure 22-2. AutoBaudrate Flow Diagram – Once the communication interface is identified, the application runs in an infinite AT91SAM7XC512/256/128 Preliminary 164 Device Setup Character '0x80' ...

Page 165

... The size of the binary file to send depends on the SRAM size embedded in the product. In all cases, the size of 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Commands Available through the SAM-BA Boot Action Argument(s) ...

Page 166

... The Vendor ID is Atmel’s vendor ID 0x03EB. The product ID is 0x6124. These references are used by the host operating system to mount the correct driver. On Windows systems, the INF files contain the correspondence between vendor ID and product ID. AT91SAM7XC512/256/128 Preliminary 166 to 01) shows a transmission using this protocol. ...

Page 167

... BA Boot commands are sent by the host through the endpoint 1. If required, the message is split by the host into several data payloads by the host driver. If the command requires a response, the host can send IN transactions to pick up the response. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Handled Standard Requests Definition Returns the current device configuration value. ...

Page 168

... Hardware and Software Constraints • SAM-BA boot copies itself in the SRAM and uses a block of internal SRAM for variables and stacks. The remaining available size for the user code is 122880 bytes for AT91SAM7XC512, 57344 bytes for AT91SAM7XC256 and 24576 bytes for AT91SAM7XC128. ...

Page 169

... The peripheral triggers PDC transfers using transmit and receive signals. When the pro- grammed data is transferred, an end of transfer interrupt is generated by the corresponding peripheral. 23.2 Block Diagram Figure 23-1. Block Diagram 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Peripheral DMA Controller Peripheral THR PDC Channel 0 PDC Channel 1 RHR Status & ...

Page 170

... If the Next Counter Register is equal to zero, the PDC disables the trigger while activating the related peripheral end flag. If the counter is reprogrammed while the PDC is operating, the number of transfers is updated and the PDC counts transfers from the new value. AT91SAM7XC512/256/128 Preliminary 170 6209F–ATARM–17-Feb-09 ...

Page 171

... If simultaneous requests of the same type (receiver or transmitter) occur on identical peripher- als, the priority is determined by the numbering of the peripherals. If transfer requests are not simultaneous, they are treated in the order they occurred. Requests from the receivers are handled first and then followed by transmitter requests. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 171 ...

Page 172

... PDC Transfer Status Register Note: 1. PERIPH: Ten registers are mapped in the peripheral memory space at the same offset. These can be defined by the user according to the function and the peripheral desired (DBGU, USART, SSC, SPI, MCI, etc.). AT91SAM7XC512/256/128 Preliminary 172 Name Access (1) ...

Page 173

... RXPTR: Receive Pointer Address Address of the next receive transfer. 23.4.2 PDC Receive Counter Register Register Name: PERIPH_RCR Access Type: Read/Write • RXCTR: Receive Counter Value Number of receive transfers to be performed. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary RXPTR RXPTR RXPTR RXPTR 29 28 ...

Page 174

... Address of the transmit buffer. 23.4.4 PDC Transmit Counter Register Register Name: PERIPH_TCR Access Type: Read/Write • TXCTR: Transmit Counter Value TXCTR is the size of the transmit transfer to be performed. At zero, the peripheral DMA transfer is stopped. AT91SAM7XC512/256/128 Preliminary 174 TXPTR TXPTR TXPTR TXPTR ...

Page 175

... RXNPTR is the address of the next buffer to fill with received data when the current buffer is full. 23.4.6 PDC Receive Next Counter Register Register Name: PERIPH_RNCR Access Type: Read/Write • RXNCR: Receive Next Counter Value RXNCR is the size of the next buffer to receive. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary RXNPTR RXNPTR RXNPTR RXNPTR 29 ...

Page 176

... TXNPTR is the address of the next buffer to transmit when the current buffer is empty. 23.4.8 PDC Transmit Next Counter Register Register Name: PERIPH_TNCR Access Type: Read/Write • TXNCR: Transmit Next Counter Value TXNCR is the size of the next buffer to transmit. AT91SAM7XC512/256/128 Preliminary 176 TXNPTR TXNPTR TXNPTR ...

Page 177

... RXTDIS: Receiver Transfer Disable effect Disables the receiver PDC transfer requests. • TXTEN: Transmitter Transfer Enable effect Enables the transmitter PDC transfer requests. • TXTDIS: Transmitter Transfer Disable effect Disables the transmitter PDC transfer requests 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary – – – – ...

Page 178

... RXTEN: Receiver Transfer Enable 0 = Receiver PDC transfer requests are disabled Receiver PDC transfer requests are enabled. • TXTEN: Transmitter Transfer Enable 0 = Transmitter PDC transfer requests are disabled Transmitter PDC transfer requests are enabled. AT91SAM7XC512/256/128 Preliminary 178 – – – ...

Page 179

... The fast forcing feature redirects any internal or external interrupt source to provide a fast inter- rupt rather than a normal interrupt. 24.2 Block Diagram Figure 24-1. Block Diagram 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary FIQ AIC IRQ0-IRQn Up to Thirty-two Sources Embedded ...

Page 180

... AIC Detailed Block Diagram Figure 24-3. AIC Detailed Block Diagram 24.5 I/O Line Description Table 24-1. I/O Line Description Pin Name FIQ IRQ0 - IRQn AT91SAM7XC512/256/128 Preliminary 180 Standalone OS Drivers Applications General OS Interrupt Handler Advanced Interrupt Controller Embedded Peripherals Advanced Interrupt Controller ...

Page 181

... The peripheral identification defined at the product level corresponds to the interrupt source number (as well as the bit number controlling the clock of the peripheral). Consequently, to sim- plify the description of the functional operations and the user interface, the interrupt sources are named FIQ, SYS, and PID2 to PID31. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 181 ...

Page 182

... The AIC_ISR register reads the number of the current interrupt (see 186) and the register AIC_CISR gives an image of the signals nIRQ and nFIQ driven on the processor. Each status referred to above can be used to optimize the interrupt handling of the systems. AT91SAM7XC512/256/128 Preliminary 182 (See “Priority Controller” on page 186.) The automatic clear reduces See “ ...

Page 183

... Internal Interrupt Source Input Stage Figure 24-4. 24.7.1.6 External Interrupt Source Input Stage Figure 24-5. External Interrupt Source Input Stage Source i AIC_ISCR AIC_ICCR 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary Internal Interrupt Source Input Stage AIC_SMRI (SRCTYPE) Level/ Source i Edge Edge Detector Set ...

Page 184

... The PIO Controller multiplexing has no effect on the interrupt latencies of the external interrupt sources. 24.7.2.1 External Interrupt Edge Triggered Source Figure 24-6. AT91SAM7XC512/256/128 Preliminary 184 External Interrupt Edge Triggered Source MCK IRQ or FIQ (Positive Edge) IRQ or FIQ ...

Page 185

... External Interrupt Level Sensitive Source Figure 24-7. 24.7.2.3 Internal Interrupt Edge Triggered Source Figure 24-8. 24.7.2.4 Internal Interrupt Level Sensitive Source Figure 24-9. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary External Interrupt Level Sensitive Source MCK IRQ or FIQ (High Level) IRQ or FIQ (Low Level) nIRQ Maximum IRQ ...

Page 186

... This feature offers a way to branch in one single instruction to the handler corresponding to the current interrupt, as AIC_IVR is mapped at the absolute address 0xFFFF F100 and thus acces- sible from the ARM interrupt vector at address 0x0000 0018 through the following instruction: LDR AT91SAM7XC512/256/128 Preliminary 186 PC,[PC,# -&F20] 6209F–ATARM–17-Feb-09 ...

Page 187

... For example, the instruction SUB PC, LR, #4 may be used. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary priority. The current level is the priority level of the current interrupt. must be read in order to de-assert nIRQ. 187 ...

Page 188

... PC. This has the effect of returning from the interrupt to whatever was being exe- cuted before, and of loading the CPSR with the stored SPSR, masking or unmasking the interrupts depending on the state saved in SPSR_irq. Note: AT91SAM7XC512/256/128 Preliminary 188 If the interrupt is programmed to be level sensitive, the source of the interrupt must be cleared dur- ing this phase. ...

Page 189

... ARM core adjusts R14_fiq, decre- menting it by four. 2. The ARM core enters FIQ mode. 3. When the instruction loaded at address 0x1C is executed, the program counter is loaded with the value read in AIC_FVR. Reading the AIC_FVR has effect of automati- 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary PC,[PC,# -&F20] 189 ...

Page 190

... Source 0 when the fast forcing feature is used and the interrupt source should be cleared by writing to the Interrupt Clear Command Register (AIC_ICCR). AT91SAM7XC512/256/128 Preliminary 190 The “F” bit in SPSR is significant set, it indicates that the ARM core was just about to mask FIQ interrupts when the mask instruction was interrupted ...

Page 191

... Fast Interrupt sources. Figure 24-10. Fast Forcing Source 0 _ FIQ Input Stage Automatic Clear Source n Input Stage Automatic Clear 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary AIC_IPR AIC_IMR Read FVR if Fast Forcing is disabled on Sources 1 to 31. AIC_FFSR AIC_IPR AIC_IMR Read IVR if Source n is the current interrupt and if Fast Forcing is disabled on Source n ...

Page 192

... AIC to assert the nIRQ, but no longer present when AIC_IVR is read. This is most prone to occur when: • An external interrupt source is programmed in level-sensitive mode and an active level occurs for only a short time. AT91SAM7XC512/256/128 Preliminary 192 6209F–ATARM–17-Feb-09 ...

Page 193

... Control Register) is set. However, this mask does not prevent waking up the processor if it has entered Idle Mode. This function facilitates synchronizing the processor on a next event and, as soon as the event occurs, performs subsequent operations without having to handle an interrupt strongly recommended to use this mask with caution. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary 193 ...

Page 194

... The reset value of this register depends on the level of the external interrupt source. All other sources are cleared at reset, thus not pending. 2. PID2...PID31 bit fields refer to the identifiers as defined in the Peripheral Identifiers Section of the product datasheet. AT91SAM7XC512/256/128 Preliminary 194 Name AIC_SMR0 ...

Page 195

... The priority level is not used for the FIQ in the related SMR register AIC_SMRx. • SRCTYPE: Interrupt Source Type The active level or edge is not programmable for the internal interrupt sources. SRCTYPE 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary – – – – – – ...

Page 196

... The Interrupt Vector Register contains the vector programmed by the user in the Source Vector Register corresponding to the current interrupt. The Source Vector Register is indexed using the current interrupt number when the Interrupt Vector Register is read. When there is no current interrupt, the Interrupt Vector Register reads the value stored in AIC_SPU. AT91SAM7XC512/256/128 Preliminary 196 29 28 ...

Page 197

... AIC_ISR Access Type: Read-only Reset Value – – – – – – – – • IRQID: Current Interrupt Identifier The Interrupt Status Register returns the current interrupt source number. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary FIQV FIQV FIQV FIQV – – – 21 ...

Page 198

... Access Type: Read-only Reset Value PID31 PID30 23 22 PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • FIQ, SYS, PID2-PID31: Interrupt Mask 0 = Corresponding interrupt is disabled Corresponding interrupt is enabled. AT91SAM7XC512/256/128 Preliminary 198 PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 ...

Page 199

... AIC_IECR Access Type: Write-only 31 30 PID31 PID30 23 22 PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • FIQ, SYS, PID2-PID3: Interrupt Enable effect Enables corresponding interrupt. 6209F–ATARM–17-Feb-09 AT91SAM7XC512/256/128 Preliminary – – – – – – – – – – ...

Page 200

... Register Name: AIC_ICCR Access Type: Write-only 31 30 PID31 PID30 23 22 PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • FIQ, SYS, PID2-PID31: Interrupt Clear effect Clears corresponding interrupt. AT91SAM7XC512/256/128 Preliminary 200 PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 ...

Related keywords