The Atmel SAM7X512/256/128 is a highly-integrated Flash microcontroller based on
the 32-bit ARM
and 128/64/32 Kbytes of SRAM, a large set of peripherals, including an 802.3 Ethernet
MAC, and a CAN controller. A complete set of system functions minimizes the number
of external components.
The embedded Flash memory can be programmed in-system via the JTAG-ICE
interface or via a parallel interface on a production programmer prior to mounting. Builtin lock bits and a security bit protect the firmware from accidental overwrite and
preserve its confidentiality.
The SAM7X512/256/128 system controller includes a reset controller capable of
managing the power-on sequence of the microcontroller and the complete system.
Correct device operation can be monitored by a built-in brownout detector and a
watchdog running off an integrated RC oscillator.
By combining the ARM7TDMI
range of peripheral functions, including USART, SPI, CAN controller, Ethernet MAC,
Timer Counter, RTT and analog-to-digital converters on a monolithic chip, the
SAM7X512/256/128 is a powerful device that provides a flexible, cost-effective solution
to many embedded control applications requiring communication over Ethernet, wired
CAN and ZigBee
®
RISC processor. It features 512/256/128 Kbytes of high-speed Flash
®
processor with on-chip Flash and SRAM, and a wide
®
wireless networks.
6120K–ATARM–11-Feb-14
Features
Incorporates the ARM7TDMI ARM Thumb
High-performance 32-bit RISC Architecture
High-density 16-bit Instruction Set
Leader in MIPS/Watt
EmbeddedICE
™
In-circuit Emulation, Debug Communication Channel Support
®
Processor
Internal High-speed Flash
512 Kbytes (SAM7X512) Organized in Two Banks of 1024 Pages of
256 Bytes (Dual Plane)
256 Kbytes (SAM7X256) Organized in 1024 Pages of 256 Bytes (Single Plane)
128 Kbytes (SAM7X128) Organized in 512 Pages of 256 Bytes (Single Plane)
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,
Full Erase Time: 15 ms
10,000 Write Cycles, 10-year Data Retention Capability,
Sector Lock Capabilities, Flash Security Bit
Fast Flash Programming Interface for High Volume Production
Internal High-speed SRAM, Single-cycle Access at Maximum Speed
Embedded Flash Controller, Abort Status and Misalignment Detection
Reset Controller (RSTC)
Based on Power-on Reset Cells and Low-power Factory-calibrated Brownout Detector
Provides External Reset Signal Shaping and Reset Source Status
Clock Generator (CKGR)
Low-power RC Oscillator, 3 to 20 MHz On-chip Oscillator and one PLL
Power Management Controller (PMC)
Power Optimization Capabilities, Including Slow Clock Mode (Down to 500 Hz) and Idle Mode
Four Programmable External Clock Signals
Advanced Interrupt Controller (AIC)
Individually Maskable, Eight-level Priority, Vectored Interrupt Sources
Two External Interrupt Sources and One Fast Interrupt Source, Spurious Interrupt Protected
Debug Unit (DBGU)
2-wire UART and Support for Debug Communication Channel interrupt, Programmable ICE Access Prevention
Mode for General Purpose 2-wire UART Serial Communication
Periodic Interval Timer (PIT)
20-bit Programmable Counter plus 12-bit Interval Counter
Windowed Watchdog (WDT)
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
Real-time Timer (RTT)
32-bit Free-running Counter with Alarm
Runs Off the Internal RC Oscillator
Two Parallel Input/Output Controllers (PIO)
Sixty-two Programmable I/O Lines Multiplexed with up to Two Peripheral I/Os
Input Change Interrupt Capability on Each I/O Line
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
2
Individually Programmable Open-drain, Pull-up Resistor and Synchronous Output
Thirteen Peripheral DMA Controller (PDC) Channels
One USB 2.0 Full Speed (12 Mbits per second) Device Port
Media Independent Interface (MII) or Reduced Media Independent Interface (RMII)
Integrated 28-byte FIFOs and Dedicated DMA Channels for Transmit and Receive
One Part 2.0A and Part 2.0B Compliant CAN Controller
Eight Fully-programmable Message Object Mailboxes, 16-bit Time Stamp Counter
One Synchronous Serial Controller (SSC)
Independent Clock and Frame Sync Signals for Each Receiver and Transmitter
I²S Analog Interface Support, Time Division Multiplex Support
High-speed Continuous Data Stream Capabilities with 32-bit Data Transfer
Two Universal Synchronous/Asynchronous Receiver Transmitters (USART)
Individual Baud Rate Generator, IrDA
Support for ISO7816 T0/T1 Smart Card, Hardware Handshaking, RS485 Support
Full Modem Line Support on USART1
®
Infrared Modulation/Demodulation
Two Master/Slave Serial Peripheral Interfaces (SPI)
8- to 16-bit Programmable Data Length, Four External Peripheral Chip Selects
One Three-channel 16-bit Timer/Counter (TC)
Three External Clock Inputs, Two Multi-purpose I/O Pins per Channel
Double PWM Generation, Capture/Waveform Mode, Up/Down Capability
One Four-channel 16-bit Power Width Modulation Controller (PWMC)
One Two-wire Interface (TWI)
Master Mode Support Only, All Two-wire Atmel EEPROMs and I
2
C Compatible Devices Supported
One 8-channel 10-bit Analog-to-Digital Converter, Four Channels Multiplexed with Digital I/Os
SAM-BA
IEEE
®
Boot Assistance
Default Boot program
Interface with SAM-BA Graphic User Interface
®
1149.1 JTAG Boundary Scan on All Digital Pins
5V-tolerant I/Os, Including Four High-current Drive I/O lines, Up to 16 mA Each
Power Supplies
Embedded 1.8V Regulator, Drawing up to 100 mA for the Core and External Components
3.3V VDDIO I/O Lines Power Supply, Independent 3.3V VDDFLASH Flash Power Supply
1.8V VDDCORE Core Power Supply with Brownout Detector
Fully Static Operation: Up to 55 MHz at 1.65V and 85°C Worst Case Conditions
Available in 100-lead LQFP Green and 100-ball TFBGA Green Packages
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
3
1.Configuration Summary of the SAM7X512/256/128
The SAM7X512, SAM7X256 and SAM7X128 differ only in memory sizes. Table 1-1 summarizes the configurations of the
three devices.
VDDOUTVoltage Regulator OutputPower1.85V
VDDFLASHFlash and USB Power SupplyPower 3V to 3.6V
VDDIOI/O Lines Power SupplyPower3V to 3.6V
VDDCORECore Power SupplyPower1.65V to 1.95V
VDDPLLPLLPower1.65V to 1.95V
GNDGroundGround
EREFCKReference ClockInputRMII only
ETXCKTransmit ClockInputMII only
ERXCKReceive ClockInputMII only
ETXENTransmit EnableOutput
ETX0 - ETX3Transmit DataOutputETX0 - ETX1 only in RMII
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
7
Table 3-1.Signal Description List (Continued)
Active
Signal NameFunctionType
LevelComments
ETXERTransmit Coding ErrorOutputMII only
ERXDVReceive Data ValidInputMII only
ECRSDVCarrier Sense and Data ValidInputRMII only
ERX0 - ERX3Receive DataInputERX0 - ERX1 only in RMII
ERXERReceive ErrorInput
ECRSCarrier SenseInputMII only
ECOLCollision DetectedInputMII only
EMDCManagement Data ClockOutput
EMDIOManagement Data Input/OutputI/O
EF100Force 100 Mbits/sec.OutputHighRMII only
Note:1. Refer to Section 6. ”I/O Lines Considerations”.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
8
4.Package
125
26
50
5175
76
100
The SAM7X512/256/128 is available in 100-lead LQFP Green and 100-ball TFBGA RoHS-compliant packages.
4.1100-lead LQFP Package Outline
Figure 4-1 shows the orientation of the 100-lead LQFP package. A detailed mechanical description is given in the
The SAM7X512/256/128 has six types of power supply pins and integrates a voltage regulator, allowing the device to be
supplied with only one voltage. The six power supply pin types are:
VDDIN pin. It powers the voltage regulator and the ADC; voltage ranges from 3.0V to 3.6V, 3.3V nominal. In order
to decrease current consumption, if the voltage regulator and the ADC are not used, VDDIN, ADVREF, AD4, AD5,
AD6 and AD7 should be connected to GND. In this case, VDDOUT should be left unconnected.
VDDOUT pin. It is the output of the 1.8V voltage regulator.
VDDIO pin. It powers the I/O lines; voltage ranges from 3.0V to 3.6V, 3.3V nominal.
VDDFLASH pin. It powers the USB transceivers and a part of the Flash and is required for the Flash to operate
correctly; voltage ranges from 3.0V to 3.6V, 3.3V nominal.
VDDCORE pins. They power the logic of the device; voltage ranges from 1.65V to 1.95V, 1.8V typical. It can be
connected to the VDDOUT pin with decoupling capacitor. VDDCORE is required for the device, including its
embedded Flash, to operate correctly.
VDDPLL pin. It powers the oscillator and the PLL. It can be connected directly to the VDDOUT pin.
No separate ground pins are provided for the different power supplies. Only GND pins are provided and should be
connected as shortly as possible to the system ground plane.
5.2Power Consumption
The SAM7X512/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.
The dynamic power consumption on VDDCORE is less than 90 mA at full speed when running out of the Flash. Under
the same conditions, the power consumption on VDDFLASH does not exceed 10 mA.
5.3Voltage Regulator
The SAM7X512/256/128 embeds a voltage regulator that is managed by the System Controller.
In Normal Mode, the voltage regulator consumes less than 100 µA static current and draws 100 mA of output current.
The voltage regulator also has a Low-power Mode. In this mode, it consumes less than 25 µA static current and draws 1
mA of output current.
Adequate output supply decoupling is mandatory for VDDOUT to reduce ripple and avoid oscillations. The best way to
achieve this is to use two capacitors in parallel: one external 470 pF (or 1 nF) NPO capacitor should be connected
between VDDOUT and GND as close to the chip as possible. One external 2.2 µF (or 3.3 µF) X7R capacitor should be
connected between VDDOUT and GND.
Adequate input supply decoupling is mandatory for VDDIN in order to improve startup stability and reduce source voltage
drop. The input decoupling capacitor should be placed close to the chip. For example, two capacitors can be used in
parallel: 100 nF NPO and 4.7 µF X7R.
5.4Typical Powering Schematics
The SAM7X512/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. Figure 5-1 shows the power schematics to be used for USB buspowered systems.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
11
Figure 5-1.3.3V System Single Power Supply Schematic
Power Source
ranges
from 4.5V (USB)
to 18V
3.3V
VDDIN
Voltage
Regulator
VDDOUT
VDDIO
DC/DC Converter
VDDCORE
VDDFLASH
VDDPLL
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
12
6.I/O Lines Considerations
6.1JTAG Port Pins
TMS, TDI and TCK are schmitt trigger inputs and are not5-V tolerant. TMS, TDI and TCK do not integrate a pull-up
resistor.
TDO is an output, driven at up to VDDIO, and has no pull-up resistor.
The JTAGSEL pin is used to select the JTAG boundary scan when asserted at a high level. The JTAGSEL pin integrates
a permanent pull-down resistor of about 15 kΩ to GND.
To eliminate any risk of spuriously entering the JTAG boundary scan mode due to noise on JTAGSEL, it should be tied
externally to GND if boundary scan is not used, or pulled down with an external low-value resistor (such as 1 kΩ) .
6.2Test Pin
The TST pin is used for manufacturing test or fast programming mode of the SAM7X512/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Ω)
To enter fast programming mode, the TST pin and the PA0 and PA1 pins should be tied high and PA2 tied to low.
Driving the TST pin at a high level while PA0 or PA1 is driven at 0 leads to unpredictable results.
6.3Reset Pin
The NRST pin is bidirectional with an open drain output buffer. It is handled by the on-chip reset controller and can be
driven low to provide a reset signal to the external components or asserted low externally to reset the microcontroller.
There is no constraint on the length of the reset pulse, and the reset controller can guarantee a minimum pulse length.
This allows connection of a simple push-button on the NRST pin as system user reset, and the use of the signal NRST to
reset all the components of the system.
The NRST pin integrates a permanent pull-up resistor to VDDIO.
6.4ERASE Pin
The ERASE pin is used to re-initialize the Flash content and some of its NVM bits. It integrates a permanent pull-down
resistor of about 15 kΩ to GND.
To eliminate any risk of erasing the Flash due to noise on the ERASE pin, it shoul be tied externally to GND, which
prevents erasing the Flash from the applicatiion, or pulled down with an external low-value resistor (such as 1 kΩ) .
This pin is debounced by the RC oscillator to improve the glitch tolerance. When the pin is tied to high during less than
100 ms, ERASE pin is not taken into account. The pin must be tied high during more than 220 ms to perform the reinitialization of the Flash.
6.5PIO Controller Lines
All the I/O lines, PA0 to PA30 and PB0 to PB30, are 5V-tolerant and all integrate a programmable pull-up resistor.
Programming of this pull-up resistor is performed independently for each I/O line through the PIO controllers.
5V-tolerant means that the I/O lines can drive voltage level according to VDDIO, but can be driven with a voltage of up to
5.5V. However, driving an I/O line with a voltage over VDDIO while the programmable pull-up resistor is enabled will
create a current path through the pull-up resistor from the I/O line to VDDIO. Care should be taken, in particular at reset,
as all the I/O lines default to input with pull-up resistor enabled at reset.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
13
6.6I/O Lines Current Drawing
The PIO lines PA0 to PA3 are high-drive current capable. Each of these I/O lines can drive up to 16 mA 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.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
14
7.Processor and Architecture
7.1ARM7TDMI Processor
RISC processor based on ARMv4T Von Neumann architecture
Runs at up to 55 MHz, providing 0.9 MIPS/MHz
Two instruction sets
ARM high-performance 32-bit instruction set
Thumb high code density 16-bit instruction set
Two watchpoint units
Test access port accessible through a JTAG protocol
Debug communication channel
Debug Unit
Two-pin UART
Debug communication channel interrupt handling
Chip ID Register
IEEE1149.1 JTAG Boundary-scan on all digital pins
7.3Memory Controller
Programmable Bus Arbiter
Handles requests from the ARM7TDMI, the Ethernet MAC and the Peripheral DMA Controller
Address decoder provides selection signals for
Three internal 1 Mbyte memory areas
One 256 Mbyte embedded peripheral area
Abort Status Registers
Source, Type and all parameters of the access leading to an abort are saved
Facilitates debug by detection of bad pointers
Misalignment Detector
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
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
15
Embedded Flash Controller
Embedded Flash interface, up to three programmable wait states
Prefetch buffer, buffering and anticipating the 16-bit requests, reducing the required wait states
Key-protected program, erase and lock/unlock sequencer
Single command for erasing, programming and locking operations
Interrupt generation in case of forbidden operation
7.4Peripheral DMA Controller
Handles data transfer between peripherals and memories
Thirteen channels
Two for each USART
Two for the Debug Unit
Two for the Serial Synchronous Controller
Two for each Serial Peripheral Interface
One for the Analog-to-digital Converter
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
Peripheral DMA Controller (PDC) priority is as follows (from the highest priority to the lowest):
2 contiguous banks of 1024 pages of 256 bytes
Fast access time, 30 MHz single-cycle access in Worst Case conditions
Page programming time: 6 ms, including page auto-erase
Page programming without auto-erase: 3 ms
Full chip erase time: 15 ms
10,000 write cycles, 10-year data retention capability
32 lock bits, protecting 32 sectors of 64 pages
Protection Mode to secure contents of the Flash
128 Kbytes of Fast SRAM
Single-cycle access at full speed
8.2SAM7X256
256 Kbytes of Flash Memory
1024 pages of 256 bytes
Fast access time, 30 MHz single-cycle access in Worst Case conditions
Page programming time: 6 ms, including page auto-erase
Page programming without auto-erase: 3 ms
Full chip erase time: 15 ms
10,000 write cycles, 10-year data retention capability
16 lock bits, each protecting 16 sectors of 64 pages
Protection Mode to secure contents of the Flash
64 Kbytes of Fast SRAM
Single-cycle access at full speed
8.3SAM7X128
128 Kbytes of Flash Memory
512 pages of 256 bytes
Fast access time, 30 MHz single-cycle access in Worst Case conditions
Page programming time: 6 ms, including page auto-erase
Page programming without auto-erase: 3 ms
Full chip erase time: 15 ms
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
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
17
Figure 8-1.SAM7X512/256/128 Memory Mapping
0x1000 0000
0x0000 0000
0x0FFF FFFF
0xF000 0000
0xEFFF FFFF
0xFFFF FFFF
256 MBytes
256 MBytes
14 x 256 MBytes
3,584 MBytes
0x000F FFF
0x0010 0000
0x001F FFF
0x0020 0000
0x002F FFF
0x0030 0000
0x003F FFF
0x0040 0000
0x0000 0000
1 MBytes
1 MBytes
1 MBytes
1 MBytes
252 MBytes
0xFFFA 0000
0xFFFA 3FFF
0xFFFA 4000
0xF000 0000
0xFFFB 8000
0xFFFC 0000
0xFFFC 3FFF
0xFFFC 4000
0xFFFC 7FFF
0xFFFD 4000
0xFFFD 7FFF
0xFFFD 3FFF
0xFFFD FFFF
0xFFFE 0000
0xFFFE 3FFF
0xFFFF EFFF
0xFFFF FFFF
0xFFFF F000
0xFFFE 4000
0xFFFE 8000
0xFFFE 7FFF
0xFFFB 4000
0xFFFB 7FFF
0xFFF9 FFFF
0xFFFC FFFF
0xFFFD 8000
0xFFFD BFFF
0xFFFC BFFF
0xFFFC C000
0xFFFB FFFF
0xFFFB C000
0xFFFB BFFF
0xFFFA FFFF
0xFFFB 0000
0xFFFB 3FFF
0xFFFD 0000
0xFFFD C000
0xFFFC 8000
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
16 Kbytes
0x0FFF FFFF
512 Bytes/128 registers
512 Bytes/128 registers
256 Bytes/64 registers
16 Bytes/4 registers
16 Bytes/4 registers
16 Bytes/4 registers
16 Bytes/4 registers
256 Bytes/64 registers
4 Bytes/1 register
512 Bytes/128 registers
512 Bytes/128 registers
0xFFFF F000
0xFFFF F200
0xFFFF F1FF
0xFFFF F3FF
0xFFFF FBFF
0xFFFF FCFF
0xFFFF FEFF
0xFFFF FFFF
0xFFFF F400
0xFFFF FC00
0xFFFF FD0F
0xFFFF FC2F
0xFFFF FC3F
0xFFFF FD4F
0xFFFF FC6F
0xFFFF F5FF
0xFFFF F600
0xFFFF F7FF
0xFFFF F800
0xFFFF FD00
0xFFFF FF00
0xFFFF FD20
0xFFFF FD30
0xFFFF FD40
0xFFFF FD60
0xFFFF FD70
Internal Memories
Undefined
(Abort)
(1) Can be ROM, Flash or SRAM
depending on GPNVM2 and REMAP
Flash before Remap
SRAM after Remap
Internal Flash
Internal SRAM
Internal ROM
Reserved
Boot Memory (1)
Address Memory Space
Internal Memory Mapping
Note:
TC0, TC1, TC2
USART0
USART1
PWMC
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
CAN
EMAC
Reserved
TWI
SSC
SPI0
SPI1
UDP
ADC
AIC
DBGU
PIOA
Reserved
PMC
MC
WDT
PIT
RTT
RSTC
VREG
PIOB
Peripheral Mapping
System Controller Mapping
Internal Peripherals
Reserved
SYSC
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
18
8.4Memory Mapping
256M Bytes
ROM Before Remap
SRAM After Remap
Undefined Areas
(Abort)
0x000F FFFF
0x001F FFFF
0x002F FFFF
0x0FFF FFFF
1 M Bytes
1 M Bytes
1 M Bytes
252 M Bytes
Internal FLASH
Internal SRAM
0x0000 0000
0x0010 0000
0x0020 0000
0x0030 0000
Internal ROM
0x003F FFFF
0x0040 0000
1 M Bytes
8.4.1Internal SRAM
The SAM7X512 embeds a high-speed 128-Kbyte SRAM bank.
The SAM7X256 embeds a high-speed 64-Kbyte SRAM bank.
The SAM7X128 embeds a high-speed 32-Kbyte SRAM bank.
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.2Internal ROM
The SAM7X512/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.3Internal Flash
The SAM7X512 features two banks (dual plane) of 256 Kbytes of Flash.
The SAM7X256 features one bank (single plane) of 256 Kbytes of Flash.
The SAM7X128 features one bank (single plane) of 128 Kbytes of Flash.
At any time, the Flash is mapped to address 0x0010 0000. It is also accessible at address 0x0 after the reset, if GPNVM
bit 2 is set and before the Remap Command.
A general purpose NVM (GPNVM) bit is used to boot either on the ROM (default) or from the Flash.
This GPNVM bit can be cleared or set respectively through the commands “Clear General-purpose NVM Bit” and “Set
General-purpose NVM Bit” of the EFC User Interface.
Setting the GPNVM Bit 2 selects the boot from the Flash. Asserting ERASE clears the GPNVM Bit 2 and thus selects the
boot from the ROM by default.
Figure 8-2.Internal Memory Mapping with GPNVM Bit 2 = 0 (default)
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
19
Figure 8-3.Internal Memory Mapping with GPNVM Bit 2 = 1
256M Bytes
Flash Before Remap
SRAM After Remap
Undefined Areas
(Abort)
0x000F FFFF
0x001F FFFF
0x002F FFFF
0x0FFF FFFF
1 M Bytes
1 M Bytes
1 M Bytes
252 M Bytes
Internal FLASH
Internal SRAM
0x0000 0000
0x0010 0000
0x0020 0000
0x0030 0000
Internal ROM
0x003F FFFF
0x0040 0000
1 M Bytes
8.5Embedded Flash
8.5.1Flash Overview
The Flash of the SAM7X512 is organized in two banks (dual plane) of 1024 pages of 256 bytes. The 524,288 bytes
are organized in 32-bit words.
The Flash of the SAM7X256 is organized in 1024 pages of 256 bytes (single plane). It reads as 65,536 32-bit
words.
The Flash of the SAM7X128 is organized in 512 pages of 256 bytes (single plane). It reads as 32,768 32-bit words.
The Flash contains a 256-byte write buffer, accessible through a 32-bit interface.
The Flash benefits from the integration of a power reset cell and from the brownout detector. This prevents code
corruption during power supply changes, even in the worst conditions.
When Flash is not used (read or write access), it is automatically placed into standby mode.
8.5.2Embedded Flash Controller
The Embedded Flash Controller (EFC) manages accesses performed by the masters of the system. It enables reading
the Flash and writing the write buffer. It also contains a User Interface, mapped within the Memory Controller on the APB.
The User Interface allows:
programming of the access parameters of the Flash (number of wait states, timings, etc.)
starting commands such as full erase, page erase, page program, NVM bit set, NVM bit clear, etc.
getting the end status of the last command
getting error status
programming interrupts on the end of the last commands or on errors
The Embedded Flash Controller also provides a dual 32-bit Prefetch Buffer that optimizes 16-bit access to the Flash.
This is particularly efficient when the processor is running in Thumb mode.
Two EFCs are embedded in the SAM7X512 to control each bank of 256 KBytes. Dual-plane organization allows
concurrent read and program functionality. Read from one memory plane may be performed even while program or
erase functions are being executed in the other memory plane.
One EFC is embedded in the SAM7X256/128 to control the single plane of 256/128 KBytes.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
20
8.5.3Lock Regions
8.5.3.1SAM7X512
Two Embedded Flash Controllers each manage 16 lock bits to protect 16 regions of the flash against inadvertent flash
erasing or programming commands. The SAM7X512 contains 32 lock regions and each lock region contains 64 pages of
256 bytes. Each lock region has a size of 16 Kbytes.
If a locked-region’s erase or program command occurs, the command is aborted and the EFC trigs an interrupt.
The 32 NVM bits are software programmable through both of the EFC User Interfaces. The command “Set Lock Bit”
enables the protection. The command “Clear Lock Bit” unlocks the lock region.
Asserting the ERASE pin clears the lock bits, thus unlocking the entire Flash.
8.5.3.2SAM7X256
The Embedded Flash Controller manages 16 lock bits to protect 16 regions of the flash against inadvertent flash erasing
or programming commands. The SAM7X256 contains 16 lock regions and each lock region contains 64 pages of 256
bytes. Each lock region has a size of 16 Kbytes.
If a locked-region’s erase or program command occurs, the command is aborted and the EFC trigs an interrupt.
The 16 NVM bits are software programmable through the EFC User Interface. The command “Set Lock Bit” enables the
protection. The command “Clear Lock Bit” unlocks the lock region.
Asserting the ERASE pin clears the lock bits, thus unlocking the entire Flash.
8.5.3.3SAM7X128
The Embedded Flash Controller manages 8 lock bits to protect 8 regions of the flash against inadvertent flash erasing or
programming commands. The SAM7X128 contains 8 lock regions and each lock region contains 64 pages of 256 bytes.
Each lock region has a size of 16 Kbytes.
If a locked-region’s erase or program command occurs, the command is aborted and the EFC trigs an interrupt.
The 8 NVM bits are software programmable through the EFC User Interface. The command “Set Lock Bit” enables the
protection. The command “Clear Lock Bit” unlocks the lock region.
Asserting the ERASE pin clears the lock bits, thus unlocking the entire Flash.
8.5.4Security Bit Feature
The SAM7X512/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 Flash Programming Interface, is forbidden. This ensures
the confidentiality of the code programmed in the Flash.
This security bit can only be enabled, through the Command “Set Security Bit” of the EFC User Interface. Disabling the
security bit can only be achieved by asserting the ERASE pin at 1, and after a full flash erase is performed. When the
security bit is deactivated, all accesses to the flash are permitted.
It is important to note that the assertion of the ERASE pin should always be longer than 220 ms.
As the ERASE pin integrates a permanent pull-down, it can be left unconnected during normal operation. However, it is
safer to connect it directly to GND for the final application.
8.5.5Non-volatile Brownout Detector Control
Two general purpose NVM (GPNVM) bits are used for controlling the brownout detector (BOD), so that even after a
power loss, the brownout detector operations remain in their state.
These two GPNVM bits can be cleared or set respectively through the commands “Clear General-purpose NVM Bit” and
“Set General-purpose NVM Bit” of the EFC User Interface.
GPNVM Bit 0 is used as a brownout detector enable bit. Setting the GPNVM Bit 0 enables the BOD, clearing it
disables the BOD. Asserting ERASE clears the GPNVM Bit 0 and thus disables the brownout detector by default.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
21
The GPNVM Bit 1 is used as a brownout reset enable signal for the reset controller. Setting the GPNVM Bit 1
enables the brownout reset when a brownout is detected, Clearing the GPNVM Bit 1 disables the brownout reset.
Asserting ERASE disables the brownout reset by default.
8.5.6Calibration Bits
Eight NVM bits are used to calibrate the brownout detector and the voltage regulator. These bits are factory configured
and cannot be changed by the user. The ERASE pin has no effect on the calibration bits.
8.6Fast Flash Programming Interface
The Fast Flash Programming Interface allows programming the device through either a serial JTAG interface or through
a multiplexed fully-handshaked parallel port. It allows gang-programming with market-standard industrial programmers.
The FFPI supports read, page program, page erase, full erase, lock, unlock and protect commands.
The Fast Flash Programming Interface is enabled and the Fast Programming Mode is entered when the TST pin and the
PA0 and PA1 pins are all tied high.
8.7SAM-BA Boot Assistant
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 3 to 20 MHz via software auto-detection.
Communication via the USB Device Port is limited to an 18.432 MHz crystal.
The SAM-BA Boot provides an interface with SAM-BA Graphic User Interface (GUI).
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).
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
22
9.System Controller
The System Controller manages all vital blocks of the microcontroller: interrupts, clocks, power, time, debug and reset.
The System Controller peripherals are all mapped to the highest 4 Kbytes of address space, between addresses 0xFFFF
F000 and 0xFFFF FFFF.
Figure 9-1 on page 24 shows the System Controller Block Diagram.
Figure 8-1 on page 18 shows the mapping of the User Interface of the System Controller peripherals. Note that the
Memory Controller configuration user interface is also mapped within this address space.
Based on one power-on reset cell and one brownout detector
Status of the last reset, either Power-up Reset, Software Reset, User Reset, Watchdog Reset, Brownout Reset
Controls the internal resets and the NRST pin output
Allows to shape a signal on the NRST line, guaranteeing that the length of the pulse meets any requirement.
9.1.1Brownout Detector and Power-on Reset
The SAM7X512/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.
The power-on reset cell has a limited-accuracy threshold at around 1.5V. Its output remains low during power-up until
VDDCORE goes over this voltage level. This signal goes to the reset controller and allows a full re-initialization of the
device.
The brownout detector monitors the VDDCORE and VDDFLASH levels during operation by comparing them to a fixed
trigger level. It secures system operations in the most difficult environments and prevents code corruption in case of
brownout on the VDDCORE or VDDFLASH.
When the brownout detector is enabled and VDDCORE decreases to a value below the trigger level (Vbot18-, defined as
Vbot18 - hyst/2), the brownout output is immediately activated.
When VDDCORE increases above the trigger level (Vbot18+, defined as Vbot18 + hyst/2), the reset is released. The
brownout detector only detects a drop if the voltage on VDDCORE stays below the threshold voltage for longer than
about 1µs.
The VDDCORE threshold voltage has a hysteresis of about 50 mV, to ensure spike free brownout detection. The typical
value of the brownout detector threshold is 1.68V with an accuracy of ± 2% and is factory calibrated.
When the brownout detector is enabled and VDDFLASH decreases to a value below the trigger level (Vbot33-, defined
as Vbot33 - hyst/2), the brownout output is immediately activated.
When VDDFLASH increases above the trigger level (Vbot33+, defined as Vbot33 + hyst/2), the reset is released. The
brownout detector only detects a drop if the voltage on VDDCORE stays below the threshold voltage for longer than
about 1µs.
The VDDFLASH threshold voltage has a hysteresis of about 50 mV, to ensure spike free brownout detection. The typical
value of the brownout detector threshold is 2.80V with an accuracy of ± 3.5% and is factory calibrated.
The brownout detector is low-power, as it consumes less than 28 µA static current. However, it can be deactivated to
save its static current. In this case, it consumes less than 1µA. The deactivation is configured through the GPNVM bit 0 of
the Flash.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
25
9.2Clock Generator
Embedded
RC
Oscillator
Main
Oscillator
PLL and
Divider
Clock Generator
Power
Management
Controller
XIN
XOUT
PLLRC
Slow Clock
SLCK
Main Clock
MAINCK
PLL Clock
PLLCK
Control
Status
The Clock Generator embeds one low-power RC Oscillator, one Main Oscillator and one PLL with the following
characteristics:
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.Clock Generator Block Diagram
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
26
9.3Power Management Controller
MCK
periph_clk[2..18]
int
UDPCK
SLCK
MAINCK
PLLCK
Prescaler
/1,/2,/4,...,/64
PCK
Processor
Clock
Controller
Idle Mode
Master Clock Controller
Peripherals
Clock Controller
ON/OFF
USB Clock Controller
ON/OFF
SLCK
MAINCK
PLLCK
Prescaler
/1,/2,/4,...,/64
Programmable Clock Controller
PLLCK
Divider
/1,/2,/4
pck[0..3]
The Power Management Controller uses the Clock Generator outputs to provide:
The Master Clock (MCK) is programmable from a few hundred Hz to the maximum operating frequency of the device.
The Processor Clock (PCK) switches off when entering processor idle mode, thus allowing reduced power consumption
Controls the interrupt lines (nIRQ and nFIQ) of an ARM Processor
Individually maskable and vectored interrupt sources
Source 0 is reserved for the Fast Interrupt Input (FIQ)
Source 1 is reserved for system peripherals (RTT, PIT, EFC, PMC, DBGU, etc.)
Other sources control the peripheral interrupts or external interrupts
Programmable edge-triggered or level-sensitive internal sources
Programmable positive/negative edge-triggered or high/low level-sensitive external sources
8-level Priority Controller
Drives the normal interrupt nIRQ of the processor
Handles priority of the interrupt sources
Higher priority interrupts can be served during service of lower priority interrupt
Vectoring
Optimizes interrupt service routine branch and execution
One 32-bit vector register per interrupt source
Interrupt vector register reads the corresponding current interrupt vector
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
27
Protect Mode
Easy debugging by preventing automatic operations
Fast Forcing
Permits redirecting any interrupt source on the fast interrupt
General Interrupt Mask
Provides processor synchronization on events without triggering an interrupt
9.5Debug Unit
Comprises:
One two-pin UART
One Interface for the Debug Communication Channel (DCC) support
One set of Chip ID Registers
One Interface providing ICE Access Prevention
Two-pin UART
USART-compatible User Interface
Programmable Baud Rate Generator
Parity, Framing and Overrun Error
Automatic Echo, Local Loopback and Remote Loopback Channel Modes
Debug Communication Channel Support
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 peripherals
Chip ID is 0x275C 0A40 (MRL A) for SAM7X512
Chip ID is 0x275B 0940 (MRL A or B) for SAM7X256
Chip ID is 0x275B 0942 (MRL C) for SAM7X256
Chip ID is 0x275A 0740 (MRL A or B) for SAM7X128
Chip ID is 0x275A 0742 (MRL C) for SAM7X128
9.6Periodic Interval Timer
20-bit programmable counter plus 12-bit interval counter
9.7Watchdog Timer
12-bit key-protected Programmable Counter running on prescaled SLCK
Provides reset or interrupt signals to the system
Counter may be stopped while the processor is in debug state or in idle mode
9.8Real-time Timer
32-bit free-running counter with alarm running on prescaled SLCK
Programmable 16-bit prescaler for SLCK accuracy compensation
9.9PIO Controllers
Two PIO Controllers, each controlling 31 I/O lines
Fully programmable through set/clear registers
Multiplexing of two peripheral functions per I/O line
For each I/O line (whether assigned to a peripheral or used as general-purpose I/O)
Input change interrupt
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
28
Half a clock period glitch filter
Multi-drive option enables driving in open drain
Programmable pull-up on each I/O line
Pin data status register, supplies visibility of the level on the pin at any time
Synchronous output, provides Set and Clear of several I/O lines in a single write
9.10Voltage 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).
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
29
10.Peripherals
10.1User Interface
The User Peripherals are mapped in the 256 Mbytes of address space between 0xF000 0000 and 0xFFFF EFFF. Each
peripheral is allocated 16 Kbytes of address space.
A complete memory map is provided in Figure 8-1 on page 18.
10.2Peripheral Identifiers
The SAM7X512/256/128 embeds a wide range of peripherals. Table 10-1 defines the Peripheral Identifiers of the
SAM7X512/256/128. Unique peripheral identifiers are defined for both the Advanced Interrupt Controller and the Power
Management Controller.
Table 10-1.Peripheral Identifiers
Peripheral IDPeripheral MnemonicPeripheral Name
0AICAdvanced Interrupt ControllerFIQ
1SYSC
2PIOAParallel I/O Controller A
3PIOBParallel I/O Controller B
4SPI0Serial Peripheral Interface 0
5SPI1Serial Peripheral Interface 1
6US0USART 0
7US1USART 1
8SSCSynchronous Serial Controller
9TWITwo-wire Interface
10PWMCPulse Width Modulation Contro ller
11UDPUSB Device Port
12TC0Timer/Counter 0
13TC1Timer/Counter 1
14TC2Timer/Counter 2
15CANCAN Controller
16EMACEthernet MAC
17ADC
18 - 29Reserved
30AICAdvanced Interrupt ControllerIRQ0
31AICAdvanced Interrupt ControllerIRQ1
(1)
(1)
External
Interrupt
System Controller
Analog-to Digital Converter
Note:1.Setting SYSC and ADC bits in the clock set/clear registers of the PMC has no effect. The System Controller
and ADC are continuously clocked.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
30
Loading...
+ 632 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.