• Pin-to-pin compatible with SAM3N, SAM3S products (64- and 100- pin versions) and
SAM7S legacy products (64-pin version)
• Memories
• System
• Low Power Modes
• Peripherals
• I/O
• Packages
®
– ARM
– Memory Protection Unit (MPU)
– DSP Instruction Set
–Thumb®-2 instruction set
– Up to 2048 Kbytes embedded Flash with optional dual bank and cache memory
– Up to 160 Kbytes embedded SRAM
– 16 Kbytes ROM with embedded boot loader routines (UART, USB) and IAP routines
– 8-bit Static Memory Controller (SMC): SRAM, PSRAM, NOR and NAND Flash
– Embedded volta ge regulato r for single supply operation
– Power -on-Reset (POR), Br own-out Detector (BOD) and Watc hd og for safe operation
– Quartz or ceramic resonator oscillators: 3 to 20 MHz main power with Failure
– RTC with Gregorian and Persian Calendar mode, waveform generation in low-
– RTC clock calibration circuitry for 32.768 kHz crystal frequency compensation
– 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
– Two PLLs up to 240 MHz for device clock and for USB
– Temperature Sensor
– Up to 22 Peripheral DMA (PDC) Channels
– Sleep and Backup modes, down to 1 µA in Backup mode
– Ultra low-power RTC
– USB 2.0 Device: 12 Mbps, 2668 byte FIFO, up to 8 bidirectional Endpoints. On-Chip
– Up to 2 USARTs with ISO7816, IrDA
– Two 2-wire UARTs
– Up to 2 Tw o Wire Interface (I2C compatible), 1 SPI, 1 Serial Synchronous Controller
– 2 Three-Channel 16-bit Timer/Counter with capture, waveform, compare and PWM
– 4-channel 16-bit PWM with Complementary Output, Fault Input, 12-bit Dead Time
– 32-bit Real-time Timer and RTC with calendar and alarm features
– Up to 16-channel, 1Msps ADC with differential input mode and programmable gain
– One 2-channel 12-bit 1Msp s DAC
– One Analog Comparator with flexible input selection, Selectable input hysteresis
– 32-bit Cyclic Redundancy Check Calculation Unit (CRCCU)
– Write Protected Registers
– Up to 79 I/O lines with external interrupt capability (edge or level sensitivity),
– Three 32-bit Parallel Input/Output Controllers, Peripheral DMA assisted Parallel
– 100-lead LQFP, 14 x 14 mm, pitch 0.5 mm/100-ball TFBGA, 9 x 9 mm, pitch
– 64-lead LQFP, 10 x 10 mm, pitch 0.5 mm/64-lead QFN 9x9 mm, pitch 0.5 mm
Cortex®-M4 with a 2 Kbytes cache running at up to 120 MHz
support
Detection and optional low-power 32.768 kHz for RTC or device clock
power modes
frequency for device startup. In-application trimming access for frequency
adjustment
Transceiver
(I2S), 1 High Speed Multimedia Card Interface (SDIO/SD Card/MMC)
mode. Quadrature Decoder Logic and 2-bit Gray Up/Down Counter for Stepper Motor
Generator Counter for Motor Control
stage and auto calibration
debouncing, glitch filtering and on-die Series Resistor Termination
Capture Mode
0.8 mm/100-ball VFBGA, 7 x 7 mm, pitch 0.65 mm
®
, RS-485, SPI, Manchester and Modem Mode
AT91SAM
ARM-based
Flash MCU
SAM4S Series
Preliminary
Datasheet
11100B–ATARM–31-Jul-12
1.Description
The Atmel SAM4S series is a member of a family of Flash microcontrollers based on the high
performance 32-bit ARM Cortex-M4 RISC processor. It operates at a maximum speed of
120 MHz and features up to 2048 Kbytes of Flash, with optional dual bank implementation and
cache memory, and up to 160 Kbytes of SRAM. The peripheral set includes a Full Speed USB
Device port with embedded transceiver, a High Speed MCI for SDIO/SD/MMC, an External Bus
Interface featuring a Static Memory Controller providing connection to SRAM, PSRAM, NOR
Flash, LCD Module and NAND Flash, 2x USARTs, 2x UARTs, 2x TWIs, 3x SPI, an I2S, as well
as 1 PWM timer, 2x three channel general-purpose 16-bit timers (with stepper motor and
quadrature decoder logic support), an RTC, a 12-bit ADC, a 12-bit DAC and an analog
comparator.
The SAM4S series is ready for capacitive touch thanks to the QTouch
way to implement buttons, wheels and sliders.
The SAM4S device is a medium range general purpose microcontroller with the best ratio in
terms of reduced power consumption, processing power and peripheral set. This enables the
SAM4S to sustain a wide range of applications including consumer, industrial control, and PC
peripherals.
It operates from 1.62V to 3.6V.
The SAM4S series is pin-to-pin compatible with the SAM3N, SAM3S series (64- and 100-pin
versions) and SAM7S legacy series (64-pin versions).
®
library, offering an easy
2
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
1.1Configuration Summary
The SAM4S series devices differ in memory size, package and features. Table 1-1 summarizes
the configurations of the device family.
SCKxUSARTx Serial ClockI/O
TXDxUSARTx Transmit DataI/O
RXDxUSARTx Receive DataInput
RTSxUSARTx Request To SendOutput
CTSxUSARTx Clear To Send Input
DTR1USART1 Data Terminal ReadyI/O
DSR1USART1 Data Set ReadyInput
DCD1USART1 Data Carrier DetectOutput
RI1USART1 Ring IndicatorInput
Note:1. Schmitt Triggers can be disabled through PIO registers.
2. Some PIO lines are shared with System I/Os.
3. Refer to USB Section of the product Electrical Characteristics for information on Pull-down value in USB Mode.
4. See “Typical P owering Schematics” Section for restrictions on voltage range of Analog Cells.
5. TDO pin is set in input mode when the Cortex-M4 Core is not in debug mode. Thus the internal pull-up corresponding to this
PIO line must be enabled to avoid current consumption due to floating input
Analog,
Digital
VDDIO
VDDIO
Reset State:
- USB Mode
- Internal Pull-down
(3)
11100B–ATARM–31-Jul-12
11
4.Package and Pinout
125
26
50
5175
76
100
SAM4S devices are pin-to-pin compatible with SAM3N, SAM3S product s in 64- and 100- pin versions, and AT91SAM7S legacy products in 64-pin versions.
4.1SAM4SD32/SD16/SA16/S16/S8C Package and Pinout
4.1.1100-Lead LQFP Package Outline
Figure 4-1.Orientation of the 100-lead LQFP Package
4.1.2100-ball TFBGA Package Outline
The 100-Ball TFBGA 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 shows the orientation of the 100-ball TFBGA
Package.
Figure 4-2.Orientation of the 100-ball TFBGA Package
TOP VIEW
10
9
8
7
6
5
4
3
2
1
BALL A1
ABCDEFGHJK
12
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
4.1.3100-ball VFBGA Package Outline
Figure 4-3.Orientation of the 100-ball VFBGA Package
Note:The bottom pad of the QFN package must be connected to ground.
PA20/PGMD8/
AD3
32
PA8/XOUT32/
PGMM0
PA7/XIN32/
PGMNVALID
47PA1/PGMEN163PB14/DAC1
48PA0/PGMEN064VDDPLL
18
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
5.Power Considerations
5.1Po wer Supplies
The SAM4S has several types of power supply pins:
• VDDCORE pins: Power the core, the embedded memories and the peripherals. Voltage
ranges from 1.08V to 1.32V.
• VDDIO pins: Powe r the Peripherals I/ O lines (Input/ Output Buffers), USB tra nsceiv er, Bac kup
part, 32 kHz crystal oscillator and oscillator pads. Voltage ranges from 1.62V to 3.6V.
• VDDIN pin: Voltage Regulator Input, ADC, DAC and Analog Comparator Power Supply.
Voltage ranges from 1.62V to 3.6V.
• VDDPLL pin: Powers the PLLA, PLLB, the Fast RC and the 3 to 20 MHz oscillator. Voltage
ranges from 1.08V to 1.32V.
5.2Voltage Regulator
The SAM4S embeds a voltage regulator that is managed by the Supply Controller.
This internal regulator is designed to supply the internal cor e of SAM4S It fe atures two o perat ing
modes:
SAM4S Series [Preliminary]
• In Normal mode, the voltage regulator consumes less than 500 µA static current and draws
80 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 5 µA.
• In Backup mod e, the v oltage r egulator consumes less t han 1µA while its output (VDDOUT) is
driven internally to GND. The default output voltage is 1.20V and the start-up time to reach
Normal mode is less than 300 µs.
For adequate input and output power supply d ecoupling/bypassing , refer to the “ Voltage Regulator” section in the “Electrical Characteristics” section of the datasheet.
5.3Typical Powering Schematics
The SAM4S supports a 1.62V-3.6V single supply mode. The internal regulator input is connected to the source and its output feeds VDDCORE. Figure 5-1 belowshows the power
schematics.
As VDDIN powers the voltage regulator, the ADC, DAC and the analog comparator, when the
user does not want to use the embedded voltage regulator, it can be disabled by software via
the SUPC (note that this is different from Backup mode).
11100B–ATARM–31-Jul-12
19
Figure 5-1.Single Supply
Main Supply
(1.62V-3.6V)
ADC, DAC
Analog Comp.
USB
Transceivers.
VDDIN
Voltage
Regulator
VDDOUT
VDDCORE
VDDIO
VDDPLL
Note:Restrictions
For USB, VDDIO needs to be greater than 3.0V.
For ADC, VDDIN needs to be greater than 2.0V.
For DAC, VDDIN needs to be greater than 2.4V.
Figure 5-2.Core Externally Supplied
Main Supply
(1.62V-3.6V)
Can be the
same supply
ADC, DAC, Analog
Comparator Supply
(2.0V-3.6V)
VDDCORE Supply
(1.08V-1.32V)
VDDIO
VDDIN
VDDOUT
VDDCORE
USB
Transceivers.
ADC, DAC
Analog Comp.
Voltage
Regulator
20
Note:Restrictions
For USB, VDDIO needs to be greater than 3.0V.
For ADC, VDDIN needs to be greater than 2.0V.
For DAC, VDDIN needs to be greater than 2.4V.
Figure 5-3 below provides an example of the powering scheme when using a backu p 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.
SAM4S Series [Preliminary]
VDDPLL
11100B–ATARM–31-Jul-12
Figure 5-3.Backup Battery
ADC, DAC
Analog Comp.
USB
Transceivers.
VDDIN
Voltage
Regulator
3.3V
LDO
Backup
Battery
+
-
ON/OFF
IN
OUT
VDDOUT
Main Supply
VDDCORE
ADC, DAC, Analog
Comparator Supply
(2.0V-3.6V)
VDDIO
VDDPLL
PIOx (Output)
WAKEUPx
External wakeup signal
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.
SAM4S Series [Preliminary]
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 PLLA. The power management controller can be used to adapt
the frequency and to disable the peripheral clocks.
The various low-power modes of the SAM4S are described below:
The purpose of backup mode is to achieve the lowest power consumption possible in a system
which is performing periodic wake-ups to perform tasks but not requiring fast startup time. Total
current consumption is 1 µA typical (VDDIO = 1.8 V to 25°).
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-M4 deep sleep mode with the voltage regula tor disabled.
The SAM4S can be awakened f rom th is m o de through WUP0-15 pins, the su pp ly m o nit or ( SM) ,
the RTT or RTC wake-up event.
Backup mode is entered by writing the Supply Controller Control Register (SUPC_CR) with the
VROFF bit at 1 (A key is needed to write t he VR OF F bi t, plea se ref er t o Supp ly Contr oller SUPC
section of the product datasheet) and with the SLEEPDEEP bit in the Cortex-M4 System Control
Register set to 1. (See the Power management description in The ARM Cortex-M4 Processor
section of the product datasheet).
11100B–ATARM–31-Jul-12
21
5.5.2Wait Mode
Entering Backup mode:
• Set the SLEEPDEEP bit of Cortex_M4 to 1
• Set the VR OFF bit of SUPC_CR to 1
Exit from Backup mode happens if one of the following enable wake up events occurs:
The purpose of the wait mode is to achieve ve ry low power consumption while maintainin g the
whole device in a powered state for a startup time of less than 10 µs. Current Consumption in
Wait mode is typically 32 µA (total current consumption) if the internal voltage 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 by setting WAITMODE bit to 1 (in PMC clock generator Main Oscillator
register) with LPM = 1 (Low Power Mode bit in PMC_FSMR) and with FLPM = 00 or FLPM=01
(Flash Low Power Mode bits in PMC_FSMR).
The Cortex-M4 is able to handle external events or internal events in order to wake-up the core.
This is done by configuring the external lines WUP0-15 as fast startup wake-up pins (refer to
Section 5.7 “Fast Startup”). RTC or RTT Alarm and USB wake-up events can be used to wake
up the CPU.
Entering Wait 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)
• Set the FLPM bitfield in the PMC Fast Startup Mode Register (PMC_FSMR)
• Set Flash Wait State at 0.
• Set the WAITMODE bit = 1 in PMC Main Oscillator Register (CKGR_MOR)
• Wait for Master Clock Ready MCKRDY = 1 in the PMC Status Register (PMC_SR)
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.
Depending on Flash Low Power Mode (FLPM) value, the Flash will enter in three different
modes:
• FLPM[00] in Standby mode
• FLPM[01] in Deep Power Down mode
• FLPM[10] in Idle mode.
Following the Flash mode selection, the consumption in wait mode will decrease. In Deep Power
22
Down mode the recovery time of the Flash in Standby mode will be less than the power up
delay.
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
5.5.3Sleep Mode
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) instructions with LPM = 0 in PMC_FSMR.
The processor can be awakened from an interrupt if WFI instruction of the Cortex-M4 is used.
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 Osc,
RTC, RTT
Backup
Registers,
POR
(Backup
Mode
Backup
Mode
Wait
Mode
w/Flash
in
Standby
mode
Wait
Mode
w/Flash
in Deep
Power
Down
mode
Sleep
Mode
Region)Regulator
ONOFF
ONON
ONON
ONON
Notes:1. The external loads on PIOs are not taken into account in the calculation.
2. Supply Monitor current consumption is not included.
3. 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.
4. Total consumption 1 µA typ to 1.8V on VDDIO to 25°C.
5. 20.4 µA on VDDCORE, 32.2 µA for total current consumption.
6. Depends on MCK frequency.
7. Depends on MCK frequency. In this mode, the core is supplied but some peripherals can be clocked.
Core
Memory
PeripheralsMode Entry
OFF
(Not powered)
Powered
(Not clocked)
Powered
(Not clocked)
Powered
(Not clocked)
VROFF bit = 1
+SLEEPDEEP
bit = 1
WAITMODE bit
=1
+SLEEPDEEP
bit = 0
+LPM bit = 1
FLPM0 bit = 0
FLPM1 bit = 0
WAITMODE bit
=1
+SLEEPDEEP
bit = 0
+LPM bit = 1
FLPM0 bit = 0
FLPM1 bit = 1
WFI
(6)
+SLEEPDEEP
bit = 0
+LPM bit = 0
Potential Wake Up
Sources
WUP0-15 pins
SM alarm
RTC alarm
RTT alarm
Any Event from:
Fast startup through
WUP0-15 pins
RTC alarm
RTT alarm
USB wake-up
Any Event from:
Fast startup through
WUP0-15 pins
RTC alarm
RTT alarm
USB wake-up
Entry mode =WFI
Interrupt Only;
Any Enabled
Interrupt
Core at
Wake Up
Reset
Clocked
back
Clocked
back
Clocked
back
PIO State
while in Low
Power Mode
Previous
state saved
Previous
state saved
Previous
state saved
Previous
state saved
PIO State
at Wake Up
PIOA &
PIOB &
PIOC
Inputs with
pull ups
Unchanged 32.2 µA
Unchanged 27.6 µA< 10µs
Unchanged
Consumption
(1) (2)
1 µA typ
(7)(7)
Wake-up
Time
(4)
300 ms
(5)
< 10 µs
(3)
11100B–ATARM–31-Jul-12
23
5.6Wake-up Sour ces
WKUP15
WKUPEN15
WKUPT15
WKUPEN1
WKUPEN0
Debouncer
SLCK
WKUPDBC
WKUPS
RTCEN
rtc_alarm
SMEN
sm_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 the 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
24
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
5.7Fast Startup
SAM4S Series [Preliminary]
The SAM4S allows the processor to restart in a few microseconds while the processor is in wait
mode or in sleep 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/8/12 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
FSTT0
WKUP0
WKUP1
WKUP15
FSTP0
FSTP1
FSTP15
RTT Alarm
RTC Alarm
USB Alarm
FSTT1
FSTT15
fast_restart
RTTAL
RTCAL
USBAL
11100B–ATARM–31-Jul-12
25
6.Input/Output Lines
The SAM4S has several kinds of input/o utput (I/O) lines such as general pur pose 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 I/O 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 inte rface. F or mo re det ails, refe r to the p roduct “ PIO Contr oller” section.
The input/output buffers of the PIO lines are supplied through VDDIO power supply rail.
The SAM4S embeds high speed pads able to handle up to 7 0 MHz for HSMCI ( MCK/2), 7 0 MHz
for SPI clock lines and 46 MHz on other lines. See the “AC Characteristics” sub-section of the
product Electrical Characteristics. 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 below). It consists of
an internal series resistor termination scheme for impedance matching between the driver output (SAM4S) and the PCB trace impedance preventing signal reflection. The series resistor
helps to reduce IOs 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.
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 in Table 6-1are the SAM4S 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.
SAM4 Driver with
Zout ~ 10 Ohms
Z0 ~ Zout + Rodt
ODT
36 Ohms Typ.
Rodt
Receiver
PCB T race
Z0 ~ 50 Ohms
26
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
Table 6-1.System I/O Configuration Pin List.
SAM4S Series [Preliminary]
SYSTEM_IO
bit number
12ERASEPB12Low Level at startup
10DDMPB1011DDPPB11-
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
(1)
In Matrix User Interface Registers
(Refer to the System I/O
Configuration Register in the “Bus
Matrix” section of the 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 8.
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 gene ral 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-do wn resistor of ab out 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 asynchrono us
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.
11100B–ATARM–31-Jul-12
27
6.3Test Pin
6.4NRST Pin
6.5ERASE Pin
The TST pin is used for JTAG Boundary Scan Manuf acturing Test or Fast Fl ash programming
mode of the SAM4S 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) sectio n. For more on t he manufact uring
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 r eset controller and can be driven low
to provide a reset signal to the external components or asserted low ex ternally 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 t he leng th of t he r eset p ulse and t he re set 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 inte gra tes 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 toleran ce. When the ERASE pin is tied high
during less than 100 ms, it is not taken into account. The pin mu st 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. Refer to Section 10.2 “Peripheral Signal Mul-
tiplexing on I/O Lines” on page 40. Also, if the ERASE pin is used as a standard I/O output,
asserting the pin to low does not erase the Flash.
28
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
7.Product Mapping
Address memory space
Code
1 MByte
bit band
regiion
1 MByte
bit band
regiion
1 MByte
bit band
regiion
0x00000000
SRAM
0x20000000
0x20100000
0x20400000
0x24000000
0x40000000
offset
ID
peripheral
block
Code
Boot Memory
0x00000000
0x00400000
0x00800000
Reserved
0x00C00000
0x1FFFFFFF
Peripherals
HSMCI
18
0x40000000
SSC
22
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
USART0
USART1
14
0x40024000
15
0x40028000
0x4002C000
Reserved
Reserved
0x40030000
UDP
33
0x40034000
ADC
29
0x40038000
DACC
30
0x4003C000
ACC
34
0x40040000
CRCCU
35
0x40044000
0x40048000
System Controller
0x400E0000
0x400E2600
0x40100000
0x40200000
0x40400000
0x60000000
External RAM
SMC Chip Select 0
0x60000000
SMC Chip Select 1
Undefined
32 MBytes
bit band alias
0x61000000
SMC Chip Select 2
0x62000000
SMC Chip Select 3
0x63000000
0x64000000
0x9FFFFFFF
System Controller
SMC
10
0x400E0000
MATRIX
0x400E0200
PMC
5
0x400E0400
UART0
UART1
8
0x400E0600
CHIPID
0x400E0740
9
0x400E0800
EFC
6
0x400E0A00
0x400E0C00
PIOA
11
0x400E0E00
PIOB
12
0x400E1000
PIOC
13
0x400E1200
RSTC
0x400E1400
1
SUPC
+0x10
RTT
+0x30
3
WDT
+0x50
4
RTC
+0x60
2
GPBR
+0x90
0x400E1600
0x4007FFFF
Internal Flash
Internal ROM
Reserved
Peripherals
External SRAM
0x60000000
0xA0000000
System
0xE0000000
0xFFFFFFFF
Reserved
Reserved
EFC1
Reserved
Reserved
Reserved
Reserved
32 MBytes
bit band alias
Reserved
Figure 7-1.SAM4S Product Mapping
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
29
8.Memories
8.1Embedded Memories
8.1.1Internal SRAM
The SAM4SD32 device (2x1024 Kbytes) embeds a total of 160-Kbytes high-speed SRAM.
The SAM4SD16 device (2x512KBytes)embeds a total of 160-Kbytes high-speed SRAM.
The SAM4SA16 device (1024 Kbytes) embeds a total of 160 -Kb yt es hig h -spe ed SRAM.
The SAM4S16 device (1024 Kbytes) embeds a total of 128-Kbytes high-speed SRAM.
The SAM4S8 device (512 Kbytes) embeds a total of 128-Kbytes high-speed SRAM.
The SRAM is accessible over System Cortex-M4 bus at address 0x2000 0000.
The SRAM is in the bit band region. The bit band alias region is from 0x2200 0000 to
0x23FF FFFF.
8.1.2Internal ROM
The SAM4S embeds an Internal ROM, which contains the SAM Boot Assistant (SAM-BA
Application Programming routines (IAP) and Fast Flash Programming Interface (FFPI).
At any time, the ROM is mapped at address 0x0080 0000.
8.1.3Embedded Flash
8.1.3.1Flash Overview
The memory is organized in sectors. Each sector has a size of 64 KBytes. The first sector of 64
KBytes is divided into 3 smaller sectors.
The three smaller sectors are organized to consist of 2 sectors of 8 KBytes and 1 sector of 48
KBytes. Refer to Figure 8-1, "Global Flash Organization" below.
®
), In
30
SAM4S Series [Preliminary]
11100B–ATARM–31-Jul-12
Loading...
+ 1133 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.