AT 91 SAM Training SAM 9 Boot Strategies
- AT 91 SAM Training SAM 9 Boot Strategies Frederic BOYER AT 91 Support Group. Version 2. 0. 2 June 2007 AT 91 Support Group. Version 1. 0 October 2006
- AT 91 SAM Training SAM 9 Boot. ROM Memory n SAM 9 devices feature on-chip Boot. ROM memory n Boot. ROM memory can contain up to 4 applications: § SAM-BA Boot - Provides In-System Programming Solutions through serial or USB communication channels § Data. Flash-Boot § Nand. Flash-Boot § SDCard-Boot ARM-Based Products Group 2
- AT 91 SAM Training SAM 9261
- AT 91 SAM Training SAM 9261 Internal Memory Mapping (for Master 0 & 1*) 0 BMS= 1 BMS= 0 x 0000_0000 ROM 0 x 0010_0000 0 x 0020_0000 0 x 0030_0000 EBI NCS 0 Undefined Area (No abort) 0 x 0010_0000 0 x 0020_0000 0 x 0030_0000 RAM 0 x 0040_0000 Undefined Area (No abort) RAM 0 x 0040_0000 ROM 0 x 0050_0000 16 -bit non-vo latil Memo e ry ROM 0 x 0050_0000 ROM mapped by default * Master 0 ARM 926 Instruction & Master 1 ARM 926 Data ARM-Based Products Group 4
- AT 91 SAM Training SAM 9261 Embedded ROM Power Up Bo OM m. R ot Fro Yes BMS = 1 Boot From External Memory on EBI Chip Select 0 Data. Flash-Boot on SPI 0 Chip Select 0 Valid Code ? No Boot Fr Externa om l Flash User Application Yes (SPI 0 NPCS 0) No SAM-BA Boot Downloads and runs code from Dataflash into SRAM ARM-Based Products Group 5
- AT 91 SAM Training SAM 9260
- AT 91 SAM Training SAM 9260 Internal Memory Mapping (for Master 0 & 1*) BMS =1 = BMS 0 x 0000_0000 16 -bit non-vo latil Memo e ry 0 x 0000_0000 ROM EBI NCS 0 0 x 0010_0000 ROM 0 x 0020_0000 SRAM 0 4 KB 0 x 0030_0000 SRAM 1 4 KB 0 x 0040_0000 ROM mapped by default * Master 0 ARM 926 Instruction & Master 1 ARM 926 Data ARM-Based Products Group 7
- AT 91 SAM Training SAM 9260 Embedded ROM Power Up rom R F t o o OM B Yes Data. Flash-Boot on SPI 0 Chip Select 0 No BMS = 1 Boot Fr Externa om l Flash Boot From External Memory on EBI Chip Select 0 Data. Flash-Boot on SPI 0 Chip Select 1 User Application Nand. Flash-Boot on EBI Chip Select 3 Optional SAM-BA Boot ARM-Based Products Group 8
- AT 91 SAM Training SAM 9260 Embedded ROM (cont. ) Valid Code ? (SPI 0 NPCS 0) Data. Flash-Boot Yes Boot Fro m ROM No Valid Code ? (SPI 0 NPCS 1) Yes No Valid FAT 12/16 ? (EBI NCS 3) Nand. Flash-Boot Yes No Valid Code ? (EBI NCS 3) Yes No SAM-BA Boot Downloads and runs code into SRAM SAM-BA Boot ARM-Based Products Group 9
- AT 91 SAM Training SAM 9263
- AT 91 SAM Training SAM 9263 Internal Memory Mapping (for Master 7 & 8*) 0 BMS= 1 BMS= 0 x 0000_0000 EBI NCS 0 ROM 0 x 0010_0000 0 x 0020_0000 0 x 0030_0000 Undefined Area (No abort) 0 x 0010_0000 0 x 0020_0000 0 x 0030_0000 0 x 0040_0000 Undefined Area (No abort) 80 k. B SRAM 0 x 0040_0000 ROM 0 x 0050_0000 16 k. B SRAM 0 x 0060_0000 16 -bit non-vo latil Memo e ry 16 k. B SRAM 0 x 0060_0000 ROM mapped by default * Master 8 ARM 926 Instruction & Master 7 ARM 926 Data ARM-Based Products Group 11
- AT 91 SAM Training SAM 9263 Embedded ROM rom R F t o o Power Up OM B Yes SD Card Boot on MCI 1 Nand. Flash-Boot on EBI 0 Chip Select 3 BMS = 1 Not Sup port SAM 926 ed on 3 rev A No Boot Fr Externa om l Flash Boot From External Memory on EBI 0 Chip Select 0 Not Sup port SAM 926 ed on 3 rev A Data. Flash-Boot on SPI 0 Chip Select 0 User Application Optional SAM-BA Boot ARM-Based Products Group 12
- AT 91 SAM Training SAM-BA Boot Data. Flash-Boot Nand. Flash-Boot SDCard-Boot
- AT 91 SAM Training SAM 9 SAM-BA Boot AT 91 SAM Dependa nt 1. 2. Device Initialization 3. Check for a received character on the DBGU or Check if the Auto. Baudrate sequence has succeeded 4. 5. Step 2. and 3. until one occurs Check if USB Device enumeration (End of Bus Reset) has occured Once the communication interface is identified, the application runs in an infinite loop waiting for different commands ARM-Based Products Group 14
- AT 91 SAM Training SAM-BA Boot (cont. ) q. AT 91 SAM 9261 & AT 91 SAM 9263: No Aut o. Baudr a te See. SAM 92 61 & SA M 9263 SAM-B A Boot Require ments ARM-Based Products Group 15
- AT 91 SAM Training SAM-BA Boot (cont. ) DBGU & U SB q. SAM 9261 SAM-BA Boot Requirements: Supported Quartz (MHz) (Main Oscillator Enabled) Supported Ext. Clocks (MHz) (Main Oscillator Bypassed) USB Device (UDP) Pull-up Management None Handled by SAM-BA Boot No PIO driven Internal UDP Pull-up Enabled ARM-Based Products Group 16
- AT 91 SAM Training SAM-BA Boot (cont. ) DBGU & U SB q. SAM 9263 SAM-BA Boot Requirements: Supported Quartz (MHz) (Main Oscillator Enabled) Supported Ext. Clocks (MHz) (Main Oscillator Bypassed) USB Device (UDP) Pull-up Management 1 to 50 MHz Handled by SAM-BA Boot No PIO driven Internal UDP Pull-up Enabled ARM-Based Products Group 17
- AT 91 SAM Training SAM-BA Boot (cont. ) q. AT 91 SAM 9260: See. SA M 9260 SA Require M-BA Boot ments q On-chip RC (OSCSEL=0): Auto. Ba udrate Detecti on q 32768 Hz Oscillator (OSCSEL=1): No Aut ARM-Based Products Group o. Baudr a te 18
- AT 91 SAM Training SAM-BA Boot (cont. ) q. SAM-BA Boot Auto. Baudrate Sequence: SAM 92 60 with On -chip R C Only ARM-Based Products Group 19
- AT 91 SAM Training SAM-BA Boot (cont. ) q. SAM 9260 SAM-BA Boot Requirements: & USB Any oth er crys ta can be used, b l (3 -20 MHz) ut it using U prevents SB q On-chip RC (OSCSEL=0) q Main Oscillator Enabled (MOSCEN=1) q On-chip RC (OSCSEL=0) q Main Oscillator Bypassed (OSCBYPASS=1) DBGU Any oth er inpu t freque can be ncy (1 used, b 50 M ut it pre vents u Hz) sing USB ARM-Based Products Group 20
- AT 91 SAM Training SAM-BA Boot (cont. ) q. SAM 9260 SAM-BA Boot Requirements: DBGU & USB q 32768 Hz Oscillator (OSCSEL=1) / Main Oscillator Enabled (MOSCEN=1) q 32768 Hz Oscillator (OSCSEL=1) / Main Oscillator Bypassed (OSCBYPASS=1) ARM-Based Products Group 21
- AT 91 SAM Training SAM-BA Boot (cont. ) q. SAM 9260 SAM-BA Boot USB Requirements: Handled by SAM-BA Boot USB Device (UDP) Pull-up Management No PIO driven Internal UDP Pull-up Enabled ARM-Based Products Group 22
- AT 91 SAM Training Data. Flash-Boot q. Device Initialization q. Search for valid code: • First 8 th arm vectors must be valid • Decode the 6 th vector (used to store code size) q. If valid code found: • Download code into the internal SRAM • Reset peripherals • Perform a remap • Set PC at address 0 x 0000_0000 ARM-Based Products Group 23
- AT 91 SAM Training Data. Flash-Boot Requirements µC SAM 9260 SAM 9261 SAM 9263 MOSI SPI 0_PIOA 1 MISO SPI 0_PIOA 0 SPCK SPI 0_PIOA 2 NPCS 0 SPI 0_PIOA 3 SPI 0_PIOA 5 NPCS 1 SPI 0_PIOC 11 - - Maximum Downloadable Code Size 4 k. B 156 k. B 72 k. B ARM-Based Products Group 24
- AT 91 SAM Training Nand. Flash-Boot q. Device Initialization q. Search for Boot. bin file in the root directory or in the FIRMWARE directory of a FAT 12/16 formatted Nand. Flash q. If valid file found: • Download code into the internal SRAM 8 -bit & 1 6 -b Nand. Fla it sh Support Small & La Blocks S rge upport • Reset peripherals • Perform a remap and set PC at address 0 x 0000_0000 q. If no FAT 12/16 file system, search for valid code: • First 8 th arm vectors must be valid • Decode the 6 th vector (used to store code size) q. If valid code found: • Download code into the internal SRAM Not Sup port SAM 926 ed on 3 rev A • Reset peripherals • Perform a remap and set PC at address 0 x 0000_0000 ARM-Based Products Group 25
- AT 91 SAM Training Nand. Flash-Boot Requirements µC SAM 9260 SAM 9263 Nand. Flash Ready/Busy PIOC 13 PA 22 Nand. Flash Chip Enable (NANDCS) PIOC 14 PD 15 Address Bus (NAND CLE) A 22 Address Bus (NAND ALE) A 21 4 k. B 72 k. B Maximum Downloadable Code Size (Minimum Nandflash First Block Size) Not Sup port SAM 926 ed on 3 rev A ARM-Based Products Group 26
- AT 91 SAM Training Nand. Flash-Boot Requirements (cont. ) q. Supported Nand. Flash Manufacturers: Nand. Flash first block must be guaranteed to be valid without ECC (generally up to 1, 000 Program/Erase cycles) ARM-Based Products Group Not Sup port SAM 926 ed on 3 rev A 27
- AT 91 SAM Training SD Card Boot q. Device Initialization q. Search for Boot. bin file in the root directory or in the FIRMWARE directory of a FAT 12/16 formatted SD Card q. If valid file found: • Download code into the internal SRAM • Reset peripherals • Perform a remap and set PC at address 0 x 0000_0000 q. If no FAT 12/16 file system, search for valid code: • First 8 th arm vectors must be valid • Decode the 6 th vector (used to store code size) q. If valid code found: • Download code into the internal SRAM • Reset peripherals Not Sup port SAM 926 ed on 3 rev A • Perform a remap and set PC at address 0 x 0000_0000 ARM-Based Products Group 28
- AT 91 SAM Training SD Card-Boot Requirements µC SAM 9263 MCCK PA 6 MCCDA PA 7 MCDA 0 PA 8 MCDA 1 PA 9 MCDA 2 PA 10 MCDA 3 PA 11 Maximum Downloadable Code Size (Minimum Nandflash First Block Size) 72 k. B Not Sup port SAM 926 ed on 3 rev A ARM-Based Products Group 29
- Slides: 29