SAM9X35 Atmel Corporation, SAM9X35 Datasheet

no-image

SAM9X35

Manufacturer Part Number
SAM9X35
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of SAM9X35

Flash (kbytes)
0 Kbytes
Pin Count
217
Max. Operating Frequency
400 MHz
Cpu
ARM926
Hardware Qtouch Acquisition
No
Max I/o Pins
105
Ext Interrupts
105
Usb Transceiver
3
Usb Speed
Hi-Speed
Usb Interface
Host, Device
Spi
2
Twi (i2c)
3
Uart
7
Can
2
Lin
4
Ssc
1
Ethernet
1
Sd / Emmc
2
Graphic Lcd
Yes
Video Decoder
No
Camera Interface
No
Adc Channels
12
Adc Resolution (bits)
10
Adc Speed (ksps)
440
Resistive Touch Screen
Yes
Temp. Sensor
No
Crypto Engine
No
Sram (kbytes)
32
Self Program Memory
NO
External Bus Interface
1
Dram Memory
DDR/LPDDR, SDRAM/LPSDR
Nand Interface
Yes
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
1.8/3.3
Operating Voltage (vcc)
0.9 to 1.1
Fpu
No
Mpu / Mmu
No/Yes
Timers
6
Output Compare Channels
6
Input Capture Channels
6
Pwm Channels
4
32khz Rtc
Yes
Calibrated Rc Oscillator
No
Features
Core
Memories
System running at up to 133 MHz
Low Power Mode
Peripherals
I/O
Package
– ARM926EJ-S™ ARM
– 16 Kbytes Data Cache, 16 Kbytes Instruction Cache, Memory Management Unit
– One 64-Kbyte internal ROM embedding bootstrap routine: Boot on NAND Flash,
– One 32-Kbyte internal SRAM, single-cycle access at system speed
– High Bandwidth Multi-port DDR2 Controller
– 32-bit External Bus Interface supporting 8-bank DDR2/LPDDR, SDR/LPSDR, Static
– MLC/SLC NAND Controller, with up to 24-bit Programmable Multi-bit Error
– Power-on Reset Cells, Reset Controller, Shut Down Controller, Periodic Interval
– Boot Mode Select Option, Remap Command
– Internal Low Power 32 kHz RC and Fast 12 MHz RC Oscillators
– Selectable 32768 Hz Low-power Oscillator and 12 MHz Oscillator
– One PLL for the system and one PLL at 480 MHz optimized for USB High Speed
– Twelve 32-bit-layer AHB Bus Matrix for large Bandwidth transfers
– Dual Peripheral Bridge with dedicated programmable clock for best performance
– Two dual port 8-channel DMA Controllers
– Advanced Interrupt Controller and Debug Unit
– Two Programmable External Clock Signals
– Shut Down Controller with four 32-bit Battery Backup Registers
– Clock Generator and Power Management Controller
– Very Slow Clock Operating Mode, Software Programmable Power Optimization
– LCD Controller with overlay, alpha-blending, rotation, scaling and color conversion
– USB Device High Speed, USB Host High Speed and USB Host Full Speed with
– One 10/100 Mbps Ethernet MAC Controller
– Two High Speed Memory Card Hosts
– Two CAN Controllers
– Two Master/Slave Serial Peripheral Interface
– Two Three-channel 32-bit Timer/Counters
– One Synchronous Serial Controller
– One Four-channel 16-bit PWM Controller
– Three Two-wire Interfaces
– Three USARTs, two UARTs
– One 12-channel 10-bit Touch-Screen Analog-to-Digital Converter
– Soft Modem
– Four 32-bit Parallel Input/Output Controllers
– 105 Programmable I/O Lines Multiplexed with up to Three Peripheral I/Os
– Input Change Interrupt Capability on Each I/O Line, optional Schmitt trigger input
– Individually Programmable Open-drain, Pull-up and pull-down resistor,
– 217-ball BGA, pitch 0.8 mm
SDCard, DataFlash
Memories
Correcting Code (PMECC)
Timer, Watchdog Timer and Real Time Clock
Capabilities
dedicated On-Chip Transceiver
Synchronous Output
®
®
or serial DataFlash. Programmable order.
Thumb
®
Processor running at up to 400 MHz @ 1.0V +/- 10%
AT91SAM
ARM-based
Embedded MPU
SAM9X35
11055B–ATARM–22-Sep-11

Related parts for SAM9X35

SAM9X35 Summary of contents

Page 1

... Input Change Interrupt Capability on Each I/O Line, optional Schmitt trigger input – Individually Programmable Open-drain, Pull-up and pull-down resistor, Synchronous Output • Package – 217-ball BGA, pitch 0.8 mm ® Processor running 400 MHz @ 1.0V +/- 10% AT91SAM ARM-based Embedded MPU SAM9X35 11055B–ATARM–22-Sep-11 ...

Page 2

... The SAM9X35 features a graphics LCD controller with 4-layer overlay and 2D acceleration (pic- ture-in-picture, alpha-blending, scaling, rotation, color conversion), and a 10-bit ADC that supports 4- or 5-wire resistive touchscreen panels. Networking/connectivity peripherals include two 2 ...

Page 3

... Block Diagram Figure 2-1. SAM9X35 Block Diagram 11055B–ATARM–22-Sep-11 PIO PIO SAM9X35 3 ...

Page 4

... Fast Interrupt Input PA0-PA31 Parallel IO Controller A PB0-PB18 Parallel IO Controller B PC0-PC31 Parallel IO Controller C PD0-PD21 Parallel IO Controller D SAM9X35 4 gives details on the signal names classified by peripheral. Clocks, Oscillators and PLLs Shutdown, Wakeup Logic ICE and JTAG Reset/Test Debug Unit - DBGU Advanced Interrupt Controller - AIC ...

Page 5

... Multimedia Card 0 Slot A Data MCI1_DA0-MCI1_DA3 Multimedia Card 1 Slot A Data 11055B–ATARM–22-Sep-11 External Bus Interface - EBI Static Memory Controller - SMC NAND Flash Support DDR2/SDRAM/LPDDR Controller High Speed MultiMedia Card Interface - HSMCI0-1 SAM9X35 Type Active Level I/O I/O Output Input Low Output Low ...

Page 6

... SPI Serial Clock SPIx_NPCS0 SPI Peripheral Chip Select 0 SPIx_NPCS1-SPIx_NPCS3 SPI Peripheral Chip Select TWDx Two-wire Serial Data TWCKx Two-wire Serial Clock SAM9X35 6 Universal Asynchronous Receiver Transmitter - UARTx Synchronous Serial Controller - SSC Timer/Counter - TCx x=0..5 Serial Peripheral Interface - SPIx Two-Wire Interface -TWIx Type Active Level ...

Page 7

... Pulse Width Modulation Controller- PWMC USB Host High Speed Port - UHPHS USB Device High Speed Port - UDPHS RMII Ethernet 10/100 - EMAC LCD Controller - LCDC Analog-to-Digital Converter - ADC SAM9X35 Type Active Level Output Analog Analog Analog Analog ...

Page 8

... CANRXx CAN input CANTXx CAN output DIBN Soft Modem Signal DIBP Soft Modem Signal 4. Package and Pinout The SAM9X35 is available in 217-ball BGA package. 4.1 Overview of the 217-ball BGA Package Figure 4-1 Figure 4-1. SAM9X35 8 CAN Controller - CANx Soft Modem - SMD shows the orientation of the 217-ball BGA Package. ...

Page 9

