– From 64 to 256 Kbytes embedded Flash, 128-bit wide access, memory accelerator,
– From 8 to 24 Kbytes embedded SRAM
– 16 Kbytes ROM with embedded bootloader routines (UART) and IAP routines
– Embedded voltage regulator for single supply operation
– Power-on-Reset (POR), Brown-out Detector (BOD) and Watchdog for safe
– Quartz or ceramic resonator oscillators: 3 to 20 MHz main power with Failure
– High precision 8/12 MHz factory trimmed internal RC oscillator with 4 MHz default
– Slow Clock Internal RC oscillator as permanent low-power mode device clock
– One PLL up to 130 MHz for device clock
– Up to 10 peripheral DMA (PDC) channels
– Sleep and Backup modes, down to 3 µA in Backup mode
– Ultra low power RTC
– Up to 2 USARTs with ISO7816, IrDA
– Two 2-wire UARTs
– 2 Two Wire Interface (I2C compatible), 1 SPI
– Up to 6 Three-Channel 16-bit Timer/Counter with capture, waveform, compare and
– 4-channel 16-bit PWM
– 32-bit Real-time Timer and RTC with calendar and alarm features
– Up to 16 channels, 384 KSPS 10-bit ADC
– One 500 KSPS 10-bit DAC
– Up to 79 I/O lines with external interrupt capability (edge or level sensitivity),
– Three 32-bit Parallel Input/Output Controllers
– 100-lead LQFP, 14 x 14 mm, pitch 0.5 mm / 100-ball LFBGA, 9 x 9 mm, pitch 0.8 mm
– 64-lead LQFP, 12 x 12 mm, pitch 0.5 mm / 64-pad QFN 9x9 mm, pitch 0.45 mm
– 48-lead LQFP, 9 x 9 mm, pitch 0.5 mm / 48-pad QFN 7x7 mm, pitch 0.45 mm
Cortex®-M3 revision 2.0 running at up to 48 MHz
®
-2 instruction
single plane
operation
Detection and optional low power 32.768 kHz for RTC or device clock
frequency for device startup. In-application trimming access for frequency
adjustment
®
, RS-485 and SPI mode
PWM mode. Quadrature Decoder Logic and 2-bit Gray Up/Down Counter for
Stepper Motor
debouncing, glitch filtering and on-die Series Resistor Termination
AT91SAM
ARM-based
Flash MCU
SAM3N Series
Summary
NOTE: This is a summary document.
The complete document is available
under NDA. For more information,
please contact your local Atmel sales
office.
11011AS–ATARM–04-Oct-10
1.SAM3N Description
Atmel's SAM3N series is a member of a family of Flash microcontrollers based on the high performance 32-bit ARM Cortex-M3 RISC processor. It operates at a maximum speed of 48 MHz
and features up to 256 Kbytes of Flash and up to 24 Kbytes of SRAM. The peripheral set
includes 2x USARTs, 2x UARTs, 2x TWIs, 3x SPI, as well as 1 PWM timer, 6x general purpose
16-bit timers, an RTC, a 10-bit ADC and a 10-bit DAC.
The SAM3N series is ready for capacitive touch thanks to the QTouch library, offering an easy
way to implement buttons, wheels and sliders.
The SAM3N device is an entry-level general purpose microcontroller. That makes the SAM3N
the ideal starting point to move from 8- /16-bit to 32-bit microcontrollers.
It operates from 1.62V to 3.6V and is available in 48-pin, 64-pin and 100-pin QFP, 48-pin and
64-pin QFN, and 100-pin BGA packages.
The SAM3N series is the ideal migration path from the SAM3S for applications that require a
reduced BOM cost. The SAM3N series is pin-to-pin compatible with the SAM3S series. Its
aggressive price point and high level of integration pushes its scope of use far into cost-sensitive, high-volume applications.
1.1Configuration Summary
The SAM3N4/2/1 differ in memory size, package and features list. Table 1-1 summarizes the
configurations of the 9 devices.
Table 1-1.Configuration Summary
DeviceFlashSRAMPackage
ATSAM3N4A256 Kbytes24 Kbytes
ATSAM3N4B256 Kbytes24 Kbytes
ATSAM3N4C256 Kbytes24 Kbytes
ATSAM3N2A128 Kbytes16 Kbytes
ATSAM3N2B128 Kbytes16 Kbytes
ATSAM3N2C128 Kbytes16 Kbytes
ATSAM3N1A64 Kbytes8 Kbytes
ATSAM3N1B64 Kbytes8 Kbytes
ATSAM3N1C64 Kbytes8 Kbytes
LQFP48
QFN48
LQFP64
QFN64
LQFP100
BGA100
LQFP48
QFN48
LQFP64
QFN64
LQFP100
BGA100
LQFP48
QFN48
LQFP64
QFN64
LQFP100
BGA100
Number
of PIOsADCTimer
348 channels6
4710 channels6
7916 channels6102 1
348 channels6
4710 channels6(
7916 channels6102 1
348 channels6
4710 channels6
7916 channels6102 1
(1)
(2)
(1)
(2)
(1)
(2)
PDC
ChannelsUSARTDAC
81_
102 1
81 _
102 1
81 _
102 1
Notes:1. Only two TC channels are accessible through the PIO.
2. Only three TC channels are accessible through the PIO.
2
SAM3N Summary
11011AS–ATARM–04-Oct-10
2.SAM3N Block Diagram
Figure 2-1.SAM3N 100-pin version Block Diagram
SAM3N Summary
PCK0-PCK2
XOUT
XIN32
XOUT32
ERASE
VDDIO
NRST
VDDCORE
URXD0
UTXD0
URXD1
UTXD1
RXD0
TXD0
SCK0
RTS0
CTS0
RXD1
TXD1
SCK1
RTS1
CTS1
PWM[0:3]
ADTRG
AD[0..15]
ADVREF
DAC0
DATRG
TST
XIN
System Controller
PMC
OSC
3-20 MHz
WDT
RC OSC
12/8/4 MHz
SUPC
OSC 32k
RC 32k
PLL
RTT
RTC
POR
RSTC
PIOAPIOB
PIOC
SM
10-bit ADC
10-bit DAC
TDI
TCK/SWCLK
TDO/TRACESWO
TMS/SWDIO
JTAG & Serial Wire
In-Circuit Emulator
Cortex-M3 Processor
Fmax 48 MHz
I/D
UART0
PDC
UART1
USART0
PDC
USART1
PWM
PDC
PDC
JTAGSEL
24-bit
SysTick Counter
N
V
I
C
FLASH
256 KBytes
128 KBytes
64 KBytes
S
3- layer AHB Bus Matrix Fmax 48 MHz
Peripheral
Bridge
VDDINVDDOUT
Voltage
Regulator
SRAM
24 KBytes
16 KBytes
8 KBytes
Timer Counter A
TC[0..2]
Timer Counter B
TC[3..5]
PDC
SPI
PDC
TWI0
TWI1
ROM
16 KBytes
TCLK[0:2]
TIOA[0:2]
TIOB[0:2]
TCLK[3:5]
TIOA[3:5]
TIOB[3:5]
NPCS0
NPCS1
NPCS2
NPCS3
MISO
MOSSPCK
TWCK0
TWD0
TWCK1
TWD1
11011AS–ATARM–04-Oct-10
3
Figure 2-2.SAM3N 64-pin version Block Diagram
TC[3..5]
AD[0..9]
3- layer AHB Bus Matrix Fmax 48 MHz
TST
PCK0-PCK2
System Controller
XIN
NRST
PMC
XOUT
OSC 32k
XIN32
XOUT32
SUPC
RSTC
OSC
3-20 MHz
PIOAPIOB
POR
RTC
RTT
RC 32k
RC OSC
12/8/4 MHz
ERASE
TDI
TDO/TRACESWO
TMS/SWDIO
TCK/SWCLK
JTAGSEL
I/D
S
VDDINVDDOUT
TC[0..2]
TCLK[0:2]
TWCK0
TWD0
TWCK1
TWD1
NPCS0
NPCS1
NPCS2
NPCS3
MISO
MOSSPCK
TIOA[0:2]
TIOB[0:2]
PDC
PDC
PDC
PDC
PDC
PWM
In-Circuit Emulator
PDC
JTAG & Serial Wire
PWM[0:3]
ADTRG
ADVREF
DAC0
DATRG
10-bit ADC
10-bit DAC
SM
VDDIO
PLL
RXD0
TXD0
SCK0
RTS0
CTS0
RXD1
TXD1
SCK1
RTS1
CTS1
USART0
UART1
UART0
USART1
Cortex-M3 Processor
Fmax 48 MHz
24-bit
SysTick Counter
ROM
16 KBytes
SRAM
24 KBytes
16 KBytes
8 KBytes
FLASH
256 KBytes
128 KBytes
64 KBytes
VDDCORE
WDT
Peripheral
Bridge
URXD0
UTXD0
URXD1
UTXD1
Timer Counter A
Timer Counter B
SPI
TWI0
TWI1
N
V
I
C
Voltage
Regulator
3-layer AHB Bus Matrix Fmax 48 MHz
4
SAM3N Summary
11011AS–ATARM–04-Oct-10
Figure 2-3.SAM3N 48-pin version Block Diagramz
SAM3N Summary
PCK0-PCK2
XOUT
XIN32
XOUT32
ERASE
VDDIO
NRST
VDDCORE
URXD0
UTXD0
URXD1
UTXD1
TST
XIN
System Controller
PMC
3-20 MHz
WDT
RC OSC
12/8/4 MHz
SUPC
OSC 32k
RC 32k
RTC
POR
RSTC
PIOAPIOB
OSC
SM
PLL
RTT
TDI
TCK/SWCLK
TDO/TRACESWO
TMS/SWDIO
JTAG & Serial Wire
In-Circuit Emulator
Cortex-M3 Processor
Fmax 48 MHz
I/D
UART0
PDC
UART1
JTAGSEL
24-bit
SysTick Counter
N
V
I
C
FLASH
256 KBytes
128 KBytes
64 KBytes
S
3-layer AHB Bus Matrix Fmax 48 MHz
3- layer AHB Bus Matrix Fmax 48 MHz
Peripheral
Bridge
N
VDDOUT
VDDI
Voltage
Regulator
SRAM
24 KBytes
16 KBytes
8 KBytes
Timer Counter A
TC[0..2]
ROM
16 KBytes
TCLK[0:2]
TIOA[0:2]
TIOB[0:2]
RXD0
TXD0
SCK0
RTS0
CTS0
PWM[0:3]
ADTRG
AD[0..7]
ADVREF
USART0
PWM
10-bit ADC
PDC
PDC
Timer Counter B
TC[3..5]
PDC
SPI
PDC
TWI0
TWI1
NPCS0
NPCS1
NPCS2
NPCS3
MISO
MOSSPCK
TWCK0
TWD0
TWCK1
TWD1
11011AS–ATARM–04-Oct-10
5
3.Signal Description
Table 3-1 gives details on the signal name classified by peripheral.
Table 3-1.Signal Description List
Active
Signal NameFunctionType
Power Supplies
VDDIOPeripherals I/O Lines Power SupplyPower1.62V to 3.6V
VDDIN
VDDOUTVoltage Regulator Output Power1.8V Output
VDDPLLOscillator and PLL Power SupplyPower1.65 V to 1.95V
VDDCORE
GNDGroundGround
XINMain Oscillator InputInput
XOUTMain Oscillator OutputOutput
XIN32Slow Clock Oscillator InputInput
XOUT32Slow Clock Oscillator OutputOutput
PCK0 - PCK2Programmable Clock OutputOutput
Voltage Regulator, ADC and DAC Power
Supply
Power the core, the embedded memories
and the peripherals
Notes:1. Schmitt Triggers can be disabled through PIO registers.
2. Some PIO lines are shared with System IOs.
3. See Section 5.3 “Typical Powering Schematics” for restriction on voltage range of Analog Cells.
VDDIO
8
SAM3N Summary
11011AS–ATARM–04-Oct-10
4.Package and Pinout
125
26
50
5175
76
100
SAM3N4/2/1 series is pin-to-pin compatible with SAM3S products. Furthermore SAM3N4/2/1
devices have new functionalities referenced in italic inTable 4-1, Table 4-3 and Table 4-4.
4.1SAM3N4/2/1C Package and Pinout
4.1.1100-lead LQFP Package Outline
Figure 4-1.Orientation of the 100-lead LQFP Package
SAM3N Summary
4.1.2100-ball LFBGA Package Outline
The 100-Ball LFBGA package has a 0.8 mm ball pitch and respects Green Standards. Its dimensions are 9 x 9 x 1.1 mm.
Figure 4-2.Orientation of the 100-ball LFBGA Package
TOP VIEW
10
9
8
7
6
5
4
3
2
1
ABCDEFGHJK
BALL A1
9
11011AS–ATARM–04-Oct-10
4.1.3100-Lead LQFP Pinout
Table 4-1.100-lead LQFP SAM3N4/2/1C Pinout
1ADVREF26GND51TDI/PB476TDO/TRACESWO/PB5
2GND27VDDIO52PA6/PGMNOE77JTAGSEL
3PB0/AD428PA16/PGMD453PA5/PGMRDY78PC18
4PC29/AD1329PC754PC2879TMS/SWDIO/PB6
5PB1/AD530PA15/PGMD355PA4/PGMNCMD80PC19
6PC30/AD1431PA14/PGMD256VDDCORE81PA31
7PB2/AD632PC657PA2782PC20
8PC31/AD1533PA13/PGMD158PC883TCK/SWCLK/PB7
9PB3/AD734PA2459PA2884PC21
10VDDIN35PC560NRST85VDDCORE
11VDDOUT36VDDCORE61TST86PC22
12PA17/PGMD5/AD037PC462PC987ERASE/PB12
13PC2638PA2563PA2988PB10
14PA18/PGMD6/AD139PA2664PA3089PB11
15PA21/AD840PC365PC1090PC23
16VDDCORE41PA12/PGMD066PA391VDDIO
17PC2742PA11/PGMM367PA2/PGMEN292PC24
18PA19/PGMD7/AD243PC268PC1193PB13/DAC0
19PC15/AD1144PA10/PGMM269VDDIO94PC25
20PA22/AD945GND70GND95GND
21PC13/AD1046PA9/PGMM171PC1496PB8/XOUT
22PA2347PC172PA1/PGMEN197PB9/PGMCK/XIN
23PC12/AD1248
24PA20/AD349
25PC050VDDIO75PC17100VDDPLL
PA8/XOUT32/
PGMM0
PA7/XIN32/
PGMNVALID
73PC1698VDDIO
74PA0/PGMEN099PB14
10
SAM3N Summary
11011AS–ATARM–04-Oct-10
4.1.4100-ball LFBGA Pinout
Table 4-2.100-ball LFBGA SAM3N4/2/1C Pinout
SAM3N Summary
A1PB1/AD5C6TCK/SWCLK/PB7F1
A2PC29C7PC16F2PC26H7PA11/PGMM3
A3VDDIOC8PA1/PGMEN1F3VDDOUTH8PC1
A4PB9/PGMCK/XINC9PC17F4GNDH9PA6/PGMNOE
A5PB8/XOUTC10PA0/PGMEN0F5VDDIOH10TDI/PB4
A6PB13/DAC0D1PB3/AD7F6PA27J1PC15/AD11
A7DDP/PB11D2PB0/AD4F7PC8J2PC0
A8DDM/PB10D3PC24F8PA28J3PA16/PGMD4
A9TMS/SWDIO/PB6D4PC22F9TSTJ4PC6
A10JTAGSELD5GNDF10PC9J5PA24
B1PC30D6GNDG1PA21/AD8J6PA25
B2ADVREFD7VDDCOREG2PC27J7PA10/PGMM2
B3GNDANAD8PA2/PGMEN2G3PA15/PGMD3J8GND
B4PB14/DAC1D9PC11G4VDDCOREJ9VDDCORE
B5PC21D10PC14G5VDDCOREJ10VDDIO
B6PC20E1
PA17/PGMD5/
AD0
G 6PA 2 6K 1PA 22 / AD 9
PA 1 8/ P G MD 6 /
AD1
H6PC4
B7PA31E2PC31G7PA12/PGMD0K2PC13/AD10
B8PC19E3VDDING8PC28K3PC12/AD12
B9PC18E4GNDG9PA4/PGMNCMDK4PA20/AD3
B10
TDO/TRACESWO/
PB5
C1PB2/AD6E6NRSTH1
C2VDDPLLE7PA29/AD13H2PA23K7PC2
C3PC25E8PA30/AD14H3PC7K8PA9/PGMM1
C4PC23E9PC10H4PA14/PGMD2K9
C5ERASE/PB12E10PA3H5PA13/PGMD1K10
E5GNDG10PA5/PGMRDYK5PC5
PA 1 9/ P G MD 7 /
AD2
K6PC3
PA8/XOUT32/
PGMM0
PA7/XIN32/
PGMNVALID
11011AS–ATARM–04-Oct-10
11
4.2SAM3N4/2/1B Package and Pinout
Figure 4-3.Orientation of the 64-pad QFN Package
4964
1
48
16
17
TOP VIEW
Figure 4-4.Orientation of the 64-lead LQFP Package
48
49
64
1
33
32
33
32
17
16
12
SAM3N Summary
11011AS–ATARM–04-Oct-10
SAM3N Summary
4.2.164-Lead LQFP and QFN Pinout
64-pin version SAM3N devices are pin-to-pin compatible with SAM3S products. Furthermore,
SAM3N products have new functionalities shown in italic in Table 4-3.
Table 4-3. 64-pin SAM3N4/2/1B Pinout
1ADVREF17GND33TDI/PB449TDO/TRACESWO/PB5
2GND18VDDIO34PA6/PGMNOE50JTAGSEL
3PB0/AD419PA16/PGMD435PA5/PGMRDY51TMS/SWDIO/PB6
4PB1AD520PA15/PGMD336PA4/PGMNCMD52PA31
5PB2/AD621PA14/PGMD237PA27/PGMD1553TCK/SWCLK/PB7
6PB3/AD722PA13/PGMD138PA2854VDDCORE
7VDDIN23PA24/PGMD1239NRST55ERASE/PB12
8VDDOUT24VDDCORE40TST56PB10
9PA17/PGMD5/AD025PA25/PGMD1341PA2957PB11
10PA18/PGMD6/AD126PA26/PGMD1442PA3058VDDIO
11PA21/PGMD9/AD827PA12/PGMD043PA359PB13/DAC0
12VDDCORE28PA11/PGMM344PA2/PGMEN260GND
13PA19/PGMD7/AD229PA10/PGMM245VDDIO61XOUT/PB8
14PA22/PGMD10/AD930PA9/PGMM146GND62XIN/PGMCK/PB9
15PA23/PGMD1131
16PA20/PGMD8/AD332
Note:The bottom pad of the QFN package must be connected to ground.
PA8/XOUT32/PGMM
0
PA7/XIN32/XOUT32/
PGMNVALID
47PA1/PGMEN163PB14
48PA0/PGMEN064VDDPLL
11011AS–ATARM–04-Oct-10
13
4.3SAM3N4/2/1A Package and Pinout
25
37
36
24
13
12
1
48
Figure 4-5.Orientation of the 48-pad QFN Package
3748
1
12
1324
TOP VIEW
Figure 4-6.Orientation of the 48-lead LQFP Package
36
25
14
SAM3N Summary
11011AS–ATARM–04-Oct-10
4.3.148-Lead LQFP and QFN Pinout
Table 4-4. 48-pin SAM3N4/2/1A Pinout
SAM3N Summary
1ADVREF13VDDIO25TDI/PB437
2GND14PA16/PGMD426PA6/PGMNOE38JTAGSEL
3PB0/AD415PA15/PGMD327PA5/PGMRDY39TMS/SWDIO/PB6
4PB1/AD516PA14/PGMD228PA4/PGMNCMD40TCK/SWCLK/PB7
5PB2/AD617PA13/PGMD129NRST41VDDCORE
6PB3/AD718VDDCORE30TST42ERASE/PB12
7VDDIN19PA12/PGMD031PA343PB10
8VDDOUT20PA11/PGMM332PA2/PGMEN244PB11
9PA17/PGMD5/AD021PA10/PGMM233VDDIO45XOUT/PB8
10PA18/PGMD6/AD122PA9/PGMM134GND46XIN/P/PB9/GMCK
11PA19/PGMD7/AD223
12PA20/AD324
Note:The bottom pad of the QFN package must be connected to ground.
PA8/XOUT32/PG
MM0
PA7/XIN32/PGMN
VALID
35PA1/PGMEN147VDDIO
36PA0/PGMEN048VDDPLL
TDO/TRACESWO/
PB5
11011AS–ATARM–04-Oct-10
15
5.Power Considerations
5.1Power Supplies
The SAM3N product has several types of power supply pins:
• VDDCORE pins: Power the core, including the processor, the embedded memories and the
peripherals. Voltage ranges from 1.62V and 1.95V.
• VDDIO pins: Power the Peripherals I/O lines, Backup part, 32 kHz crystal oscillator and
oscillator pads. Voltage ranges from 1.62V and 3.6V
• VDDIN pin: Voltage Regulator, ADC and DAC Power Supply. Voltage ranges from 1.8V to
3.6V for the Voltage Regulator
• VDDPLL pin: Powers the PLL, the Fast RC and the 3 to 20 MHz oscillators. Voltage ranges
from 1.62V and 1.95V.
5.2Voltage Regulator
The SAM3N embeds a voltage regulator that is managed by the Supply Controller.
This internal regulator is intended to supply the internal core of SAM3N. It features two different
operating modes:
• In Normal mode, the voltage regulator consumes less than 700 µA static current and draws
60 mA of output current. Internal adaptive biasing adjusts the regulator quiescent current
depending on the required load current. In Wait Mode quiescent current is only 7 µA.
• In Backup mode, the voltage regulator consumes less than 1 µA while its output (VDDOUT)
is driven internally to GND. The default output voltage is 1.80V and the start-up time to reach
Normal mode is less than100 µs.
For adequate input and output power supply decoupling/bypassing, refer to the Voltage Regulator section in the Electrical Characteristics section of the datasheet.
5.3Typical Powering Schematics
The SAM3N supports a 1.62V-3.6V single supply mode. The internal regulator input connected
to the source and its output feeds VDDCORE. Figure 5-1 shows the power schematics.
As VDDIN powers the voltage regulator and the ADC/DAC, when the user does not want to use
the embedded voltage regulator, it can be disabled by software via the SUPC (note that it is different from Backup mode).
16
SAM3N Summary
11011AS–ATARM–04-Oct-10
Figure 5-1.Single Supply
Main Supply
(1.8V-3.6V)
ADC, DAC
I/Os.
VDDIN
Voltage
Regulator
VDDOUT
VDDCORE
VDDIO
VDDPLL
Main Supply
(1.62V-3.6V)
Can be the
same supply
VDDCORE Supply
(1.62V-1.95V)
ADC, DAC Supply
(3V-3.6V)
ADC, DAC
VDDIN
Voltage
Regulator
VDDOUT
VDDCORE
VDDIO
VDDPLL
I/Os.
Figure 5-2.Core Externally Supplied
SAM3N Summary
11011AS–ATARM–04-Oct-10
Note:Restrictions
With Main Supply < 3V, ADC and DAC are not usable.
With Main Supply >= 3V, all peripherals are usable.
Figure 5-3 below provides an example of the powering scheme when using a backup battery.
Since the PIO state is preserved when in backup mode, any free PIO line can be used to switch
off the external regulator by driving the PIO line at low level (PIO is input, pull-up enabled after
backup reset). External wake-up of the system can be from a push button or any signal. See
Section 5.6 “Wake-up Sources” for further details.
Note: The two diodes provide a “switchover circuit” (for illustration purpose)
between the backup battery and the main supply when the system is put in
backup mode.
5.4Active Mode
5.5Low Power Modes
5.5.1Backup Mode
Active mode is the normal running mode with the core clock running from the fast RC oscillator,
the main crystal oscillator or the PLL. The power management controller can be used to adapt
the frequency and to disable the peripheral clocks.
The various low-power modes of the SAM3N are described below:
The purpose of backup mode is to achieve the lowest power consumption possible in a system
that is performing periodic wakeups to carry out tasks but not requiring fast startup time
(<0.1ms). Total current consumption is 3 µA typical.
The Supply Controller, zero-power power-on reset, RTT, RTC, Backup registers and 32 kHz
oscillator (RC or crystal oscillator selected by software in the Supply Controller) are running. The
regulator and the core supply are off.
Backup mode is based on the Cortex-M3 deep sleep mode with the voltage regulator disabled.
The SAM3N can be awakened from this mode through WUP0-15 pins, the supply monitor (SM),
the RTT or RTC wake-up event.
Backup mode is entered by using WFE instructions with the SLEEPDEEP bit in the System Control Register of the Cortex-M3 set to 1. (See the Power management description in The ARM
Cortex M3 Processor section of the product datasheet).
18
Exit from Backup mode happens if one of the following enable wake-up events occurs:
The purpose of the wait mode is to achieve very low power consumption while maintaining the
whole device in a powered state for a startup time of less than 10 µs. Current Consumption in
Wait mode is typically 15 µA (total current consumption) if the internal voltage regulator is used
or 8 µA if an external regulator is used.
In this mode, the clocks of the core, peripherals and memories are stopped. However, the core,
peripherals and memories power supplies are still powered. From this mode, a fast start up is
available.
This mode is entered via Wait for Event (WFE) instructions with LPM = 1 (Low Power Mode bit in
PMC_FSMR). The Cortex-M3 is able to handle external or internal events in order to wake up
the core (WFE). By configuring the WUP0-15 external lines as fast startup wake-up pins (refer to
Section 5.7 “Fast Start-Up”). RTC or RTT Alarm wake-up events can be used to wake up the
CPU (exit from WFE).
Entering Wait Mode:
5.5.3Sleep Mode
• Select the 4/8/12 MHz fast RC oscillator as Main Clock
• Set the LPM bit in the PMC Fast Startup Mode Register (PMC_FSMR)
• Execute the Wait-For-Event (WFE) instruction of the processor
Note:Internal Main clock resynchronization cycles are necessary between the writing of MOSCRCEN
bit and the effective entry in Wait mode. Depending on the user application, Waiting for
MOSCRCEN bit to be cleared is recommended to ensure that the core will not execute undesired
instructions.
The purpose of sleep mode is to optimize power consumption of the device versus response
time. In this mode, only the core clock is stopped. The peripheral clocks can be enabled. The
current consumption in this mode is application dependent.
This mode is entered via Wait for Interrupt (WFI) or Wait for Event (WFE) instructions with
LPM = 0 in PMC_FSMR.
The processor can be woke up from an interrupt if WFI instruction of the Cortex M3 is used, or
from an event if the WFE instruction is used to enter this mode.
11011AS–ATARM–04-Oct-10
19
5.5.4Low Power Mode Summary Table
The modes detailed above are the main low power modes. Each part can be set to on or off separately and wake up sources can be individually configured. Table 5-1 below shows a summary
of the configurations of the low power modes.
Table 5-1.Low Power Mode Configuration Summary
SUPC,
32 kHz
Oscillator
RTC RTT
Backup
Registers,
POR
(Backup
Mode
Backup
Mode
Wait
Mode
Sleep
Mode
Region)Regulator
ONOFF
ONON
ONON
Notes:1. When considering wake-up time, the time required to start the PLL is not taken into account. Once started, the device works
with the 4/8/12 MHz Fast RC oscillator. The user has to add the PLL start-up time if it is needed in the system. The wake-up
time is defined as the time taken for wake up until the first instruction is fetched.
2. The external loads on PIOs are not taken into account in the calculation.
3. Supply Monitor current consumption is not included.
4. Total Current consumption.
5. 5 µA on VDDCORE, 15 µA for total current consumption (using internal voltage regulator), 8 µA for total current consumption
(without using internal voltage regulator).
6. Depends on MCK frequency.
7. In this mode the core is supplied and not clocked but some peripherals can be clocked.
Core
Memory
PeripheralsMode Entry
OFF
(Not powered)
Powe red
(Not clocked)
Powe red
(Not clocked)
(7)
WFE
+SLEEPDEEP
bit = 1
WFE
+SLEEPDEEP
bit = 0
+LPM bit = 1
WFE or WFI
+SLEEPDEEP
bit = 0
+LPM bit = 0
Potential Wake Up
Sources
WUP0-15 pins
BOD alarm
RTC alarm
RTT alarm
Any Event from: Fast
startup through
WUP0-15 pins
RTC alarm
RTT alarm
Entry mode = WFI
Interrupt Only; Entry
mode = WFE Any
Enabled Interrupt
and/or Any Event
from: Fast start-up
through WUP0-15
pins
RTC alarm
RTT alarm
Core at
Wake Up
Reset
Clocked
back
Clocked
back
PIO State
while in Low
Power Mode
Previous
state saved
Previous
state saved
Previous
state saved
PIO State
at Wake Up
PIOA &
PIOB &
PIOC
Inputs with
pull ups
Unchanged 5 µA/15 µA
Unchanged
Consumption
(2) (3)
(4)
3 µA typ
(6)(6)
(5)
Wake Up
(1)
Time
< 0.1 ms
< 10 µs
20
SAM3N Summary
11011AS–ATARM–04-Oct-10
5.6Wake-up Sources
WKUP15
WKUPEN15
WKUPT15
WKUPEN1
WKUPEN0
Debouncer
SLCK
WKUPDBC
WKUPS
RTCEN
rtc_alarm
BODEN
brown_out
Core
Supply
Restart
WKUPIS0
WKUPIS1
WKUPIS15
Falling/Rising
Edge
Detector
WKUPT0
Falling/Rising
Edge
Detector
WKUPT1
Falling/Rising
Edge
Detector
WKUP0
WKUP1
RTTEN
rtt_alarm
The wake-up events allow the device to exit backup mode. When a wake-up event is detected,
the Supply Controller performs a sequence which automatically reenables the core power supply and the SRAM power supply, if they are not already enabled.
Figure 5-4.Wake-up Source
SAM3N Summary
11011AS–ATARM–04-Oct-10
21
5.7Fast Start-Up
The SAM3N allows the processor to restart in a few microseconds while the processor is in wait
mode. A fast start up can occur upon detection of a low level on one of the 19 wake-up inputs
(WKUP0 to 15 + SM + RTC + RTT).
The fast restart circuitry, as shown in Figure 5-5, is fully asynchronous and provides a fast startup signal to the Power Management Controller. As soon as the fast start-up signal is asserted,
the PMC automatically restarts the embedded 4 MHz fast RC oscillator, switches the master
clock on this 4 MHz clock and reenables the processor clock.
Figure 5-5.Fast Start-Up Sources
WKUP0
WKUP15
rtc_alarm
rtt_alarm
Falling/Rising
Edge
Detector
Falling/Rising
Edge
Detector
RTCEN
RTTEN
FSTT15
FSTT0
fast_restart
22
SAM3N Summary
11011AS–ATARM–04-Oct-10
6.Input/Output Lines
The SAM3N has several kinds of input/output (I/O) lines such as general purpose I/Os (GPIO)
and system I/Os. GPIOs can have alternate functionality due to multiplexing capabilities of the
PIO controllers. The same PIO line can be used whether in IO mode or by the multiplexed
peripheral. System I/Os include pins such as test pins, oscillators, erase or analog inputs.
6.1General Purpose I/O Lines
GPIO Lines are managed by PIO Controllers. All I/Os have several input or output modes such
as pull-up or pull-down, input Schmitt triggers, multi-drive (open-drain), glitch filters, debouncing
or input change interrupt. Programming of these modes is performed independently for each I/O
line through the PIO controller user interface. For more details, refer to the product PIO controller section.
The input output buffers of the PIO lines are supplied through VDDIO power supply rail.
The SAM3N embeds high speed pads able to handle up to 45 MHz for SPI clock lines and 35
MHz on other lines. See AC Characteristics Section in the Electrical Characteristics Section of
the datasheet for more details. Typical pull-up and pull-down value is 100 kΩ for all I/Os.
Each I/O line also embeds an ODT (On-Die Termination), (see Figure 6-1). It consists of an
internal series resistor termination scheme for impedance matching between the driver output
(SAM3N) and the PCB trace impedance preventing signal reflection. The series resistor helps to
reduce I/O switching current (di/dt) thereby reducing in turn, EMI. It also decreases overshoot
and undershoot (ringing) due to inductance of interconnect between devices or between boards.
In conclusion ODT helps diminish signal integrity issues.
SAM3N Summary
Figure 6-1.On-Die Termination
6.2System I/O Lines
System I/O lines are pins used by oscillators, test mode, reset and JTAG to name but a few.
Described below are the SAM3N system I/O lines shared with PIO lines:
These pins are software configurable as general purpose I/O or system pins. At startup the
default function of these pins is always used.
SAM3 Driver with
Zout ~ 10 Ohms
Z0 ~ Zout + Rodt
ODT
36 Ohms Ty p.
Rodt
Receiver
PCB Trace
Z0 ~ 50 Ohms
11011AS–ATARM–04-Oct-10
23
Table 6-1.System I/O Configuration Pin List.
SYSTEM_IO
bit number
12ERASEPB12
7TCK/SWCLKPB7-
6TMS/SWDIOPB6-
5TDO/TRACESWOPB5-
4TDIPB4-
-PA7 XIN32-
-PA8 XOUT32-
-PB9 XIN-
-PB8 XOUT-
Notes:1. If PB12 is used as PIO input in user applications, a low level must be ensured at startup to prevent Flash erase before the
user application sets PB12 into PIO mode.
2. In the product Datasheet Refer to: Slow Clock Generator of the Supply Controller section.
3. In the product Datasheet Refer to: 3 to 20 MHZ Crystal Oscillator information in the PMC section.
Default function
after resetOther function
Constraints for
normal startConfiguration
Low Level at
startup
(1)
In Matrix User Interface Registers
(Refer to the System I/O
Configuration Register in the Bus
Matrix section of the product
datasheet.)
See footnote
See footnote
(2)
below
(3)
below
6.2.1Serial Wire JTAG Debug Port (SWJ-DP) Pins
The SWJ-DP pins are TCK/SWCLK, TMS/SWDIO, TDO/SWO, TDI and commonly provided on
a standard 20-pin JTAG connector defined by ARM. For more details about voltage reference
and reset state, refer to Table 3-1 on page 6.
At startup, SWJ-DP pins are configured in SWJ-DP mode to allow connection with debugging
probe. Please refer to the Debug and Test Section of the product datasheet.
SWJ-DP pins can be used as standard I/Os to provide users more general input/output pins
when the debug port is not needed in the end application. Mode selection between SWJ-DP
mode (System IO mode) and general IO mode is performed through the AHB Matrix Special
Function Registers (MATRIX_SFR). Configuration of the pad for pull-up, triggers, debouncing
and glitch filters is possible regardless of the mode.
The JTAGSEL pin is used to select the JTAG boundary scan when asserted at a high level. It
integrates a permanent pull-down resistor of about 15 kΩ to GND, so that it can be left unconnected for normal operations.
By default, the JTAG Debug Port is active. If the debugger host wants to switch to the Serial
Wire Debug Port, it must provide a dedicated JTAG sequence on TMS/SWDIO and
TCK/SWCLK which disables the JTAG-DP and enables the SW-DP. When the Serial Wire
Debug Port is active, TDO/TRACESWO can be used for trace.
The asynchronous TRACE output (TRACESWO) is multiplexed with TDO. So the asynchronous
trace can only be used with SW-DP, not JTAG-DP. For more information about SW-DP and
JTAG-DP switching, please refer to the Debug and Test Section.
24
SAM3N Summary
11011AS–ATARM–04-Oct-10
6.3Test Pin
6.4NRST Pin
6.5ERASE Pin
SAM3N Summary
The TST pin is used for JTAG Boundary Scan Manufacturing Test or Fast Flash programming
mode of the SAM3N series. The TST pin integrates a permanent pull-down resistor of about 15
kΩ to GND, so that it can be left unconnected for normal operations. To enter fast programming
mode, see the Fast Flash Programming Interface (FFPI) section. For more on the manufacturing
and test mode, refer to the “Debug and Test” section of the product datasheet.
The NRST pin is bidirectional. 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. It will reset the Core and the peripherals except the Backup region (RTC, RTT
and Supply Controller). There is no constraint on the length of the reset pulse and the reset controller can guarantee a minimum pulse length. The NRST pin integrates a permanent pull-up
resistor to VDDIO of about 100 kΩ . By default, the NRST pin is configured as an input.
The ERASE pin is used to reinitialize the Flash content (and some of its NVM bits) to an erased
state (all bits read as logic level 1). It integrates a pull-down resistor of about 100 kΩ to GND, so
that it can be left unconnected for normal operations.
This pin is debounced by SCLK to improve the glitch tolerance. When the ERASE pin is tied high
during less than 100 ms, it is not taken into account. The pin must be tied high during more than
220 ms to perform a Flash erase operation.
The ERASE pin is a system I/O pin and can be used as a standard I/O. At startup, the ERASE
pin is not configured as a PIO pin. If the ERASE pin is used as a standard I/O, startup level of
this pin must be low to prevent unwanted erasing. Please refer to Section 10.2 “Peripheral Sig-
nals Multiplexing on I/O Lines” on page 41. Also, if the ERASE pin is used as a standard I/O
output, asserting the pin to low does not erase the Flash.
11011AS–ATARM–04-Oct-10
25
7.Processor and Architecture
7.1ARM Cortex-M3 Processor
• Version 2.0
• Thumb-2 (ISA) subset consisting of all base Thumb-2 instructions, 16-bit and 32-bit.
• Harvard processor architecture enabling simultaneous instruction fetch with data load/store.
• Three-stage pipeline.
• Single cycle 32-bit multiply.
• Hardware divide.
• Thumb and Debug states.
• Handler and Thread modes.
• Low latency ISR entry and exit.
7.2APB/AHB Bridge
The SAM3N4/2/1 product embeds one peripheral bridge:
The peripherals of the bridge are clocked by MCK.
7.3Matrix Masters
The Bus Matrix of the SAM3N product manages 3masters, which means that each master can
perform an access concurrently with others, to an available slave.
7.4Matrix Slaves
Each master has its own decoder, which is defined specifically for each master. In order to simplify the addressing, all the masters have the same decodings.
Table 7-1.List of Bus Matrix Masters
Master 0Cortex-M3 Instruction/Data
Master 1Cortex-M3 System
Master 2Peripheral DMA Controller (PDC)
The Bus Matrix of the SAM3N product manages 4 slaves. Each slave has its own arbiter, allowing a different arbitration per slave.
Table 7-2.List of Bus Matrix Slaves
Slave 0Internal SRAM
Slave 1Internal ROM
Slave 2Internal Flash
Slave 3Peripheral Bridge
26
SAM3N Summary
11011AS–ATARM–04-Oct-10
7.5Master to Slave Access
All the Masters can normally access all the Slaves. However, some paths do not make sense,
for example allowing access from the Cortex-M3 S Bus to the Internal ROM. Thus, these paths
are forbidden or simply not wired, and shown as “-” in Table 7-3.
Table 7-3.SAM3N Master to Slave Access
0Internal SRAM-XX
1Internal ROMX-X
2Internal FlashX--
3 Peripheral Bridge-XX
7.6Peripheral DMA Controller
• Handles data transfer between peripherals and memories
• 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 requirement
The Peripheral DMA Controller handles transfer requests from the channel according to the following priorities (Low to High priorities):
SAM3N Summary
Masters0 1 2
SlavesCortex-M3 I/D BusCortex-M3 S BusPDC
Table 7-4.Peripheral DMA Controller
Instance nameChannel T/R100 & 64 Pins48 Pins
TWI0Transmitxx
UART0Transmitxx
USART0Transmitxx
DACTransmitxN/A
SPITransmitxx
TWI0Receivexx
UART0Receivexx
USART0Receivexx
ADCReceivexx
SPIReceivexx
11011AS–ATARM–04-Oct-10
27
7.7Debug and Test Features
• Debug access to all memory and registers in the system, including Cortex-M3 register bank
when the core is running, halted, or held in reset.
• Serial Wire Debug Port (SW-DP) and Serial Wire JTAG Debug Port (SWJ-DP) debug access
• Flash Patch and Breakpoint (FPB) unit for implementing breakpoints and code patches
• Data Watchpoint and Trace (DWT) unit for implementing watchpoints, data tracing, and
system profiling
• Instrumentation Trace Macrocell (ITM) for support of printf style debugging
• IEEE1149.1 JTAG Boundary-can on All Digital Pins
28
SAM3N Summary
11011AS–ATARM–04-Oct-10
8.Memories
Address Memory Space
Code
0x00000000
SRAM
0x20000000
Peripherals
0x40000000
0x60000000
0xA0000000
System
0xE0000000
0xFFFFFFFF
offset
ID
peripheral
block
Code
Boot Memory
0x00000000
Internal Flash
Internal ROM
0x00400000
0x00800000
0x00C00000
0x1FFFFFFF
Peripherals
0x40000000
0x40004000
SPI
21
0x40008000
0x4000C000
TC0
TC0
0x40010000
23
TC0
TC1
+0x40
24
TC0
TC2
+0x80
25
TC1
TC3
0x40014000
26
TC1
TC4
+0x40
27
TC1
TC5
+0x80
28
TWI0
19
0x40018000
TWI1
20
0x4001C000
PWM
31
0x40020000
14
0x40024000
0x40028000
0x4002C000
ADC
29
0x40038000
DACC
30
0x4003C000
0x40040000
0x40044000
0x40048000
System Controller
0x400E0000
0x400E2600
0x40100000
System Controller
0x400E0000
MATRIX
0x400E0200
PMC
5
0x400E0400
UART0
UART1
8
0x400E0600
CHIPID
0x400E0740
9
0x400E0800
EEFC
6
0x400E0A00
0x400E0C00
11
0x400E0E00
PIOB
PIOA
12
0x400E1000
PIOC
13
0x400E1200
SYSC
RSTC
0x400E1400
1
SYSC
SUPC
+0x10
SYSC
RTT
+0x30
3
SYSC
WDT
+0x50
4
SYSC
RTC
+0x60
2
SYSC
GPBR
+0x90
0x400E1600
0x4007FFFF
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
USART0
Reserved
0x40200000
Reserved
Reserved
32 MBytes
bit band alias
32 MBytes
bit band alias
0x60000000
Reserved
Reserved
USART1
15
Reserved
Reserved
0x40400000
0x20100000
0x22000000
0x24000000
Undefined
1 MByte
bit band
region
1 MByte
bit band
region
8.1Product Mapping
Figure 8-1.SAM3N4/2/1 Product Mapping
SAM3N Summary
11011AS–ATARM–04-Oct-10
29
8.2Embedded Memories
8.2.1Internal SRAM
The SAM3N4 product embeds a total of 24-Kbytes high-speed SRAM.
The SAM3N2 product embeds a total of 16-Kbytes high-speed SRAM.
The SAM3N1 product embeds a total of 8-Kbytes high-speed SRAM.
The SRAM is accessible over System Cortex-M3 bus at address 0x2000 0000.
The SRAM is in the bit band region. The bit band alias region is from 0x2200 0000 and 0x23FF
FFFF.
RAM size must be configurable by calibration fuses.
8.2.2Internal ROM
The SAM3N product embeds an Internal ROM, which contains the SAM Boot Assistant
(SAM-BA), In Application Programming routines (IAP) and Fast Flash Programming Interface
(FFPI).
At any time, the ROM is mapped at address 0x0080 0000.
8.2.3Embedded Flash
8.2.3.1Flash Overview
The Flash of the SAM3N4 (256 Kbytes) is organized in one bank of 1024 pages of 256 bytes
(Single plane).
The Flash of the SAM3N2 (128 Kbytes) is organized in one bank of 512 pages of 256 bytes (Single Plane).
The Flash of the SAM3N1 (64 Kbytes) is organized in one bank of 256 pages of 256 bytes (Single plane).
The Flash contains a 128-byte write buffer, accessible through a 32-bit interface.
8.2.3.2Flash Power Supply
The Flash is supplied by VDDCORE.
8.2.3.3Enhanced Embedded Flash Controller
The Enhanced Embedded Flash Controller (EEFC) 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 on the APB.
The Enhanced Embedded Flash Controller ensures the interface of the Flash block with the 32bit internal bus. Its 128-bit wide memory interface increases performance.
The user can choose between high performance or lower current consumption by selecting
either 128-bit or 64-bit access. It also manages the programming, erasing, locking and unlocking
sequences of the Flash using a full set of commands.
One of the commands returns the embedded Flash descriptor definition that informs the system
about the Flash organization, thus making the software generic.
30
SAM3N Summary
11011AS–ATARM–04-Oct-10
8.2.3.4Flash Speed
8.2.3.5Lock Regions
SAM3N Summary
The user needs to set the number of wait states depending on the frequency used.
For more details, refer to the AC Characteristics sub section in the product Electrical Characteristics Section.
Several lock bits used to protect write and erase operations on lock regions. A lock region is
composed of several consecutive pages, and each lock region has its associated lock bit.
Table 8-1.Lock bit number
ProductNumber of lock bitsLock region size
SAM3N41616 kbytes (64 pages)
SAM3N2816 kbytes (64 pages)
SAM3N1416 kbytes (64 pages)
If a locked-region’s erase or program command occurs, the command is aborted and the EEFC
triggers an interrupt.
The lock bits are software programmable through the EEFC 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.2.3.6Security Bit Feature
The SAM3N features a security bit, based on a specific General Purpose NVM bit (GPNVM bit
0). 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 General Purpose NVM Bit 0” of
the EEFC User Interface. Disabling the security bit can only be achieved by asserting the
ERASE pin at 1, 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 200 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.2.3.7Calibration Bits
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.2.3.8Unique Identifier
Each device integrates its own 128-bit unique identifier. These bits are factory configured and
cannot be changed by the user. The ERASE pin has no effect on the unique identifier.
11011AS–ATARM–04-Oct-10
31
8.2.3.9Fast 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 TST and PA0 and PA1are tied low.
8.2.3.10SAM-BA Boot
The SAM-BA Boot is a default Boot Program which provides an easy way to program in-situ the
on-chip Flash memory.
The SAM-BA Boot Assistant supports serial communication via the UART0.
The SAM-BA Boot provides an interface with SAM-BA Graphic User Interface (GUI).
The SAM-BA Boot is in ROM and is mapped in Flash at address 0x0 when GPNVM bit 1 is set to 0.
8.2.3.11GPNVM Bits
The SAM3N features three GPNVM bits that can be cleared or set respectively through the commands “Clear GPNVM Bit” and “Set GPNVM Bit” of the EEFC User Interface.
.
8.2.4Boot Strategies
Table 8-2.General-purpose Non volatile Memory Bits
GPNVMBit[#]Function
0Security bit
1Boot mode selection
The system always boots at address 0x0. To ensure a maximum boot possibilities the memory
layout can be changed via GPNVM.
A general purpose NVM (GPNVM) bit is used to boot either on the ROM (default) or from the
Flash.
The GPNVM bit can be cleared or set respectively through the commands “Clear General-purpose NVM Bit” and “Set General-purpose NVM Bit” of the EEFC User Interface.
Setting the GPNVM Bit 1 selects the boot from the Flash, clearing it selects the boot from the
ROM. Asserting ERASE clears the GPNVM Bit 1 and thus selects the boot from the ROM by
default.
32
SAM3N Summary
11011AS–ATARM–04-Oct-10
9.System Controller
The System Controller is a set of peripherals, which allow handling of key elements of the system, such as power, resets, clocks, time, interrupts, watchdog, etc...
See the System Controller block diagram in Figure 9-1 on page 34.
SAM3N Summary
11011AS–ATARM–04-Oct-10
33
Figure 9-1.System Controller Block Diagram
Software Controlled
Voltage Regulator
ADC
PIOA/B/C
Matrix
SRAM
Cortex-M3
Flash
Peripherals
Peripheral
Bridge
Zero-Power
Power-on Reset
Supply
Monitor
(Backup)
RTC
Embedded
32 kHz RC
Oscillator
Xtal 32 kHz
Oscillator
Supply
Controller
Brownout
Detector
(Core)
General Purpose
Backup Registers
Reset
Controller
Backup Power Supply
Core Power Supply
vr_on
vr_mode
bod_on
brown_out
rtc_alarm
SLCK
rtc_nreset
proc_nreset
periph_nreset
ice_nreset
Master Clock
MCK
SLCK
core_nreset
Main Clock
MAINCK
SLCK
NRST
FSTT0 - FSTT15
XIN32
XOUT32
osc32k_xtal_en
osc32k_sel
Slow Clock
SLCK
osc32k_rc_en
core_nreset
VDDIO
VDDCORE
VDDOUT
ADVREF
ADx
WKUP0 - WKUP15
bod_core_on
lcore_brown_out
RTT
rtt_alarm
SLCK
rtt_nreset
XIN
XOUT
VDDIO
VDDIN
PIOx
DAC
DAC0
PLL
FSTT0 - FSTT15 are possible Fast Startup Sources, generated by WKUP0-WKUP15 Pins, but are not physical pins.
Embedded
12/8/4 MHz
RC
Oscillator
Xtal
Oscillator
Watchdog
Timer
Powe r
Management
Controller
34
SAM3N Summary
11011AS–ATARM–04-Oct-10
9.1System Controller and Peripherals Mapping
Please refer to Figure 8-1, "SAM3N4/2/1 Product Mapping" on page 29.
All the peripherals are in the bit band region and are mapped in the bit band alias region.
9.2Power-on-Reset, Brownout and Supply Monitor
The SAM3N embeds three features to monitor, warn and/or reset the chip:
• Power-on-Reset on VDDIO
• Brownout Detector on VDDCORE
• Supply Monitor on VDDIO
9.2.1Power-on-Reset
The Power-on-Reset monitors VDDIO. It is always activated and monitors voltage at start up but
also during power down. If VDDIO goes below the threshold voltage, the entire chip is reset. For
more information, refer to the Electrical Characteristics section of the datasheet.
9.2.2Brownout Detector on VDDCORE
The Brownout Detector monitors VDDCORE. It is active by default. It can be deactivated by software through the Supply Controller (SUPC_MR). It is especially recommended to disable it
during low-power modes such as wait or sleep modes.
SAM3N Summary
If VDDCORE goes below the threshold voltage, the reset of the core is asserted. For more information, refer to the Supply Controller (SUPC) and Electrical Characteristics sections of the
datasheet.
9.2.3Supply Monitor on VDDIO
The Supply Monitor monitors VDDIO. It is inactive by default. It can be activated by software and
is fully programmable with 16 steps for the threshold (between 1.9V to 3.4V). It is controlled by
the Supply Controller (SUPC). A sample mode is possible. It allows to divide the supply monitor
power consumption by a factor of up to 2048. For more information, refer to the SUPC and Electrical Characteristics sections of the datasheet.
9.3Reset Controller
The Reset Controller is based on a Power-on-Reset cell, and a Supply Monitor on VDDCORE.
The Reset Controller is capable to return to the software the source of the last reset, either a
general reset, a wake-up reset, a software reset, a user reset or a watchdog reset.
The Reset Controller controls the internal resets of the system and the NRST pin input/output. It
is capable to shape a reset signal for the external devices, simplifying to a minimum connection
of a push-button on the NRST pin to implement a manual reset.
The configuration of the Reset Controller is saved as supplied on VDDIO.
9.4Supply Controller (SUPC)
The Supply Controller controls the power supplies of each section of the processor and the
peripherals (via Voltage regulator control)
11011AS–ATARM–04-Oct-10
The Supply Controller has its own reset circuitry and is clocked by the 32 kHz slow clock
generator.
35
The reset circuitry is based on a zero-power power-on reset cell and a brownout detector cell.
XIN
XOUT
Main Clock
MAINCK
Slow Clock
SLCK
XIN32
XOUT32
Clock Generator
XTALSEL
MAINSEL
Power
Management
Controller
ControlStatus
PLL and
Divider A
PLLA Clock
PLLACK
3-20 MHz
Main
Oscillator
Slow Clock
Oscillator
On Chip
12/8/4 MHz
RC OSC
On Chip 32 kHz
RC OSC
The zero-power power-on reset allows the Supply Controller to start properly, while the software-programmable brownout detector allows detection of either a battery discharge or main
voltage loss.
The Slow Clock generator is based on a 32 kHz crystal oscillator and an embedded 32 kHz RC
oscillator. The Slow Clock defaults to the RC oscillator, but the software can enable the crystal
oscillator and select it as the Slow Clock source.
The Supply Controller starts up the device by sequentially enabling the internal power switches
and the Voltage Regulator, then it generates the proper reset signals to the core power supply.
It also enables to set the system in different low power modes and to wake it up from a wide
range of events.
9.5Clock Generator
The Clock Generator is made up of:
• One Low Power 32768Hz Slow Clock Oscillator with bypass mode
• One Low-Power RC Oscillator
• One 3-20 MHz Crystal or Ceramic resonator Oscillator, which can be bypassed
• One Fast RC Oscillator factory programmed, 3 output frequencies can be selected: 4, 8 or 12
MHz. By default 4 MHz is selected.
• One 60 to 130 MHz programmable PLL, capable to provide the clock MCK to the processor
and to the peripherals. The input frequency of PLL is from 3.5 to 20 MHz.
Figure 9-2.Clock Generator Block Diagram
36
SAM3N Summary
11011AS–ATARM–04-Oct-10
9.6Power Management Controller
MCK
periph_clk[..]
int
SLCK
MAINCK
Prescaler
/1,/2,/4,..,/64
HCK
Processor
Clock
Controller
Sleep Mode
Master Clock Controller
Peripherals
Clock Controller
ON/OFF
SLCK
MAINCK
Prescaler
/1,/2,/4,..,/64
Programmable Clock Controller
pck[..]
ON/OFF
FCLK
SystTick
Divider
/8
PLLCK
PLLCK
The Power Management Controller provides all the clock signals to the system. It provides:
• the Processor Clock HCLK
• the Free running processor clock FCLK
• the Cortex SysTick external clock
• the Master Clock MCK, in particular to the Matrix and the memory interfaces
• independent peripheral clocks, typically at the frequency of MCK
• three programmable clock outputs: PCK0, PCK1 and PCK2
The Supply Controller selects between the 32 kHz RC oscillator or the crystal oscillator. The
unused oscillator is disabled automatically so that power consumption is optimized.
By default, at startup the chip runs out of the Master Clock using the Fast RC Oscillator running
at 4 MHz.
The user can trim by software the 8 and 12 MHz RC Oscillator frequency.
Figure 9-3.SAM3N4/2/1 Power Management Controller Block Diagram
SAM3N Summary
The SysTick calibration value is fixed at 6000 which allows the generation of a time base of 1 ms
with SysTick clock at 6 MHz (48 MHz/8)
– 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
• Selection of the drive level
• Synchronous output, provides Set and Clear of several I/O lines in a single write
10. Peripherals
10.1Peripheral Identifiers
Table 10-1 defines the Peripheral Identifiers of the SAM3N4/2/1. A peripheral identifier is
required for the control of the peripheral interrupt with the Nested Vectored Interrupt Controller
and for the control of the peripheral clock with the Power Management Controller.
The SAM3N product features 2 PIO controllers (48-pin and 64-pin version) or 3 PIO controllers
(100-pin version), PIOA, PIOB and PIOC, that multiplex the I/O lines of the peripheral set.
The SAM3N 64-pin and 100-pin PIO Controller controls up to 32 lines (see Table 9-2, “PIO avail-
able according to pin count,” on page 39). Each line can be assigned to one of three peripheral
functions: A, B or C. The multiplexing tables in the following paragraphs define how the I/O lines
of the peripherals A, B and C are multiplexed on the PIO Controllers. The column “Comments”
has been inserted in this table for the user’s own comments; it may be used to track how pins
are defined in an application.
Note that some peripheral functions which are output only, might be duplicated within the tables.
11011AS–ATARM–04-Oct-10
41
10.2.1PIO Controller A Multiplexing
Table 10-2.Multiplexing on PIO Controller A (PIOA)
• ±2 LSB Integral Non Linearity, ±1 LSB Differential Non Linearity
• Integrated 8-to-1 multiplexer, offering eight independent 3.3V analog inputs
• External voltage reference for better accuracy on low voltage inputs
• Individual enable and disable of each channel
• Multiple trigger source
– Hardware or software trigger
– External trigger pin
– Timer Counter 0 to 2 outputs TIOA0 to TIOA2 trigger
• Sleep Mode and conversion sequencer
– Automatic wakeup on trigger and back to sleep mode after conversions of all
enabled channels
11.8Digital-to-Analog Converter (DAC)
• 1 channel 10-bit DAC
• Up to 500 ksamples/s conversion rate
• Flexible conversion range
• Multiple trigger sources
• One PDC channel
11011AS–ATARM–04-Oct-10
47
12. Package Drawings
Note : 1. This drawing is for general information only. Refer to JEDEC Drawing MS-026 for additional information.
The SAM3N series devices are available in LQFP, QFN and LFBGA packages.
Figure 12-1. 100-lead LQFP Package Drawing
48
SAM3N Summary
11011AS–ATARM–04-Oct-10
Figure 12-2. 100-ball LFBGA Package Drawing
SAM3N Summary
11011AS–ATARM–04-Oct-10
49
Figure 12-3. 64- and 48-lead LQFP Package Drawing
50
SAM3N Summary
11011AS–ATARM–04-Oct-10
Table 12-1.48-lead LQFP Package Dimensions (in mm)
SAM3N Summary
Symbol
A – –1.60– –0.063
A10.05–0.150.002–0.006
A21.351.401.450.0530.0550.057
D9.00 BSC0.354 BSC
D17.00 BSC0.276 BSC
E9.00 BSC0.354 BSC
E17.00 BSC0.276 BSC
R20.08–0.200.003–0.008
R10.08––0.003––
q 0°3.5°7° 0°3.5°7°
θ
1
θ
2
θ
3
c0.09–0.200.004–0.008
L0.450.600.750.0180.0240.030
L11.00 REF0.039 REF
S0.20––0.008––
b0.170.200.270.0070.0080.011
MinNomMaxMinNomMax
0°––0°––
11°12°13°11°12°13°
11°12°13°11°12°13°
MillimeterInch
e0.50 BSC.0.020 BSC.
D25.500.217
E25.500.217
Tolerances of Form and Position
aaa0.200.008
bbb0.200.008
ccc0.080.003
ddd0.080.003
11011AS–ATARM–04-Oct-10
51
Table 12-2.64-lead LQFP Package Dimensions (in mm)
Symbol
A – –1.60– –0.063
A10.05–0.150.002–0.006
A21.351.401.450.0530.0550.057
D12.00 BSC0.472 BSC
D110.00 BSC0.383 BSC
E12.00 BSC0.472 BSC
E110.00 BSC0.383 BSC
R20.08–0.200.003–0.008
R10.08––0.003––
q 0°3.5°7° 0°3.5°7°
θ
1
θ
2
θ
3
c0.09–0.200.004–0.008
L0.450.600.750.0180.0240.030
L11.00 REF0.039 REF
S0.20––0.008––
b0.170.200.270.0070.0080.011
e0.50 BSC.0.020 BSC.
D27.500.285
E27.500.285
aaa0.200.008
bbb0.200.008
ccc0.080.003
ddd0.080.003
MinNomMaxMinNomMax
0°––0°––
11°12°13°11°12°13°
11°12°13°11°12°13°
MillimeterInch
Tolerances of Form and Position
52
SAM3N Summary
11011AS–ATARM–04-Oct-10
Figure 12-4. 48-pad QFN Package Drawing
SAM3N Summary
11011AS–ATARM–04-Oct-10
53
Table 12-3.48-pad QFN Package Dimensions (in mm)
Symbol
MinNomMaxMinNomMax
A––090––0.035
A1––0.050––0.002
A2–0.650.70–0.0260.028
A30.20 REF0.008 REF
b0.180.200.230.0070.0080.009
D7.00 bsc0.276 bsc
D25.455.605.750.2150.2200.226
E7.00 bsc0.276 bsc
E25.455.605.750.2150.2200.226
L0.350.400.450.0140.0160.018
e0.50 bsc0.020 bsc
R0.09––0.004––
aaa0.100.004
bbb0.100.004
ccc0.050.002
MillimeterInch
Tolerances of Form and Position
54
SAM3N Summary
11011AS–ATARM–04-Oct-10
Figure 12-5. 64-pad QFN Package Drawing
SAM3N Summary
11011AS–ATARM–04-Oct-10
55
13. Ordering Information
Table 13-1.SAM3N4/2/1
Flash
Ordering CodeMRL
ATSAM3N4CA-AUA256QFP100Green
ATSAM3N4CA-CUA256BGA100Green
ATSAM3N4BA-AUA256QFP64Green
ATSAM3N4BA-MUA256QFN64Green
ATSAM3N4AA-AUA256QFP48Green
ATSAM3N4AA-MUA256QFN48Green
ATSAM3N2CA-AUA128QFP100Green
ATSAM3N2CA-CUA128BGA100Green
ATSAM3N2BA-AUA128QFP64Green
ATSAM3N2BA-MUA128QFN64Green
ATSAM3N2AA-AUA128QFP48Green
ATSAM3N2AA-MUA128QFN48Green
ATSAM3N1CA-AUA64QFP100Green
ATSAM3N1CA-CUA64BGA100Green
ATSAM3N1BA-AUA64QFP64Green
ATSAM3N1BA-MUA64QFN64Green
ATSAM3N1AA-AUA64QFP48Green
ATSAM3N1AA-MUA64QFN48Green
(Kbytes)Package (Kbytes)Package Type
Temperature
Operating Range
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
Industrial
-40°C to 85°C
56
SAM3N Summary
11011AS–ATARM–04-Oct-10
Revision History
Doc. RevComments
11011ASFirst issue
SAM3N Summary
Change
Request Ref.
11011AS–ATARM–04-Oct-10
57
HeadquartersInternational
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131
USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Atmel Asia
Unit 1-5 & 16, 19/F
BEA Tower, Millennium City 5
418 Kwun Tong Road
Kwun Tong, Kowloon
Hong Kong
Tel: (852) 2245-6100
Fax: (852) 2722-1369
Product Contact
Web Site
www.atmel.com
www.atmel.com/AT91SAM
Literature Requests
www.atmel.com/literature
Atmel Europe
Le Krebs
8, Rue Jean-Pierre Timbaud
BP 309
78054 Saint-Quentin-enYvelines Cedex
France
Tel: (33) 1-30-60-70-00
Fax: (33) 1-30-60-71-11
Technical Support
AT91SAM Support
Atmel techincal support
Atmel Japan
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Sales Contacts
www.atmel.com/contacts/
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any
intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI-
TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT
OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications
and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided
otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for use
as components in applications intended to support or sustain life.