300 likes | 444 Views
SAM9 Boot Strategies. Frederic BOYER AT91 Support Group. Version 1.0 October 2006. AT91 Support Group. Version 2.0.2 June 2007. SAM9 BootROM Memory. SAM9 devices feature on-chip BootROM memory BootROM memory can contain up to 4 applications: SAM-BA Boot
E N D
SAM9 Boot Strategies Frederic BOYER AT91 Support Group. Version 1.0 October 2006 AT91 Support Group. Version 2.0.2 June 2007
SAM9 BootROM Memory • SAM9 devices feature on-chip BootROM memory • BootROM memory can contain up to 4 applications: • SAM-BA Boot • Provides In-System Programming Solutions through serial or USB communication channels • DataFlash-Boot • NandFlash-Boot • SDCard-Boot
SAM9261 Internal Memory Mapping (for Master 0 & 1*) BMS=0 BMS=1 16-bit non-volatile Memory 0x0000_0000 0x0000_0000 ROM EBI NCS0 0x0010_0000 0x0010_0000 Undefined Area(No abort) Undefined Area(No abort) 0x0020_0000 0x0020_0000 Undefined Area(No abort) Undefined Area(No abort) 0x0030_0000 0x0030_0000 RAM RAM 0x0040_0000 0x0040_0000 ROM ROM 0x0050_0000 0x0050_0000 ROM mapped by default * Master 0 ARM926 Instruction & Master 1 ARM926 Data
SAM9261 Embedded ROM Power Up Boot From External Flash Boot From ROM Yes No BMS = 1 Boot From External Memory on EBI Chip Select 0 DataFlash-Boot on SPI0 Chip Select 0 User Application Yes Valid Code ? (SPI0 NPCS0) No Downloads and runs code from Dataflash into SRAM SAM-BA Boot
SAM9260 Internal Memory Mapping (for Master 0 & 1*) BMS = 1 BMS = 0 16-bit non-volatile Memory 0x0000_0000 0x0000_0000 ROM EBI NCS0 0x0010_0000 0x0010_0000 ROM ROM 0x0020_0000 0x0020_0000 SRAM0 4KB SRAM0 4KB 0x0030_0000 0x0030_0000 SRAM1 4KB SRAM1 4KB 0x0040_0000 0x0040_0000 ROM mapped by default * Master 0 ARM926 Instruction & Master 1 ARM926 Data
SAM9260 Embedded ROM Power Up Boot From External Flash Boot From ROM Yes No BMS = 1 DataFlash-Boot on SPI0 Chip Select 0 Boot From External Memory on EBI Chip Select 0 DataFlash-Boot on SPI0 Chip Select 1 User Application NandFlash-Boot on EBI Chip Select 3 Optional SAM-BA Boot
SAM9260 Embedded ROM (cont.) Boot From ROM Yes Valid Code ? (SPI0 NPCS0) DataFlash-Boot No Yes Valid Code ? (SPI0 NPCS1) No Yes Valid FAT12/16 ? (EBI NCS3) No NandFlash-Boot Yes Valid Code ? (EBI NCS3) Downloads and runs code into SRAM No SAM-BA Boot SAM-BA Boot
SAM9263 Internal Memory Mapping (for Master 7 & 8*) BMS=0 BMS=1 16-bit non-volatile Memory 0x0000_0000 0x0000_0000 EBI NCS0 ROM 0x0010_0000 0x0010_0000 Undefined Area(No abort) Undefined Area(No abort) 0x0020_0000 0x0020_0000 Undefined Area(No abort) Undefined Area(No abort) 0x0030_0000 0x0030_0000 80kB SRAM 80kB SRAM 0x0040_0000 0x0040_0000 ROM ROM 0x0050_0000 0x0050_0000 16kB SRAM 16kB SRAM 0x0060_0000 0x0060_0000 ROM mapped by default * Master 8 ARM926 Instruction & Master 7 ARM926 Data
SAM9263 Embedded ROM Power Up Boot From External Flash Boot From ROM Yes No BMS = 1 SD Card Boot on MCI1 Not Supported on SAM9263 rev A Boot From External Memory on EBI0 Chip Select 0 NandFlash-Boot on EBI0 Chip Select 3 User Application Not Supported on SAM9263 rev A DataFlash-Boot on SPI0 Chip Select 0 Optional SAM-BA Boot
SAM9 SAM-BA Boot AT91SAM Dependant • Device Initialization • Check if USB Device enumeration (End of Bus Reset) has occured • Check for a received character on the DBGUorCheck if the AutoBaudrate sequence has succeeded • Step 2. and 3. until one occurs • Once the communication interface is identified, the application runs in an infinite loop waiting for different commands
SAM-BA Boot (cont.) • AT91SAM9261 & AT91SAM9263: No AutoBaudrate See. SAM9261 & SAM9263 SAM-BA Boot Requirements
SAM-BA Boot (cont.) DBGU & USB • SAM9261 SAM-BA Boot Requirements:
SAM-BA Boot (cont.) DBGU & USB • SAM9263 SAM-BA Boot Requirements:
SAM-BA Boot (cont.) • AT91SAM9260: See. SAM9260 SAM-BA Boot Requirements • On-chip RC (OSCSEL=0): AutoBaudrate Detection • 32768 Hz Oscillator (OSCSEL=1): No AutoBaudrate
SAM-BA Boot (cont.) • SAM-BA Boot AutoBaudrate Sequence: SAM9260 with On-chip RC Only
SAM-BA Boot (cont.) DBGU & USB • SAM9260 SAM-BA Boot Requirements: Any other crystal (3-20MHz) can be used, but it prevents using USB • On-chip RC (OSCSEL=0) • Main Oscillator Enabled (MOSCEN=1) Any other input frequency (1-50MHz) can be used, but it prevents using USB • On-chip RC (OSCSEL=0) • Main Oscillator Bypassed (OSCBYPASS=1)
SAM-BA Boot (cont.) DBGU & USB • SAM9260 SAM-BA Boot Requirements: • 32768 Hz Oscillator (OSCSEL=1) / Main Oscillator Enabled (MOSCEN=1) • 32768 Hz Oscillator (OSCSEL=1) / Main Oscillator Bypassed (OSCBYPASS=1)
SAM-BA Boot (cont.) • SAM9260 SAM-BA Boot USB Requirements:
DataFlash-Boot • Device Initialization • Search for valid code: • First 8th arm vectors must be valid • Decode the 6th vector (used to store code size) • If valid code found: • Download code into the internal SRAM • Reset peripherals • Perform a remap • Set PC at address 0x0000_0000
NandFlash-Boot • Device Initialization • Search for Boot.bin file in the root directory or in the FIRMWARE directory of a FAT12/16 formatted NandFlash • If valid file found: • Download code into the internal SRAM • Reset peripherals • Perform a remap and set PC at address 0x0000_0000 • If no FAT12/16 file system, search for valid code: • First 8th arm vectors must be valid • Decode the 6th vector (used to store code size) • If valid code found: • Download code into the internal SRAM • Reset peripherals • Perform a remap and set PC at address 0x0000_0000 8-bit & 16-bit NandFlash Support Small & Large Blocks Support Not Supported on SAM9263 rev A
NandFlash-Boot Requirements Not Supported on SAM9263 rev A
NandFlash-Boot Requirements (cont.) • Supported NandFlash Manufacturers: Not Supported on SAM9263 rev A NandFlash first block must be guaranteed to be valid without ECC (generally up to 1,000 Program/Erase cycles)
SD Card Boot • Device Initialization • Search for Boot.bin file in the root directory or in the FIRMWARE directory of a FAT12/16 formatted SD Card • If valid file found: • Download code into the internal SRAM • Reset peripherals • Perform a remap and set PC at address 0x0000_0000 • If no FAT12/16 file system, search for valid code: • First 8th arm vectors must be valid • Decode the 6th vector (used to store code size) • If valid code found: • Download code into the internal SRAM • Reset peripherals • Perform a remap and set PC at address 0x0000_0000 Not Supported on SAM9263 rev A
SD Card-Boot Requirements Not Supported on SAM9263 rev A