... EBI_CLK RSTJTAG SYSC VBG 11055B–ATARM–22-Sep-11 SAM9X35 I/O Type Description Voltage Range Analog 1.65-3.6V 1.65-3.6V 1.65-3.6V 3.0-3.6V I 1.65-1.95V, 3.0- 3.6V 1.65-1.95V, 3.0- 3.6V 1.65-1.95V, 3.0- 3.6V 3.0-3.6V 1.65-3.6V 0.9-1.1V I 3.0-3.6V I/O 3.0-3.6V I/O 1.65-3.6V I/O 3.0-3.6V I/O SAM9X35 I/O Type Assignment and Frequency I/O Frequency Charge Load Output (MHz) (pF) Current 16mA 40mA (peak) 50 (3.3V) 133 30 (1.8V) 50 (3.3V (1.8V) 133 0.25 10 0.25 10 ...

Page 10

... Indicates whether the signal is input or output state. • “PU”/”PD” Indicates whether Pull-Up, Pull-Down or nothing is enabled. • “ST” Indicates if Schmitt Trigger is enabled. Note: SAM9X35 10 SAM9X35 I/O Type Assignment and Frequency (Continued) I/O Frequency Charge Load (MHz) (pF 480 10 ...

Page 11

... TWD0 I/O TWCK0 PB0 I/O ERX0 PB1 I/O ERX1 PB2 I/O ERXER PB3 I/O ERXDV PB4 I/O ETXCK PB5 I/O EMDIO PB6 I/O AD7 I EMDC PB7 I/O AD8 I ETXEN SAM9X35 PIO Peripheral B PIO Peripheral C Dir Signal Dir Signal O SPI1_NPCS1 O I SPI0_NPCS2 O O MCI1_DA1 I/O ETX0 I MCI1_DA2 I/O ETX1 I/O MCI1_DA3 I/O O CANTX1 O I CANRX1 I O ...

Page 12

... GPIO PC24 M2 VDDIOP1 GPIO PC25 P2 VDDIOP1 GPIO PC26 M1 VDDIOP1 GPIO PC27 K4 VDDIOP1 GPIO PC28 N1 VDDIOP1 GPIO_CLK PC29 R2 VDDIOP1 GPIO_CLK2 PC30 N2 VDDIOP1 GPIO PC31 SAM9X35 12 Primary Alternate PIO Peripheral A Dir Signal Dir Signal I/O AD9 I I/O AD10 I ETX0 I/O AD11 I ETX1 I/O AD0 II I/O AD1 II I/O AD2 II I/O AD3 ...

Page 13

... D23 I/O D24 I/O D25 I/O D26 I/O D27 I/O D28 I/O D29 I/O D30 I/O D31 SAM9X35 PIO Peripheral B PIO Peripheral C Dir Signal Dir Signal A20 O O A23 O O A24 O O A25 ...

Page 14

... A16 B17 VDDIOM EBI_O A17 E15 VDDIOM EBI_O A18 E14 VDDIOM EBI_O A19 B9 VDDIOM EBI_O NCS0 B8 VDDIOM EBI_O NCS1 D9 VDDIOM EBI_O NRD C9 VDDIOM EBI_O NWR0 C7 VDDIOM EBI_O NWR1 SAM9X35 14 Primary Alternate PIO Peripheral A Dir Signal Dir Signal I I I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O O NBS0 O NBS2/DQM NWR2 ...

Page 15

... I/O I/O I BMS I I TST I TCK I TDI I TDO O TMS XIN I O SAM9X35 PIO Peripheral B PIO Peripheral C Dir Signal Dir Signal Reset State Signal, Dir, PU, Dir PD ...

Page 16

... Power Considerations 5.1 Power Supplies The SAM9X35 has several types of power supply pins. Table 5-1. SAM9X35 Power Supplies Name Voltage Range, nominal VDDCORE 0.9-1.1V, 1.0V 1.65-1.95V, 1.8V VDDIOM 3.0-3.6V, 3.3V 1.65-1.95V, 1.8V VDDNF 3.0-3.6V, 3.3V VDDIOP0 1.65-3.6V VDDIOP1 1.65-3.6V VDDBU 1.65-3.6V VDDUTMIC 0.9-1.1V, 1.0V VDDUTMII 3.0-3.6V, 3.3V VDDPLLA 0.9-1.1V, 1.0V VDDOSC 1.65-3.6V VDDANA 3.0-3.6V, 3.3V Note: 1. Refer to Table 4-2 for more details. SAM9X35 16 Powers ARM core, internal memories, internal peripherals and part of the system controller ...

Page 17

... Memories Figure 6-1. SAM9X35 Memory Mapping Address Memory Space 0x0000 0000 Internal Memories 0x0FFF FFFF 0x1000 0000 EBI Chip Select 0 0x1FFF FFFF 0x2000 0000 EBI Chip Select 1 DDR2/LPDDR SDR/LPSDR 0x2FFF FFFF 0x3000 0000 EBI Chip Select 2 0x3FFF FFFF 0x4000 0000 EBI Chip Select 3 ...

Page 18

... Embedded Memories 6.2.1 Internal SRAM The SAM9X35 embeds a total of 32 Kbytes of high-speed SRAM. After reset and until the Remap Command is performed, the SRAM is only accessible at address 0x0030 0000. After Remap, the SRAM also becomes available at address 0x0. 6.2.2 Internal ROM The SAM9X35 embeds an Internal ROM, which contains the SAM-BA program ...

Page 19

... SDRAM Power-up Initialization by Software • CAS Latency Supported • Auto Precharge Command Not Used • SDR-SDRAM with 16-bit Datapath and Eight Columns Not Supported – Clock Frequency Change in Precharge Power-down Mode Not Supported 11055B–ATARM–22-Sep-11 Average Latency of Transactions) SAM9X35 19 ...

Page 20

... System Controller can be addressed from a single pointer by using the stan- dard ARM instruction set, as the Load/Store instruction have an indexing mode of ±4 KBytes. Figure 7-1 on page 21 Figure 6-1 on page 17 peripherals. SAM9X35 20 shows the System Controller block diagram. shows the mapping of the User Interface of the System Controller 11055B–ATARM–22-Sep-11 ...

Page 21

... Figure 7-1. SAM9X35 System Controller Block Diagram periph_irq[2..30] pit_irq wdt_irq dbgu_irq pmc_irq rstc_irq periph_nreset periph_nreset proc_nreset NRST VDDCORE POR VDDBU VDDBU POR backup_nreset SHDN WKUP XIN32 SLOW CLOCK XOUT32 OSC XIN 12MHz MAIN OSC XOUT UPLL PLLA periph_nreset periph_nreset periph_clk[2..3] PA0-PA31 PB0-PB18 ...

Page 22

... Chip ID: 0x819A_05A1 • Chip ID Extension: 2 • JTAG ID: 0x05B2_F03F • ARM926 TAP ID: 0x0792_603F 7.2 Backup Section The SAM9X35 features a Backup Section that embeds: • RC Oscillator • Slow Clock Oscillator • Real Time Counter (RTC) • Shutdown Controller • 4 Backup Registers • Slow Clock Control Register (SCKCR) • ...

Page 23

... Figure 6-1, the Peripherals are mapped in the upper 256 Mbytes of the address defines the Peripheral Identifiers of the SAM9X35. A peripheral identifier is required Peripheral Identifiers Instance Name Instance Description AIC Advanced Interrupt Controller SYS System Controller Interrupt ...

Page 24

... Peripheral Signal Multiplexing on I/O Lines The SAM9X35 features 4 PIO Controllers, PIOA, PIOB, PIOC and PIOD, which multiplex the I/O lines of the peripheral set. Each PIO Controller controls 32 lines, 19 lines, 32 lines and 22 lines respectively for PIOA, PIOB, PIOC and PIOD. Each line can be assigned to one of three peripheral functions ...

Page 25

... Based on ARM Architecture v5TEJ with Jazelle Technology ® High-performance 32-bit Instruction Set ® High Code Density 16-bit Instruction Set ® 8-bit Instruction Set SAM9X35 SAM9X35 ™ family of general-purpose microproces ...

Page 26

... Separate AMBA AHB Buses for Both the 32-bit Data Interface and the 32-bit • Bus Interface Unit – Arbitrates and Schedules AHB Requests – Enables Multi-layer AHB to be Implemented – Increases Overall Bus Bandwidth – Makes System Architecture Mode Flexible SAM9X35 SAM9X35 26 26 Instructions Interface 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 27

... Interface ARM9EJ-S Processor Core Read Data Data Instruction Address MMU Instruction Data TLB TLB Data Address AHB Interface and Write Buffer AMBA AHB SAM9X35 SAM9X35 ETM9 Trace Port Interface Instruction Fetches Address ITCM Interface Instruction TCM Instruction Address Instruction Cache 27 27 ...

Page 28

... ARM instructions. The hardware/software split is invisible to the programmer, invisible to the application and invisible to the operating system. All existing ARM registers are re-used in Jazelle state and all registers then have particular functions in this mode. SAM9X35 SAM9X35 28 28 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 29

... R10 R10 R11 R11 Interrupt Mode Fast Interrupt Mode R10 R10 R11 R11 SAM9X35 SAM9X35 R8_FIQ R9_FIQ R10_FIQ R11_FIQ 29 29 ...

Page 30

... The Thumb state register set is a subset of the ARM state set. The programmer has direct access to: • Eight general-purpose registers r0-r7 • Stack pointer, SP • Link register, LR (ARM r14) • PC • CPSR SAM9X35 SAM9X35 30 30 Abort Mode Undefined Mode R12 R12 R13_ABORT ...

Page 31

... Reserved Jazelle state bit Reserved Sticky Overflow Overflow Carry/Borrow/Extend Zero Negative/Less than shows the status register format, where: SAM9X35 SAM9X35 0 Mode Mode bits Thumb state bit FIQ disable IRQ disable 31 31 ...

Page 32

... Execute stage in the pipeline. If the instruction is not executed, for example because a branch occurs while the pipeline, the abort does not take place. SAM9X35 SAM9X35 32 32 into LR (current PC(r15 depending on the exception). ...

Page 33

... Accumulate Move to Status Register Branch Branch and Exchange Load Word Load Signed Halfword Load Signed Byte Load Half Word Load Byte SAM9X35 SAM9X35 Mnemonic Operation MVN Move Not ADC Add with Carry SBC Subtract with Carry RSC Reverse Subtract with Carry ...

Page 34

... The Thumb instruction set is a re-encoded subset of the ARM instruction set. The Thumb instruction set is divided into: • Branch instructions • Data processing instructions • Load and Store instructions SAM9X35 SAM9X35 34 34 ARM Instruction Mnemonic List (Continued) Operation Load Register Byte with ...

Page 35

... Multiply Branch Branch and Exchange Load Word Load Half Word Load Byte Load Signed Halfword Load Multiple Push Register to stack Conditional Branch SAM9X35 SAM9X35 Mnemonic Operation MVN Move Not ADC Add with Carry SBC Subtract with Carry CMN Compare Negated NEG ...

Page 36

... Table 9-5. Register Notes: SAM9X35 SAM9X35 36 36 CP15 Registers Name ( Code (1) 0 Cache type (1) 0 TCM status 1 Control 2 Translation Table Base 3 Domain Access Control 4 Reserved (1) 5 Data fault Status (1) 5 Instruction fault status 6 Fault Address 7 Cache Operations 8 TLB operations (2) 9 cache lockdown ...

Page 37

... Symbian OS, WindowsCE, and Linux. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 MCR/MRC{cond} p15, opcode_1, Rd, CRn, CRm, opcode_2 SAM9X35 SAM9X35 CRn CRm ...

Page 38

... When the TLB contains an entry for the MVA (Modi- fied Virtual Address), the access control logic determines if the access is permitted and outputs the appropriate physical address corresponding to the MVA. If access is not permitted, the MMU signals the CPU core to abort. SAM9X35 SAM9X35 38 38 Mapping Details Mapping Size ...

Page 39

... Instead of loading the whole line (eight words), the cache loads the critical word first, so the processor can reach it quickly, and then the remaining words, no matter where the word is located in the line. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 SAM9X35 SAM9X35 39 39 ...

Page 40

... The Write Buffer can hold words of data and four separate addresses. DCache and Write Buffer operations are closely connected as their configuration is set in each section by the page descriptor in the MMU translation table. SAM9X35 SAM9X35 40 40 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 41

... Any ARM9EJ-S core request that is not words in size is split into packets of these sizes. Note that the Atmel bus is AHB-Lite protocol compliant, hence it does not support split and retry requests. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 SAM9X35 SAM9X35 41 41 ...

Page 42

... The ARM926EJ-S BIU performs address alignment checking and aligns AHB addresses to the necessary boundary. 16-bit accesses are aligned to halfword boundaries, and 32-bit accesses are aligned to word boundaries. SAM9X35 SAM9X35 42 42 Single transfer of word, half word, or byte: • data write (NCNB, NCB, WT that has missed in DCache) • ...

Page 43

... Debug and Test 10.1 Description The SAM9X35 features a number of complementary debug and test capabilities. A common JTAG/ICE (In-Circuit Emulator) port is used for standard debugging functions, such as down- loading code and single-stepping through programs. The Debug Unit provides a two-pin UART that can be used to upload an application into internal SRAM. It manages the interrupt handling of the internal COMMTX and COMMRX signals that trace the activity of the Debug Communica- tion Channel ...

Page 44

... Block Diagram Figure 10-1. Debug and Test Block Diagram TAP: Test Access Port SAM9X35 SAM9X35 44 44 ICE/JTAG Boundary TAP Port ARM9EJ-S ICE-RT ARM926EJ-S DMA DBGU TMS TCK TDI NTRST JTAGSEL TDO RTCK POR Reset and TST Test DTXD DRXD 11055B–ATARM–22-Sep-11 ...

Page 45

... Figure 10-2. Application Debug and Trace Environment Example 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 shows a complete debug environment example. The ICE/JTAG interface is used for ICE/JTAG Interface ICE/JTAG Connector RS232 SAM9 Connector SAM9-based Application Board SAM9X35 SAM9X35 Host Debugger Terminal 45 45 ...

Page 46

... In this example, the “board in test” is designed using a number of JTAG-compliant devices. These devices can be connected to form a single scan chain. Figure 10-3. Application Test Environment Example SAM9X35 SAM9X35 46 46 shows a test environment example. Test vectors are sent and interpreted by the tes- Test Adaptor ...

Page 47

... ICE and JTAG Test Reset Signal Test Clock Test Data In Test Data Out Test Mode Select Returned Test Clock JTAG Selection Debug Unit Debug Receive Data Debug Transmit Data SAM9X35 SAM9X35 Type Active Level Input/Output Low Input High Input Low Input Input Output ...

Page 48

... TCK clock and take not care about the given ratio between the ICE Interface clock and system clock equal to 1/6th. This signal is only available in JTAG ICE Mode and not in boundary scan mode. SAM9X35 SAM9X35 48 48 ™ is supported via the ICE/JTAG port connected to a 11055B– ...

Page 49

... ID that identifies the processor to the ICE system. This is not IEEE 1149.1 JTAG-compliant not possible to switch directly between JTAG and ICE operations. A chip reset must be per- formed after JTAGSEL is changed. A Boundary-scan Descriptor Language (BSDL) file is provided to set up test. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 SAM9X35 SAM9X35 49 49 ...

Page 50

... VERSION[31:28]: Product Version Number Set to 0x0. • PART NUMBER[27:12]: Product Part Number Product part Number is 0x5B2F • MANUFACTURER IDENTITY[11:1] Set to 0x01F. Bit[0] required by IEEE Std. 1149.1. Set to 0x1. JTAG ID Code value is 0x05B2_F03F. SAM9X35 SAM9X35 PART NUMBER ...

Page 51

... XTal or external clock frequency detection • attempt to retrieve a valid code from external non-volatile memories (NVM) • execution of a monitor called SAM-BA Monitor, in case no valid application has been found on any NVM 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 (Section 11.1 “ROM Code”) SAM9X35 SAM9X35 51 51 ...

Page 52

... MHz external clock or crystal frequency running at 12 MHz is found, then the PLLA is configured to allow communication on the USB link for the SAM-BA Monitor; else the Main Clock is switched to the internal 12 MHz Fast RC, but USB will not be activated. SAM9X35 SAM9X35 52 52 Figure Chip Setup ...

Page 53

... BSCR Value. Boot Sequence Register Values NAND SPI0 NPCS0 SDCard Flash SAM9X35 SAM9X35 Figure 11-2 “NVM Bootloader SAM-BA SPI0 NPCS1 TWI EEPROM Monitor ...

Page 54

... SPI0 CS0 Flash Boot No SD Card Boot No NAND Flash Boot No SPI0 CS1 Flash Boot No TWI EEPROM Boot No SAM-BA Monitor SAM9X35 SAM9X35 Copy from SPI Flash to SRAM Y es Copy from SD Card to SRAM Y es Copy from NAND Flash to SRAM Y es Copy from ...

Page 55

... Copy the valid code from external NVM to internal SRAM. Restore the reset values for the peripherals. Perform the REMAP and set the jump to the downloaded application End SAM9X35 SAM9X35 Restore the reset values for the peripherals and Jump to next boot solution 55 55 ...

Page 56

... Figure 11-6. B Opcode Unconditional instruction: 0xE for bits Load PC with PC relative addressing instruction: – 0xF – I==0 (12-bit immediate value) – P==1 (pre-indexed) – U offset added (U==1) or subtracted (U==0) – W==1 SAM9X35 SAM9X35 56 56 0x0000_0000 Internal ROM 0x0010_0000 Internal ROM 0x0030_0000 Internal SRAM 28 27 ...

Page 57

... ONFI parameters for ONFI compliant memories. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Size of the code to download in bytes ea000006 B 0x20 eafffffe B 0x04 ea00002f B _main eafffffe B 0x0c eafffffe B 0x10 <- Code size = 4660 bytes 00001234 B 0x14 eafffffe B 0x18 SAM9X35 SAM9X35 ...

Page 58

... Figure 11-8. Boot NAND Flash Download SAM9X35 SAM9X35 58 58 Start Initialize NAND Flash interface Send Reset command No First page contains valid header Yes Read NAND Flash and PMECC parameters Read NAND Flash and PMECC parameters from the header Copy the valid code from external NVM to internal SRAM ...

Page 59

... If the header is valid, the Boot Program will continue with the detection of valid code. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- eccOffset SAM9X35 SAM9X35 26 25 eccOffset 18 17 sectorSize 10 9 spareSize 2 1 nbSectorPerPage usePmecc ...

Page 60

... PMECC base address, pPMERRLOC: pointer to the PMERRLOC base address, PMECC_desc: pointer to the PMECC descriptor, PMECC_status: the status returned by the read of PMECCISR register; SAM9X35 SAM9X35 60 60 Booting on 16-bit NAND Flash is not possible, only 8-bit NAND Flash memories are supported. AT91PS_PMERRLOC pPMERRLOC, ...

Page 61

... TT_MAX + 1]; /* polynom order */ short lmu[TT_MAX + 1]; SAM9X35 SAM9X35 61 61 ...

Page 62

... SPI DataFlash. It uses only one valid code detection: analysis of ARM exception vectors. The SPI Flash read is done by means of a Continuous Read command from address 0x0. This command is 0xE8 for DataFlash and 0x0B for Serial Flash devices. SAM9X35 SAM9X35 62 62 0x0010_0000 ROM Code ...

Page 63

... Mbits 4 Mbits 8 Mbits 16 Mbits 32 Mbits 64 Mbits 2 C-compatible TWI EEPROM memories using 7-bit device contains a list of pins that are driven during the boot program execution. These pins SAM9X35 SAM9X35 Page Size (bytes) Number of Pages 264 512 264 1024 264 2048 264 4096 ...

Page 64

... Check if USB Device enumeration has occurred – Check if characters have been received on the DBGU Once the communication interface is identified, the application runs in an infinite loop waiting for different commands as listed in SAM9X35 SAM9X35 64 64 PIO Driven during Boot Program Execution Peripheral ...

Page 65

... Address,# write a word Address, Value# read a word Address,# send a file Address,# receive a file Address, NbOfBytes# go Address# display version No argument SAM9X35 SAM9X35 No No Character(s) received on DBGU ? Yes Run monitor Wait for command on the DBGU link Example N# T# O200001,CA# o200001,# H200002,CAFE# ...

Page 66

... CRC16 Figure 11-11 SAM9X35 SAM9X35 66 66 There is a time-out on this command which is reached when the prompt ‘>’ appears before the end of the command execution. ...

Page 67

... Windows 98SE to Windows XP Handled Standard Requests Definition Returns the current device configuration value. Sets the device address for all future device access. Sets the device configuration. Returns the current device configuration value. SAM9X35 SAM9X35 Device ® . The CDC document, available ...

Page 68

... BA Boot commands are sent by the host through endpoint 1. If required, the message is split by the host into several data payloads by the host driver. If the command requires a response, the host can send IN transactions to pick up the response. SAM9X35 SAM9X35 68 68 Handled Standard Requests (Continued) Definition Returns status for the specified recipient ...

Page 69

... Embedded Characteristics • VDDBU powered • Product-dependent order 12.3 Boot Sequence Controller Registers (BSC) User Interface Table 12-1. Register Mapping Offset Register 0x0 Boot Sequence Configuration Register 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Name BSC_CR SAM9X35 SAM9X35 Access Reset Read-write – ...

Page 70

... Factory Value:0x0000_0000 • BOOTx: Boot media sequence Is defined in the product-dependent ROM code. • BOOTKEY 0xB5 (VALID): valid boot key To avoid spurious writing, this key is necessary for write accesses. SAM9X35 SAM9X35 BOOTKEY BOOT BOOT ...

Page 71

... Permits Redirecting any Normal Interrupt Source to the Fast Interrupt of the • General Interrupt Mask – Provides Processor Synchronization on Events Without Triggering an Interrupt • Write Protected Registers 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 External Interrupts External Sources Enabled Processor SAM9X35 SAM9X35 ® Processor 71 71 ...

Page 72

... Block Diagram Figure 13-1. Block Diagram 13.4 Application Block Diagram Figure 13-2. Description of the Application Block 13.5 AIC Detailed Block Diagram Figure 13-3. AIC Detailed Block Diagram SAM9X35 SAM9X35 72 72 FIQ IRQ0-IRQn Embedded PeripheralEE Embedded Peripheral Embedded Peripheral Standalone OS Drivers Applications General OS Interrupt Handler Advanced Interrupt Controller ...

Page 73

... FIQ, SYS, and PID2 to PID31. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 I/O Line Description Pin Description Fast Interrupt Interrupt 0 - Interrupt n I/O Lines Signal AIC FIQ AIC IRQ SAM9X35 SAM9X35 Type Input Input I/O Line Peripheral PC31 A PB18 ...

Page 74

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

Page 75

... AIC_SMRI (SRCTYPE) Level/ AIC_IPR Edge Edge Detector Set Clear AIC_SMRi SRCTYPE Level/ AIC_IPR Edge Pos./Neg. Edge Detector Clear AIC_IMR Fast Interrupt Controller or Priority Controller AIC_IECR FF AIC_IDCR AIC_IMR Fast Interrupt Controller or Priority Controller AIC_IECR FF AIC_IDCR SAM9X35 SAM9X35 75 75 ...

Page 76

... For the standard interrupt, resynchronization times are given assuming there is no higher priority in progress. The PIO Controller multiplexing has no effect on the interrupt latencies of the external interrupt sources. Figure 13-6. Figure 13-7. SAM9X35 SAM9X35 76 76 External Interrupt Edge Triggered Source MCK IRQ or FIQ (Positive Edge) ...

Page 77

... Internal Interrupt Edge Triggered Source MCK nIRQ Maximum IRQ Latency = 4.5 Cycles Peripheral Interrupt Becomes Active Internal Interrupt Level Sensitive Source MCK nIRQ Maximum IRQ Latency = 3.5 Cycles Peripheral Interrupt Becomes Active SAM9X35 SAM9X35 77 77 ...

Page 78

... This section gives an overview of the fast interrupt handling sequence when using the AIC assumed that the programmer understands the architecture of the ARM processor, and espe- cially the processor interrupt modes and the associated status bits assumed that: SAM9X35 SAM9X35 78 78 PC,[PC,# -&F20] 11055B–ATARM–22-Sep-11 ...

Page 79

... If the interrupt is programmed to be level sensitive, the source of the interrupt must be cleared dur- ing this phase. The “I” bit in SPSR is significant set, it indicates that the ARM core was on the verge of masking an interrupt when the mask instruction was interrupted. Hence, when SPSR is restored, the mask instruction is completed (interrupt is masked). SAM9X35 SAM9X35 79 79 ...

Page 80

... The ARM core enters FIQ mode. 3. When the instruction loaded at address 0x1C is executed, the program counter is loaded with the value read in AIC_FVR. Reading the AIC_FVR has effect of automati- SAM9X35 SAM9X35 80 80 PC,[PC,# -&F20] 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 81

... The “F” bit in SPSR is significant set, it indicates that the ARM core was just about to mask FIQ interrupts when the mask instruction was interrupted. Hence when the SPSR is restored, the interrupted instruction is completed (FIQ is masked). SAM9X35 SAM9X35 81 81 ...

Page 82

... AIC_ISR. Extra AIC_IVR reads perform the same operations. However recommended to not stop the processor between the read and the write of AIC_IVR of the interrupt service routine to make sure the debugger does not modify the AIC context. SAM9X35 SAM9X35 82 82 AIC_IPR Input Stage ...

Page 83

... Idle Mode. This function facilitates synchronizing the processor on a next event and, as soon as the event occurs, performs subsequent operations without having to handle an interrupt strongly recommended to use this mask with caution. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 SAM9X35 SAM9X35 83 83 ...

Page 84

... Source Vector Register” on page 87 • “AIC Spurious Interrupt Vector Register” on page 98 • “AIC Debug Control Register” on page 99 SAM9X35 SAM9X35 84 84 (AIC_WPSR) is set and the WPVSRC field indicates in which register AIC Write Protect Mode Register AIC Write 11055B–ATARM–22-Sep-11 ...

Page 85

... Spurious Interrupt Vector Register Debug Control Register Reserved (2) Fast Forcing Enable Register (2) Fast Forcing Disable Register (2) Fast Forcing Status Register Reserved Write Protect Mode Register Write Protect Status Register Reserved SAM9X35 SAM9X35 Name Access Reset AIC_SMR0 Read-write AIC_SMR1 Read-write --- --- AIC_SMR31 Read-write AIC_SVR0 Read-write ...

Page 86

... The priority level is not used for the FIQ in the related SMR register AIC_SMRx. • SRCTYPE: Interrupt Source Type The active level or edge is not programmable for the internal interrupt sources. Value Name 0x0 INT_LEVEL_SENSITIVE 0x1 INT_EDGE_TRIGGERED 0x2 EXT_HIGH_LEVEL 0x3 EXT_POSITIVE_EDGE SAM9X35 SAM9X35 – – – – – ...

Page 87

... The user may store in these registers the addresses of the corresponding handler for each interrupt source. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- VECTOR VECTOR VECTOR VECTOR AIC Write Protect Mode Register SAM9X35 SAM9X35 ...

Page 88

... The Interrupt Vector Register contains the vector programmed by the user in the Source Vector Register corresponding to the current interrupt. The Source Vector Register is indexed using the current interrupt number when the Interrupt Vector Register is read. When there is no current interrupt, the Interrupt Vector Register reads the value stored in AIC_SPU. SAM9X35 SAM9X35 ...

Page 89

... The FIQ Vector Register contains the vector programmed by the user in the Source Vector Register 0. When there is no fast interrupt, the FIQ Vector Register reads the value stored in AIC_SPU. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- FIQV FIQV FIQV FIQV SAM9X35 SAM9X35 ...

Page 90

... IRQID: Current Interrupt Identifier The Interrupt Status Register returns the current interrupt source number. SAM9X35 SAM9X35 – – – – – – – – ...

Page 91

... PID5 PID4 PID3 PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 PID4 PID3 SAM9X35 SAM9X35 PID26 PID25 PID24 PID18 PID17 PID16 PID10 PID9 PID8 PID2 SYS FIQ PID26 PID25 ...

Page 92

... NFIQ: NFIQ Status 0 = nFIQ line is deactivated nFIQ line is active. • NIRQ: NIRQ Status 0 = nIRQ line is deactivated nIRQ line is active. SAM9X35 SAM9X35 – – – – – – – ...

Page 93

... PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 PID4 PID3 SAM9X35 SAM9X35 PID26 PID25 PID24 PID18 PID17 PID16 PID10 PID9 PID8 PID2 SYS FIQ 93 93 ...

Page 94

... Access: Write-only 31 30 PID31 PID30 23 22 PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • FIQ, SYS, PID2-PID31: Interrupt Disable effect Disables corresponding interrupt. SAM9X35 SAM9X35 PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 5 4 ...

Page 95

... PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 PID4 PID3 SAM9X35 SAM9X35 PID26 PID25 PID24 PID18 PID17 PID16 PID10 PID9 PID8 PID2 SYS FIQ 95 95 ...

Page 96

... Access: Write-only 31 30 PID31 PID30 23 22 PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • FIQ, SYS, PID2-PID31: Interrupt Set effect Sets corresponding interrupt. SAM9X35 SAM9X35 PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 5 4 ...

Page 97

... SAM9X35 SAM9X35 – – – – – – – – – – – – ...

Page 98

... This register can only be written if the WPEN bit is cleared in • SIVR: Spurious Interrupt Vector Register The user may store the address of a spurious interrupt handler in this register. The written value is returned in AIC_IVR in case of a spurious interrupt and in AIC_FVR in case of a spurious fast interrupt. SAM9X35 SAM9X35 ...

Page 99

... AIC Write Protect Mode Register SAM9X35 SAM9X35 – – – – – – – – – – GMSK PROT 99 99 ...

Page 100

... PID31 PID30 23 22 PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • SYS, PID2-PID31: Fast Forcing Enable effect Enables the fast forcing feature on the corresponding interrupt. SAM9X35 SAM9X35 100 100 PID29 PID28 PID27 PID21 PID20 PID19 PID13 ...

Page 101

... PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 PID4 PID3 SAM9X35 SAM9X35 PID26 PID25 PID24 PID18 PID17 PID16 PID10 PID9 PID8 PID2 SYS – 101 101 ...

Page 102

... PID23 PID22 15 14 PID15 PID14 7 6 PID7 PID6 • SYS, PID2-PID31: Fast Forcing Status 0 = The Fast Forcing feature is disabled on the corresponding interrupt The Fast Forcing feature is enabled on the corresponding interrupt. SAM9X35 SAM9X35 102 102 PID29 PID28 PID27 PID21 PID20 ...

Page 103

... Should be written at value 0x414943 ("AIC" in ASCII). Writing any other value in this field aborts the write operation of the WPEN bit. Always reads as 0. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- WPKEY WPKEY WPKEY — — — SAM9X35 SAM9X35 — — WPEN 103 103 ...

Page 104

... WPVSRC. • WPVSRC: Write Protect Violation Source When WPVS is active, this field indicates the write-protected register (through address offset or code) in which a write access has been attempted. Note: Reading AIC_WPSR automatically clears all fields. SAM9X35 SAM9X35 104 104 — ...

Page 105

... Either General Reset, Wake-up Reset, Software Reset, User Reset, Watchdog • External Reset Signal Shaping • AMBA – Interfaces to the ARM 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Reset ™ -compliant Interface ® Advanced Peripheral Bus SAM9X35 SAM9X35 105 105 ...

Page 106

... Crystal Oscil- lator Characteristics in the Electrical Characteristics section of the product documentation. The Reset Controller Mode Register (RSTC_MR), allowing the configuration of the Reset Con- troller, is powered with VDDBU, so that its configuration is saved as long as VDDBU is on. SAM9X35 SAM9X35 106 106 Reset Controller POR ...

Page 107

... Figure 14-2 shows the block diagram of the NRST Manager. RSTC_SR URSTS NRSTL NRST RSTC_MR nrst_out External Reset Timer Slow Clock cycles. This gives the approximate duration of an assertion between 60 μs SAM9X35 SAM9X35 user_reset ERSTL exter_nreset 107 107 ...

Page 108

... Main Supply POR Cell does not report a Main Supply shutdown. VDDBU only activates the backup_nreset signal. The backup_nreset must be released so that any other reset can be generated by VDDCORE (Main Supply POR output). Figure 14-4 SAM9X35 SAM9X35 108 108 XXX BMS sampling delay = 3 cycles shows how the General Reset affects the reset signals ...

Page 109

... When the Main Supply is detected falling, the reset signals are immediately asserted. This tran- sition is synchronous with the output of the Main Supply POR. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Startup Time Processor Startup XXX EXTERNAL RESET LENGTH BMS Sampling = 2 cycles SAM9X35 SAM9X35 Any Freq. 0x0 = General Reset XXX 109 109 ...

Page 110

... EXTERNAL_RESET_LENGTH Slow Clock cycles, as programmed in the field ERSTL. How- ever, if NRST does not rise after EXTERNAL_RESET_LENGTH because it is driven low externally, the internal reset lines remain asserted until NRST actually rises. SAM9X35 SAM9X35 110 110 Resynch. Processor Startup 2 cycles ...

Page 111

... If and only if the PROCRST bit is set, the Reset Controller reports the software status in the field RSTTYP of the Status Register (RSTC_SR). Other Software Resets are not reported in RSTTYP. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Resynch. 2 cycles XXX >= EXTERNAL RESET LENGTH SAM9X35 SAM9X35 Processor Startup 0x4 = User Reset 111 111 ...

Page 112

... WDRSTEN is set, the Watchdog Timer is always reset after a Watchdog Reset and the Watchdog is enabled by default and with a period set to a maximum. When the WDRSTEN in WDT_MR bit is reset, the watchdog fault has no impact on the reset controller. SAM9X35 SAM9X35 112 112 Resynch. Processor Startup ...

Page 113

... The processor reset is active and so a Software Reset cannot be programmed. – A User Reset cannot be entered. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Any Freq. Processor Startup = 3 cycles Any XXX proc_nreset signal. SAM9X35 SAM9X35 0x2 = Watchdog Reset EXTERNAL RESET LENGTH 8 cycles (ERSTL=2) 113 113 ...

Page 114

... Reading the RSTC_SR status register resets the URSTS bit . Figure 14-9. Reset Controller Status and Interrupt MCK Peripheral Access 2 cycle resynchronization NRST NRSTL URSTS rstc_irq if (URSTEN = 0) and (URSTIEN = 1) SAM9X35 SAM9X35 114 114 read RSTC_SR 2 cycle resynchronization 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Figure ...

Page 115

... The reset value of RSTC_SR either reports a General Reset or a Wake-up Reset depending on last rising power supply. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Name Access RSTC_CR Write-only RSTC_SR Read-only RSTC_MR Read-write SAM9X35 SAM9X35 Reset Back-up Reset - 0x0000_0001 0x0000_0000 - 0x0000_0000 115 115 ...

Page 116

... If KEY is correct, resets the peripherals. • EXTRST: External Reset effect KEY is correct, asserts the NRST pin. • KEY: Password Should be written at value 0xA5. Writing any other value in this field aborts the write operation. SAM9X35 SAM9X35 116 116 KEY ...

Page 117

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

Page 118

... This field defines the external reset length. The external reset is asserted during a time of 2 allows assertion duration to be programmed between 60 μs and 2 seconds. • KEY: Password Should be written at value 0xA5. Writing any other value in this field aborts the write operation. SAM9X35 SAM9X35 118 118 29 28 ...

Page 119

... Time, Date and Alarm 32-bit Parallel Load 15.3 Block Diagram Figure 15-1. RTC Block Diagram Slow Clock: SLCK Bus Interface 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 32768 Divider Time Bus Interface Entry Control SAM9X35 SAM9X35 Date Interrupt RTC Interrupt Control 119 119 ...

Page 120

... Each of these fields can be enabled or disabled to match the alarm condition: • If all the fields are enabled, an alarm flag is generated (the corresponding flag is asserted and an interrupt generated if enabled given month, date, hour/minute/second. SAM9X35 SAM9X35 120 120 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 121

... If the 12-hour mode is selected by means of the RTC_MODE register, a 12-hour value can be pro- grammed and the returned value on RTC_TIME will be the corresponding 24-hour value. The entry control checks the value of the AM/PM indicator (bit 22 of RTC_TIME register) to determine the range to be checked. SAM9X35 SAM9X35 121 121 ...

Page 122

... Figure 15-2. Update Sequence SAM9X35 SAM9X35 122 122 Begin Prepare TIme or Calendar Fields Set UPDTIM and/or UPDCAL bit(s) in RTC_CR Read RTC_SR No ACKUPD = 1 ? Yes Clear ACKUPD bit in RTC_SCCR Update Time and/or Calendar values in RTC_TIMR/RTC_CALR Clear UPDTIM and/or UPDCAL bit in RTC_CR End Polling or IRQ (if enabled) 11055B– ...

Page 123

... RTC_CALR Read-write RTC_TIMALR Read-write RTC_CALALR Read-write RTC_SR Read-only RTC_SCCR Write-only RTC_IER Write-only RTC_IDR Write-only RTC_IMR Read-only RTC_VER Read-only – – – – SAM9X35 SAM9X35 Reset 0x0 0x0 0x0 0x01210720 0x0 0x01010000 0x0 – – – 0x0 0x0 – – 123 123 ...

Page 124

... The event that generates the flag CALEV in RTC_SR depends on the value of CALEVSEL Value Name Description 0 WEEK Week change (every Monday at time 00:00:00) 1 MONTH Month change (every 01 of each month at time 00:00:00) 2 YEAR Year change (every January 1 at time 00:00:00) 3 – SAM9X35 SAM9X35 124 124 – – – – – – 13 ...

Page 125

... SAM9X35 SAM9X35 – – – – – – – – – – – HRMOD 125 125 ...

Page 126

... HOUR: Current Hour The range that can be set (BCD) in 12-hour mode (BCD) in 24-hour mode. • AMPM: Ante Meridiem Post Meridiem Indicator This bit is the AM/PM indicator in 12-hour mode AM PM. All non-significant bits read zero. SAM9X35 SAM9X35 126 126 – – ...

Page 127

... The lowest four bits encode the units. The higher bits encode the tens. All non-significant bits read zero. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- YEAR CENT SAM9X35 SAM9X35 26 25 DATE 18 17 MONTH 127 127 ...

Page 128

... This field is the alarm field corresponding to the BCD-coded hour counter. • AMPM: AM/PM Indicator This field is the alarm field corresponding to the BCD-coded hour counter. • HOUREN: Hour Alarm Enable 0 = The hour-matching alarm is disabled The hour-matching alarm is enabled. SAM9X35 SAM9X35 128 128 – ...

Page 129

... The date-matching alarm is enabled. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- – – – – – – – SAM9X35 SAM9X35 26 25 DATE 18 17 MONTH 10 9 – – – – – 0 – 129 129 ...

Page 130

... No calendar event has occurred since the last clear least one calendar event has occurred since the last clear. The calendar event is selected in the CALEVSEL field in RTC_CR and can be any one of the following events: week change, month change and year change. SAM9X35 SAM9X35 130 130 – ...

Page 131

... CALCLR TIMCLR SAM9X35 SAM9X35 26 25 – – – – – – SECCLR ALRCLR ACKCLR 24 – 16 – 8 – 0 131 131 ...

Page 132

... The second periodic interrupt is enabled. • TIMEN: Time Event Interrupt Enable effect The selected time event interrupt is enabled. • CALEN: Calendar Event Interrupt Enable effect. • The selected calendar event interrupt is enabled. SAM9X35 SAM9X35 132 132 – – ...

Page 133

... CALDIS TIMDIS SAM9X35 SAM9X35 – – – – – – SECDIS ALRDIS ACKDIS – – 8 – 0 133 133 ...

Page 134

... TIM: Time Event Interrupt Mask 0 = The selected time event interrupt is disabled The selected time event interrupt is enabled. • CAL: Calendar Event Interrupt Mask 0 = The selected calendar event interrupt is disabled The selected calendar event interrupt is enabled. SAM9X35 SAM9X35 134 134 – ...

Page 135

... NVCALALR SAM9X35 SAM9X35 26 25 – – – – – – NVTIMALR NVCAL NVTIM 24 – 16 – 8 – 0 135 135 ...

Page 136

... SAM9X35 SAM9X35 136 136 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 137

... CPIV 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ® ® /WinCE compliant tick generator ™ -compliant Interface PIT_MR PIV = 0 1 PIT_PIVR PIT_PIIR SAM9X35 SAM9X35 set 0 PIT_SR PITS reset 0 1 12-bit Adder read PIT_PIVR PICNT PICNT PIT_MR PITIEN pit_irq 137 137 ...

Page 138

... PIT counting. After the PIT Enable bit is reset (PITEN= 0), the CPIV goes on counting until the PIV value is reached, and is then reset. PIT restarts counting, only if the PITEN is set again. The PIT is stopped when the core enters debug state. SAM9X35 SAM9X35 138 138 Figure 16-2 illustrates 11055B– ...

Page 139

... Figure 16-2. Enabling/Disabling PIT with PITEN 15 MCK Prescaler 0 PITEN CPIV 0 PICNT PITS (PIT_SR) APB Interface 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 MCK 1 PIV - 1 PIV 1 0 read PIT_PIVR APB cycle APB cycle restarts MCK Prescaler 0 0 SAM9X35 SAM9X35 1 139 139 ...

Page 140

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

Page 141

... The bit PITS in PIT_SR has no effect on interrupt The bit PITS in PIT_SR asserts interrupt. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- – – – – – PIV PIV SAM9X35 SAM9X35 – PITIEN PITEN PIV 141 141 ...

Page 142

... SAM9X35 SAM9X35 – – – – – – – – – – – PITS 142 142 ...

Page 143

... PICNT: Periodic Interval Counter Returns the number of occurrences of periodic intervals since the last read of PIT_PIVR. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep- PICNT CPIV CPIV SAM9X35 SAM9X35 CPIV 143 143 ...

Page 144

... PICNT • CPIV: Current Periodic Interval Value Returns the current value of the periodic interval timer. • PICNT: Periodic Interval Counter Returns the number of occurrences of periodic intervals since the last read of PIT_PIVR. SAM9X35 SAM9X35 144 144 PICNT ...

Page 145

... Interface ® Advanced Peripheral Bus WDT_MR WDV reload 1 0 12-bit Down Counter WDD Current Value <= WDD = 0 set WDUNF reset set WDERR reset SAM9X35 SAM9X35 reload SLCK 1/128 WDT_MR WDRSTEN wdt_fault (to Reset Controller) wdt_int WDFIEN WDT_MR 145 145 ...

Page 146

... If a reset is generated or if WDT_SR is read, the status bits are reset, the interrupt is cleared, and the “wdt_fault” signal to the reset controller is deasserted. Writing the WDT_MR reloads and restarts the down counter. SAM9X35 SAM9X35 146 146 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 147

... WDIDLEHLT and WDDBGHLT in the WDT_MR. Figure 17-2. Watchdog Behavior FFF Normal behavior WDV Forbidden Window WDD Permitted Window 0 Watchdog Fault SAM9X35 SAM9X35 147 147 Watchdog Error WDT_CR = WDRSTT Watchdog Underflow if WDRSTEN WDRSTEN is 0 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 148

... Watchdog Timer (WDT) User Interface Table 17-1. Register Mapping Offset Register 0x00 Control Register 0x04 Mode Register 0x08 Status Register SAM9X35 SAM9X35 148 148 Name Access WDT_CR Write-only WDT_MR Read-write Once WDT_SR Read-only Reset - 0x3FFF_2FFF 0x0000_0000 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 149

... WDRSTT: Watchdog Restart 0: No effect. 1: Restarts the Watchdog. • KEY: Password Should be written at value 0xA5. Writing any other value in this field aborts the write operation. SAM9X35 SAM9X35 149 149 KEY – – – ...

Page 150

... The Watchdog stops when the processor is in debug state. • WDIDLEHLT: Watchdog Idle Halt 0: The Watchdog runs when the system is in idle mode. 1: The Watchdog stops when the system is in idle state. • WDDIS: Watchdog Disable SAM9X35 SAM9X35 150 150 ...

Page 151

... Enables the Watchdog Timer. 1: Disables the Watchdog Timer. SAM9X35 SAM9X35 151 151 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 152

... No Watchdog underflow occurred since the last read of WDT_SR least one Watchdog underflow occurred since the last read of WDT_SR. • WDERR: Watchdog Error 0: No Watchdog error occurred since the last read of WDT_SR least one Watchdog error occurred since the last read of WDT_SR. SAM9X35 SAM9X35 152 152 – ...

Page 153

... SHDW_SR reset WAKEUP0 SHDW_SR set read SHDW_SR reset SHDW_MR RTTWK SHDW_SR set read SHDW_SR reset SHDW_MR RTCWK SHDW_SR set SAM9X35 SAM9X35 SLCK Wake-up SHDN Shutdown Output Controller SHDW_CR Shutdown SHDW 153 153 ...

Page 154

... The software is able to control the pin (SHDW_CR) with the bit SHDW at 1. The shutdown is taken into account only 2 slow clock cycles after the write of SHDW_CR. This register is password-protected and so the value written SAM9X35 SAM9X35 154 154 read SHDW_SR reset ...

Page 155

... RTC alarm status flag is cleared before shutting down the system.Otherwise, no rising edge of the status flag may be detected and the wake-up fails fail. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 pin is released new input change is detected before the counter reaches the corre- SAM9X35 SAM9X35 155 155 ...

Page 156

... Shutdown Controller (SHDWC) User Interface Table 18-2. Register Mapping Offset Register 0x00 Shutdown Control Register 0x04 Shutdown Mode Register 0x08 Shutdown Status Register SAM9X35 SAM9X35 156 156 Name Access SHDW_CR Write-only SHDW_MR Read-write SHDW_SR Read-only Reset - 0x0000_0003 0x0000_0000 11055B–ATARM–22-Sep-11 ...

Page 157

... KEY – – – – – – – – – pin. SAM9X35 SAM9X35 – – – – – – – – SHDW 157 157 ...

Page 158

... Because of the internal synchronization of WKUP0, the (CPTWK Slow Clock cycles after the event on WKUP. • RTCWKEN: Real-time Clock Wake-up Enable 0 = The RTC Alarm signal has no effect on the Shutdown Controller The RTC Alarm signal forces the de-assertion of the SAM9X35 SAM9X35 158 158 – ...

Page 159

... At least one wake-up event occurred on the corresponding wake-up input since the last read of SHDW_SR. • RTCWK: Real-time Clock Wake- wake-up alarm from the RTC occurred since the last read of SHDW_SR least one wake-up alarm from the RTC occurred since the last read of SHDW_SR. SAM9X35 SAM9X35 159 159 – ...

Page 160

... SAM9X35 SAM9X35 160 160 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 161

... General Purpose Backup Registers (GPBR) User Interface Table 19-1. Register Mapping Offset Register 0x0 General Purpose Backup Register 0 ... ... 0xc General Purpose Backup Register 3 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Name SYS_GPBR0 ... SYS_GPBR3 SAM9X35 SAM9X35 Access Reset Read-write – ... ... Read-write – 161 161 ...

Page 162

... General Purpose Backup Register x Name: SYS_GPBRx Address: 0xFFFFFE60 [0], 0xFFFFFE64 [1], 0xFFFFFE68 [2], 0xFFFFFE6C [3] Access: Read-write • GPBR_VALUEx: Value of GPBR x SAM9X35 SAM9X35 162 162 GPBR_VALUEx GPBR_VALUEx GPBR_VALUEx GPBR_VALUEx 11055B–ATARM–22-Sep-11 ...

Page 163

... Switch the master clock to a source different from slow clock (PLL or Main Oscillator) through the Power Management Controller. • Enable the 32,768 Hz oscillator by setting the bit OSC32EN to 1. 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 On Chip RC OSC Slow Clock XIN32 Oscillator XOUT32 SAM9X35 SAM9X35 RCEN Slow Clock SLCK OSCSEL OSC32EN OSC32BYP 163 163 ...

Page 164

... Switch from 32,768 Hz oscillator to internal RC by setting the bit OSCSEL to 0. • Wait 5 slow clock cycles for internal resynchronization. • Disable the 32,768 Hz oscillator by setting the bit OSC32EN to 0. SAM9X35 SAM9X35 164 164 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 ...

Page 165

... Slow Clock Configuration (SCKC) User Interface Table 20-1. Register Mapping Offset Register 0x0 Slow Clock Configuration Register 11055B–ATARM–22-Sep-11 11055B–ATARM–22-Sep-11 Name Access SCKC_CR Read-write SAM9X35 SAM9X35 Reset 0x0000_0001 165 165 ...

Page 166

... OSCSEL SAM9X35 SAM9X35 26 25 – – – – – – OSC32BYP OSC32EN RCEN 24 – 16 – 8 – 0 166 166 ...

Page 167

... MHz Fast RC Oscillator • PLLACK is the output of the Divider and 400 to 800 MHz programmable PLL (PLLA) • UPLLCK is the output of the 480 MHz UTMI PLL (UPLL) 11055B–ATARM–22-Sep-11 Section 22.13 ”Power Management Controller (PMC) User SAM9X35 Interface”. However, 167 ...

Page 168

... OSC32BYP to accept an external slow clock on XIN32. The internal 32 kHz RC oscillator and the 32,768 Hz oscillator can be enabled by setting to 1, respectively, RCEN bit and OSC32EN bit in the System Controller user interface. The OSCSEL command selects the slow clock source. SAM9X35 168 Clock Generator On Chip ...

Page 169

... Enable the bypass path OSC32BYP bit set to 1. • Disable the 32768 Hz oscillator by setting the bit OSC32EN to 0. 11055B–ATARM–22-Sep-11 Clock Generator On Chip RC OSC Slow Clock XIN32 Oscillator XOUT32 SAM9X35 RCEN Slow Clock SLCK OSCSEL OSC32EN OSC32BYP 169 ...

Page 170

... Switch from 32768 Hz oscillator to internal RC by setting the bit OSCSEL to 0. • Wait 5 slow clock cycles for internal resynchronization. • Disable the 32768 Hz oscillator by setting the bit OSC32EN to 0. • Switch the master clock back to the slow clock domain SAM9X35 170 11055B–ATARM–22-Sep-11 ...

Page 171

... Slow clock is 32768 Hz oscillator 11055B–ATARM–22-Sep- – – – – – – – – – – – OSCSEL SAM9X35 26 25 – – – – – – OSC32BYP OSC32EN RCEN 24 – 16 – 8 – 0 171 ...

Page 172

... The main clock can be generated either by an external 12 MHz crystal oscillator or by the on- chip 12 MHz RC oscillator. This fast RC oscillator allows the processor to start or restart in a few microseconds when 12 MHz internal RC is selected. The 12 MHz crystal oscillator can be bypassed by setting the bit MOSCXTBY to accept an exter- nal main clock on XIN. SAM9X35 172 MOSCRCEN MOSCRCF 12 MHz ...

Page 173

... Crystal Startup Time Wait MOSCRCS = 1 System switches on Main Clock to speed-up the boot System is running at 12 MHz External oscillator is started for better accuracy MOSCXTEN = 1 MOSCSEL = 0 SAM9X35 MOSCRCEN Main Clock MOSCSEL MOSCXTEN MOSCXTBY Wait MOSCXTS = 1 User switches on external oscillator MOSCSEL=1 Wait while MOSCSELS =1 ...

Page 174

... Setting the MOSCRCS bit in the Power Management Controller Interrupt Enable Register (PMC_IER) can trigger an interrupt to the processor. 21.6 MHz Crystal Oscillator After reset, the MHz Crystal Oscillator is disabled and it is not selected as the source of MAINCK. SAM9X35 174 11055B–ATARM–22-Sep-11 ...

Page 175

... Then, at the 16th falling edge of Slow Clock, the MAINFRDY bit in the Clock Generator Main Clock Frequency Register (CKGR_MCFR) is set and the counter stops counting. Its value can be read in the MAINF field of CKGR_MCFR and gives the number of Main Clock cycles during 11055B–ATARM–22-Sep-11 SAM9X35 175 ...

Page 176

... MAINCK, the 12 MHz frequency must also be selected because the UTMI PLL multiplier contains a built-in multiplier obtain the USB High Speed 480 MHz MHz crystal is needed to use the USB. SAM9X35 176 shows the block diagram of the divider and PLLA block. DIVA ...

Page 177

... The user has to load the number of Slow Clock cycles required to cover the UTMI PLL transient time into the PLLCOUNT field. 11055B–ATARM–22-Sep-11 UPLLEN MAINCK UTMI PLL UPLLCOUNT UTMI PLL SLCK Counter SAM9X35 UPLLCK LOCKU 177 ...

Page 178

... Standby Mode, mix of Idle and Backup Mode, peripheral running at low frequency, processor stopped waiting for an interrupt • Backup Mode, Main Power Supplies off, VDDBU powered by a battery SAM9X35 178 DDR clock is not available when Master Clock (MCK) equals Processor Clock (PCK). ...

Page 179

... This feature is useful when switching from a high-speed clock to a lower one to inform the software when the change is actually done. Figure 22-1. Master Clock Controller MAINCK PLLACK UPLLCK 11055B–ATARM–22-Sep-11 PMC_MCKR PMC_MCKR CSS SLCK Master Clock Prescaler PRES MCK To the Processor Clock Controller (PCK) SAM9X35 179 ...

Page 180

... Note: The ARM Wait for Interrupt mode is entered by means of CP15 coprocessor operation. Refer to the Atmel application note, Systems, lit. number 6217. When the Processor Clock is disabled, the current instruction is finished before the clock is stopped, but this does not prevent data transfers from other masters of the system bus. SAM9X35 180 USBS USBDIV /1.5 /2 ...

Page 181

... To write the division factor on a particular peripheral, the user needs to write a WRITE command, the peripheral ID and the chosen divi- sion factor. To read the current division factor on a particular peripheral, the user just needs to write the READ command and the peripheral ID. 11055B–ATARM–22-Sep-11 SAM9X35 181 ...

Page 182

... Once this register has been correctly configured, the user must wait for MOSCS field in the PMC_SR register to be set. This can be done either by polling the status register or by wait- ing the interrupt line to be raised if the associated interrupt to MOSCS has been enabled in the PMC_IER register. 2. Setting PLLA and divider: SAM9X35 182 11055B–ATARM–22-Sep-11 ...

Page 183

... The CSS field is used to select the clock source of the Master Clock and Processor Clock dividers. By default, the selected clock source is slow clock. The PRES field is used to control the Master/Processor Clock prescaler. The user can choose between different values ( 16, 32, 64). Prescaler output is the selected 11055B–ATARM–22-Sep-11 write_register(CKGR_PLLAR,0x00040805) SAM9X35 183 ...

Page 184

... The Master Clock is main clock divided by 16. SAM9X35 184 IF PLLA clock was selected as the Master Clock and the user decides to modify it by writing in CKGR_PLLAR, the MCKRDY flag will go low while PLLA is unlocked. Once PLLA is locked again, LOCK goes high and MCKRDY is set ...

Page 185

... Depending on the system used, 19 peripheral clocks can be enabled or disabled. The PMC_PCR provides a clear view as to which peripheral clock is enabled. Note: Code Examples: write_register(PMC_PCER,0x00000110) Peripheral clocks 4 and 8 are enabled. write_register(PMC_PCDR,0x00000010) Peripheral clock 4 is disabled. 11055B–ATARM–22-Sep-11 Each enabled peripheral clock corresponds to Master Clock. SAM9X35 185 ...

Page 186

... Table 22-1. To Main Clock SLCK PLL Clock Notes: Table 22-2. To PLLA Clock UPLL Clock SAM9X35 186 and Table 22-2 give the worst case timings required for the Master Clock to switch Clock Switching Timings (Worst Case) From Main Clock – 0.5 x Main Clock + 4.5 x SLCK ...

Page 187

... Figure 22-3. Switch Master Clock from Slow Clock to PLL Clock Write PMC_MCKR Figure 22-4. Switch Master Clock from Main Clock to Slow Clock Write PMC_MCKR 11055B–ATARM–22-Sep-11 Slow Clock PLL Clock LOCK MCKRDY Master Clock Slow Clock Main Clock MCKRDY Master Clock SAM9X35 187 ...

Page 188

... Figure 22-5. Change PLLA Programming Write CKGR_PLLAR Figure 22-6. Programmable Clock Output Programming Write PMC_PCKx Write PMC_SCER Write PMC_SCDR SAM9X35 188 Slow Clock PLLA Clock LOCKA MCKRDY Master Clock PLL Clock PCKRDY PCKx Output PLL Clock is selected Slow Clock PCKx is enabled PCKx is disabled ...

Page 189

... PMC_IER Write-only PMC_IDR Write-only PMC_SR Read-only PMC_IMR Read-only – – PMC_PLLICPR Write-only – – PMC_WPMR Read-write PMC_WPSR Read-only – – PMC_PCR Read-write SAM9X35 Reset N.A. N.A. 0x0000_0005 N.A. – 0x0000_0000 – 0x1020_0000 0x0100_0008 0x0000_0000 0x0000_3F00 – 0x0000_0001 – 0x0000_0000 0x0000_0000 0x0000_0000 0x0000_0000 – N.A. N.A. ...

Page 190

... No effect Enables the UHP48M and UHP12M OHCI clocks. • UDP: USB Device Clock Enable effect Enables the USB Device clock. • PCKx: Programmable Clock x Output Enable effect Enables the corresponding Programmable Clock output. SAM9X35 190 – – – ...

Page 191

... Disables the corresponding Programmable Clock output. 11055B–ATARM–22-Sep- – – – – – – – – – – SMDCK LCDCK SAM9X35 – – – – – PCK1 PCK0 2 1 DDRCK – PCK – – 191 ...

Page 192

... The UHP48M and UHP12M OHCI clocks are enabled. • UDP: USB Device Port Clock Status 0 = The USB Device clock is disabled The USB Device clock is enabled. • PCKx: Programmable Clock x Output Status 0 = The corresponding Programmable Clock output is disabled The corresponding Programmable Clock output is enabled. SAM9X35 192 – – ...

Page 193

... Programming the control bits of the Peripheral ID that are not implemented has no effect on the behavior of the PMC. 11055B–ATARM–22-Sep- PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 PID4 PID3 SAM9X35 PID26 PID25 PID24 PID18 PID17 PID16 PID10 PID9 PID8 PID2 - - 193 ...

Page 194

... PID15 PID14 7 6 PID7 PID6 • PIDx: Peripheral Clock x Disable effect Disables the corresponding peripheral clock. Note: PID2 to PID31 refer to identifiers as defined in the section “Peripheral Identifiers” in the product datasheet. SAM9X35 194 PID29 PID28 PID27 PID21 PID20 ...

Page 195

... PID2 to PID31 refer to identifiers as defined in the section “Peripheral Identifiers” in the product datasheet. 11055B–ATARM–22-Sep- PID29 PID28 PID27 PID21 PID20 PID19 PID13 PID12 PID11 PID5 PID4 PID3 SAM9X35 PID26 PID25 PID24 PID18 PID17 PID16 PID10 PID9 PID8 PID2 – – 195 ...

Page 196

... Specifies the number of Slow Clock cycles multiplied by 8 for the UTMI PLL start-up time. • BIASEN: UTMI BIAS Enable 0 = The UTMI BIAS is disabled The UTMI BIAS is enabled. • BIASCOUNT: UTMI BIAS Start-up Time Specifies the number of Slow Clock cycles for the UTMI BIAS start-up time. SAM9X35 196 – ...

Page 197

... The Main Crystal Oscillator is selected. • CFDEN: Clock Failure Detector Enable 0 = The Clock Failure Detector is disabled. 11055B–ATARM–22-Sep- – – – KEY MOSCXTST – – MOSCRCEN SAM9X35 – CFDEN MOSCSEL – MOSCXTBY MOSCXTEN 197 ...

Page 198

... MAINF: Main Clock Frequency Gives the number of Main Clock cycles within 16 Slow Clock periods. • MAINFRDY: Main Clock Ready 0 = MAINF value is not valid or the Main Oscillator is disabled The Main Oscillator has been enabled previously and MAINF value is available. SAM9X35 198 – ...

Page 199

... The PLLA Clock frequency is the PLLA input frequency multiplied by MULA+ 1. 11055B–ATARM–22-Sep- – – MULA PLLACOUNT DIVA Divider Selected Divider output is 0 Divider is bypassed Divider output is the selected clock divided by DIVA. SAM9X35 MULA 199 ...

Page 200

... CLOCK 1 CLOCK_DIV2 2 CLOCK_DIV4 3 CLOCK_DIV8 4 CLOCK_DIV16 5 CLOCK_DIV32 6 CLOCK_DIV64 7 CLOCK_DIV3 • MDIV: Master Clock Division Value Name 0 EQ_PCK 1 PCK_DIV2 2 PCK_DIV4 3 PCK_DIV3 SAM9X35 200 – – – – – – – PLLADIV2 – PRES – Description Slow Clock is selected Main Clock is selected ...

Related keywords