SAM9_Boot_Strategies.ppt

3,413 views
3,247 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,413
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
92
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Many customers face problems when they want to deploy final application on their boards because they are lost in the different necessary steps they need to go through. This technical presentation will highlight the different boot solutions available in the AT91SAM microcontrollers, their interests and specifities.
  • After a brief introduction, we will take a look at different boot solutions we embed in our boot ROM, then how to simply deploy the custom application. Lastly, different free programming solutions which are provided on the atmel.com website will be fully reviewed.
  • We will begin with the introduction and overview of NAND versus NOR Flash memories.
  • NOR flash memory has traditionally been used to store relatively small amounts of executable code for embedded computing devices such as PDAs and cell phones. NOR is well suited to use for code storage because of its reliability, fast read operations, and random access capabilities. Because code can be directly executed in place, NOR is ideal for storing firmware, boot code, operating systems and other data that changes infrequently. NAND flash memory has become the preferred format for storing larger amounts of data on devices such as USB Flash drives, digital cameras and MP3 players. Higher density, lower cost, and faster write and erase times, and a longer re-write life expectancy make NAND especially well suited for consumer media applications in which large files of sequential data need to be loaded into memory quickly and replaced with new files repeatedly.
  • Reading out of a NOR flash is similar to reading out of a random-access memory, provided the address and data bus are mapped correctly. Because of this, most microprocessors can use NOR flash memory as execute-in-place memory, meaning that programs stored in NOR flash can be executed directly without the need to copy them into RAM. That is not the case for a NAND Flash memory in which programs cannot be executed directly; instead, code shadowing must be performed. But, we will see that thanks to our Atmel’s boot ROM, it is possible to boot from one of these NAND Flash based memories which do not require an external NOR flash.
  • Regarding Atmel’s AT91SAM products, there are different parameters that are responsible for the boot memory selection: A general purpose non volatile memory bit (GPNVM bit) for microcontrollers that embed an internal Flash: this is applicable for all AT91SAM7 products and the AT91SAM9XE. A Boot Mode Select pin (BMS pin) is available for the AT91SAM9 products; one exception is the AT91SAM9XE as earlier mentioned.
  • Regarding GPNVM bit or BMS state, the AT91SAM will either boot from the ebedded ROM or from an eXecute In Place (XIP) flash memory.
  • First case to consider is the AT91SAM microcontrollers which embed an on-chip flash. Regarding the GPNVM bit state, the microcontroller will either boot from the embedded ROM (GPNVM = 0) or from the embedded flash (GPNVM =1). It is possible to set/clear this bit using the EFC Interface User Registers. It is also possible to clear the GPVNM bit by asserting the ERASE pin of the Microcontroller.
  • Let’s talk now about the Flashless AT91SAM microcontrollers. Regarding the BMS pin state, the microcontroller will either boot from the embedded ROM (BMS = 1) or from an external 16-bit NOR Flash connected on the External Bus Interface Chip Select 0 (BMS = 0).
  • Let’s have a look now at the different boot solutions we embed in our boot rom.
  • Different XIP memories can be used for booting purpose: either the embedded flash or an 16-bit NOR Flash. At power up, the System Clock is the Slow Clock (32kHz). The first instruction executed is at the address 0x0. So at this step, no boot program has been executed so no device initializations have been performed. That means the user application running out of this memory must performed different important initializations: clocks setup, flash timings configuration, etc.
  • It is also possible to boot from the embedded ROM. Our AT91SAM Boot ROM provides numerous applications depending on the AT91SAM product! (?) It may embed: A 1st Level Bootloader called NVM Memory Bootloader that will call a 2 nd one depending on the customer application. An In System Programming (ISP) Firmware Solution called SAM-BA Boot A paralell Fast Flash Programming Interface for the Gang Programming Vendors An In Application Programming (IAP) feature to upgraade customer firmware easily in the field.
  • These different applications may or not be embedded in our products. They are referenced in this table. SAM-BA Boot is always implemented in all of our AT91SAM7 and AT91SAM9 families.
  • Contrary to XIP memories, it is not possible to boot directly from a DataFlash, serial Flash, NandFlash, SDCard or EEPROM: the NVM Memory content must be first copied into memory-mapped RAM and executed there. The NMV Memory Boot Loader called “NVM -Boot ” embedded in our BOOT ROM is responsible for this copy. This application once executed will look for a valid code in the concerned NVM memory. If a valid code is found, the application programmed in that memory will be copied from and into the internal SRAM of the product. Then, all the peripherals will be reset, so that the microcontroller will be in the same state than as before a reset. Finally, the boot code will branch directly on the copied application so that it is executed. This will allow the application not to use an external NOR Flash memory for booting purpose, reducing its BOM. What is a valid code will be explained later.
  • Here we list different types of Nonvolatile Memories that are supported by Atmel’s ARM products. We have native support for: Serial ATMEL DataFlash Serial 25xxx series Flash SLC NAND Flash (8-, 16-bit, small/large blocks) Standard SDCards (Not High Capacity SDCards SDHC) Any I 2 C EEPROM
  • What’s a valid code? Two cases depending on the memory: SD Card example Other memories example that will be covered on the next slide For SDCards, there are two requirements that must be followed: 1) A boot.bin file must be written in the root directory of a FAT formatted SDCard 2) The code size of this boot.bin must be at least smaller than the AT91SAM internal SRAM size. Once again, this is product dependant and must be checked in the Boot Program section of the product datasheet.
  • At address 0, for all ARM programs, there are 8 ARM exception vectors which are equivalent to 8 words. ARM exception Vectors are: 1. Reset 2. Undefined Instruction 3. Software Interrupt 4. Prefect Abort 5. Data Abort 6. Reserved / used as code size if boot code 7. Normal Interrupt 8. Fast Interrupt Valid code conditions: Check if the first data correspond to either a Branch instruction B (0xE5) or load register instruction LDR (0xEA). The 6th vector contains the size of the image to download. The code size must be at least smaller than the AT91SAM internal SRAM size. Once again, this is product dependant and must be checked in the Boot Program section of the product datasheet. Notes : Samba GUI application writes automatically this vector with the code size thanks to the “Send boot” command ROMCode uses data in SRAM (at the end). So MAX_SIZE < SRAM_SIZE.
  • Different memories supported by AT91SAM9 products (by revision) are referenced in this table.
  • When a valid code has been found in one of the supported memories, the boot branches on this code and so the Boot ROM sequence is completed. If no valid code has been found in the different supported memories, what will happen?
  • Here is the AT91SAM9RL64 Boot ROM sequence as an example. SD Card boot is firstly executed, secondly NAND flash Boot on the EBI Chip Select 3, then DataFlash Boot on the SPI0 Chip Select 0. Finally, if no valid code has been found in one of these memories, the Boot ROM starts SAM-BA Boot execution.
  • SAM-BA Boot is a little monitor that provides In-System Programming Solutions through different communication channels: DBGU Serial port interface and USB Device port. In-System Programming (ISP) is the ability of some programmable logic devices, microcontrollers and other programmable electronic chips to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. This monitor offers several basic read/write commands (WORD, HALF WORD, BYTE) for direct access to the memory mapped and the peripheral r egisters. The SAM-BA monitor checks in an infinite loop the two possible interfaces (USB/DBGU) until a communication is detected on one of them. 1) Check if USB Device enumeration has occurred, 2) Check if any characters have been received on the DBGU, 3) Once the communication interface is identified (USB or DBGU), the application runs in an infinite loop waiting for different commands.
  • When called, the In Application Programming (IAP) function sends the desired FLASH command to the EFC and waits for the FLASH to be ready (looping while the FRDY bit is not set in EFC_FSR register). Since this function is executing from ROM, this allows FLASH programming (like page programming) to be done by code running out of FLASH and no more out of SRAM which eases the software engineer IAP development. The IAP function entry point is retrieved by reading the SWI vector in ROM (see product datasheet to get SWI vector address in ROM).
  • The Fast Flash Programming Interface allows programming the device through either a serial JTAG interface or through a multiplexed fully-handshaked parallel port. It allows gang-programming with market-standard industrial programmers. The FFPI supports read, page program, page erase, full erase, lock, unlock and protect commands. The Fast Flash Programming Interface is enabled and the Fast Programming Mode is entered when the TST pin and the PA0 and PA1 pins are all tied high and PA2 tied to low.
  • In this third section, we will now describe how to simply deploy a custom application by utilizing different embedded boot solutions.
  • Here is a standard application deployment on an AT91SAM9 product. After power up, the Boot ROM is executed. A NVM memory bootloader may be used as a first level bootloader to copy in the internal SRAM a second level bootloader. In this example, the second level bootloader is the AT91 Bootstrap. This application is a bootstrap for AT91SAM9 microcontrollers. It can be uploaded and launched by the ROM Boot Program and can be used to configure the system and to download a larger application. Then, the 2 nd level bootloader may (or may not) be used to download a 3rd bootloarder such as the famous u-boot (Linux) or e-boot (Windows CE) which have many more features available for the OS development. Finally, this third level bootloader will call the final application: maybe Linux, WinCE or a stand alone application.
  • The AT91 Bootstrap application is a free bootstrap for our AT91SAM9 microcontrollers. It integrates several sets of algorithms to configure the clocks, program the on-board customer memories (SDRAM, PSRAM…) The latest version (1.11) has been directly integrated in the different software packages for each development kit we provide on the www.atmel.com website It supports NAND, DataFlash, serial Flash, SD Card and CFI NOR flash on many different AT91SAM9 products.
  • A PowerPoint animation which describes different steps will be shown here. It describes a DataFlash Boot sequence which is used to load a stand alone application on an external SDRAM.
  • A PowerPoint animation which describes the different steps will be shown on this slide. It describes a NAND Flash Boot sequence which is used to load the Linux OS with its Root FileSystem.
  • This last section will outline the different free programming solutions Atmel provides.
  • Today, development tools integrate their own flash loaders utility to program the application during debug phase. That is the simplest way to debug the application. For the boards that do not embed any JTAG interfaces or for demo purposes, SAM-BA GUI is the SOLUTION. The SAM Boot Assistant (SAM-BA™) software provides a means of easily programming various Atmel AT91 ARM Thumb-based devices. It runs under Windows 2000 and XP and allows communication with the target device through an RS232 serial port, USB or a JTAG/ICE interface. SAM-BA UI is based on a central DLL called AT91Boot_DLL.dll. This DLL can be used for the customer that wants to create his own GUI interface. Finally, we embed the FFPI for gang programming.
  • Some of the key features of the SAM-BA UI software are: Performs in-system programming through JTAG, RS232 or USB interfaces May be used via a Graphical User Interface or started from a DOS window Possibility to easily customize it to create your own board, add your memories, etc. Runs on Windows 2000 and XP Memory and peripheral display content Target device memory control: read, write, erase, configure, verify, etc. User scripts available User scripts executable from SAM-BA Graphical User Interface or a shell
  • This appendix contains the Boot Program Flow Charts for the different AT91SAM Microcontrollers (and their revisions). Please browse through to find information for a specific device you are intersted in.
  • SAM9_Boot_Strategies.ppt

    1. 1. AT91SAM Boot Strategies Application Deployment Frederic BOYER Support & Training Group Engineer AT91 Training Coordinator ARM MCU & MPU
    2. 2. Outline <ul><li>Introduction </li></ul><ul><li>Boot Solutions </li></ul><ul><li>Application Deployment </li></ul><ul><li>NVM Programming Solutions </li></ul>
    3. 3. 1. Introduction
    4. 4. NAND vs. NOR Flash Advantage of NAND High Speed Program/Erase Low Cost-per-bit High Capacity Disadvantage of NAND Slow Random Access Time Difficulty of Byte Programming Advantage of NOR High Speed Random Access Byte Programming Code execution Disadvantage of NOR Slow Program Speed Slow Erase Speed Applications Suitable for Data Memory Program/Data Mass Storage Applications Suitable for Code Memory eXecute In Place (XIP) 1. Introduction
    5. 5. NOR vs. NAND Boot Considerations <ul><li>NOR Flash </li></ul><ul><ul><li>Used as an eXecute In Place (XIP) memory : no need to copy the program into RAM </li></ul></ul><ul><ul><li>Used to replace ROM </li></ul></ul><ul><li>NAND Flash </li></ul><ul><ul><li>Programs stored cannot be executed directly </li></ul></ul><ul><ul><li>Code Shadowing must be performed: memory contents must be first copied into memory-mapped RAM and executed there </li></ul></ul><ul><ul><li>Used to replace Hard Disk Drive </li></ul></ul>1. Introduction
    6. 6. AT91SAM Boot Strategies Introduction GPNVM bit ( Embedded Flash based µC) BMS pin ( Flashless µC) OR Boot Memory Selection Power Up <ul><li>To ensure maximum boot possibilities, memory layout can be changed with different parameters. </li></ul><ul><li>On our AT91SAM, either GPNVM bit or BMS pin is responsible for the boot memory selection: </li></ul><ul><ul><li>GPNVM bit for embedded flash µC: SAM7, SAM9XE. </li></ul></ul><ul><ul><li>BMS pin for the others: SAM926x, SAM9G20, SAM9R(L)… </li></ul></ul>1. Introduction
    7. 7. AT91SAM Boot Strategies Introduction (cont.) <ul><li>Regarding GPNVM bit or BMS pin state, the µC will either: </li></ul><ul><ul><li>Boot from ROM </li></ul></ul><ul><ul><li>Or Boot from the XIP memory (internal or external Flash) </li></ul></ul>Boot From (Int. or Ext.) Flash Boot From ROM OR Boot Memory Selection 1. Introduction
    8. 8. Boot Memory Selection for Flash based µC (SAM7 and SAM9XE) <ul><li>GPNVM bit is sampled when VDDCORE is powered. </li></ul><ul><li>GPNVM can be: </li></ul><ul><ul><li>Set thanks to the EFC Controller </li></ul></ul><ul><ul><li>Cleared thanks to the EFC Controller or by asserting the ERASE pin. </li></ul></ul>Boot From Embedded Flash Boot From ROM No Yes Power Up 1. Introduction GPNVM bit = 1
    9. 9. Boot Memory Selection for Flashless µC (SAM926x, SAM9R(L), SAM9G20) <ul><li>BMS pin is sampled when VDDCORE is powered. </li></ul>Boot From External 16-bit Flash Boot From ROM Yes No Power Up 1. Introduction BMS pin = 1
    10. 10. 2. Boot Solutions
    11. 11. Booting From an eXecute In Place Memory <ul><li>XIP Memories used for booting purpose are: </li></ul><ul><ul><li>Embedded Flash (SAM7, SAM9XE) </li></ul></ul><ul><ul><li>External 16-bit Flash (SAM926x, SAM9R(L), SAM9G20…) </li></ul></ul><ul><li>No boot program is executed, no initialization performed </li></ul><ul><li>Whole microcontroller configuration must be made in the application, such as: </li></ul><ul><ul><li>Clocks configuration: Main Oscillator, PLL </li></ul></ul><ul><ul><li>Embedded Flash Controller configuration (Wait States…) </li></ul></ul><ul><ul><li>External Bus Interface configuration (Setup, Hold…) </li></ul></ul>2. Boot Solutions
    12. 12. NVM Memory Bootloader SAM-BA Boot FFPI IAP Function 2 nd Level Bootloader ISP Gang Programmer Interface IAP 2. Boot Solutions Booting from ROM AT91SAM Boot ROM supports numerous applications AT91SAM BootROM
    13. 13. BootROM Applications 2. Boot Solutions X X X - SAM9XE - X X - SAM7SE - X X - SAM7X/XC - X X - SAM7S X X X - SAM7L SAM-BA Boot NVM Bootloader IAP Function FFPI Flash AT91 µC - - X X SAM9G10 - - X X SAM9G20 FlashLess AT91 µC - - X X SAM9R(L)64 - - X X SAM9263 - - X X SAM9G45 X X - - X SAM9261(S) X - - SAM9260
    14. 14. NVM Memory Bootloader Application <ul><li>Contrary to XIP memories, it is not possible to boot directly from a DataFlash, serial Flash, NAND Flash, SDCard or EEPROM </li></ul><ul><li>NVM Memory content must be first copied into memory-mapped RAM and executed there </li></ul><ul><li>NMV Memory Bootloader called “NVM -Boot ” is responsible for this copy </li></ul>Valid Code ? Yes No NVM-Boot Next NVM-Boot Copy code from NVM memory into SRAM Reset Peripherals, remap and execute code out of SRAM No need for external NOR Flash memory ! 1st Level Bootloader 2. Boot Solutions
    15. 15. Supported NVM Memories <ul><li>Serial DataFlash: ATMEL AT45D and AT45DCB </li></ul><ul><li>Serial Flash: Industry’s most advanced 25xxx compatible serial Flash (ATMEL AT25/26, SST, ST, Winbond…) </li></ul><ul><li>SLC NandFlash: 8- and 16-bit, small and large blocks </li></ul><ul><li>SDCard: any FAT12/16/32 formatted SD Cards which are not High Capacity SDHC </li></ul><ul><li>EEPROM: any I²C Memory EEPROM </li></ul>One NVM memory for a whole application !!! 2. Boot Solutions
    16. 16. What is a valid code? <ul><li>SD Card Example : </li></ul><ul><li>boot.bin file in the root directory of any FAT12/16/32 formatted SD Cards </li></ul><ul><li>Code size < AT91SAM internal SRAM size* </li></ul>2. Boot Solutions * Max code size value must be checked in the Boot Program section of each product datasheet
    17. 17. <ul><li>DataFlash, NAND Flash, Serial Flash & EEPROM example: </li></ul><ul><li>The ARM exception vectors must have valid ARM instructions (B or LDR), excluding the 6 th vector </li></ul><ul><li>The 6 th vector ( reserved vector @ 0x14), must correspond to the size of the image to be copied in internal SRAM . </li></ul><ul><li>Code size < AT91SAM internal SRAM size* </li></ul>What is a valid code (cont’d)? Vector 1 Vector 2 Vector 3 Vector 4 Vector 5 Vector 6 Vector 7 Vector 8 ‘ e59’  LDR opcode 00 e59 ff074 04 e59 ff014 08 e59 ff014 0c e59 ff014 10 e59 ff014 14 00000800 18 e59 ff060 1C e59 ff00C ARM exception vectors 2. Boot Solutions * Max code size value must be checked in the Boot Program section of each product datasheet Reset Undefined Instruction Software Interrupt Prefect Abort Data abort Reserved: SIZE OF THE IMAGE Normal interrupt Fast interrupt
    18. 18. NVM Memory Bootloader Support <ul><li>H/W (driven pins, clocks) & S/W (max downloadable code size) constraints can be found in the Boot Program section of the product. </li></ul>2. Boot Solutions X X X X X X X X X X SAM9G20 rev A SAM9G20 rev B - X X - X SAM9R(L)64 rev A - X - X - X - X X X SAM9261(S) rev A SAM9261 rev B X X X X X SAM9G10 rev A X X X X X SAM9G45 rev A - - - - Serial Flash (SPI) - - - X - X X X SAM9263 rev A SAM9263 rev B - - EEPROM (TWI) X X DataFlash (SPI) - - - X SAM9260 rev A SAM9260 rev B Standard SDCard (MCI) SLC NandFlash (EBI) AT91 NVM
    19. 19. No Valid Code Found <ul><ul><li>As soon as valid code is found in a bootable memory, </li></ul></ul><ul><li>the boot ROM sequence is completed. </li></ul>If no valid code is found, what is the next step? 2. Boot Solutions
    20. 20. AT91SAM9R(L)64 Boot ROM Sequence NandFlash-Boot on EBI Chip Select 3 SD Card Boot on MCI DataFlash-Boot on SPI Chip Select 0 SAM-BA Boot 2. Boot Solutions
    21. 21. SAM-BA Boot Application <ul><li>SAM-BA Boot is a little monitor that provides In-System Programming Solutions through different communication channels: </li></ul><ul><ul><li>DBGU Serial port interface </li></ul></ul><ul><ul><li>USB Device port </li></ul></ul><ul><li>Used to interface ISP Software such as SAM-BA GUI. </li></ul><ul><li>Check Boot Program section of the product datasheet for H/W and S/W constraints such as crystals/clocks support. </li></ul>Free AT91 ISP Programming Solutions 2. Boot Solutions
    22. 22. AT91SAM7 L & AT91SAM9XE IAP Function <ul><li>IAP: In Application Programming </li></ul><ul><ul><li>IAP feature is a function located in ROM, that can be called by any software application </li></ul></ul><ul><ul><li>When called, this function sends the desired FLASH command to the EFC and waits for the FLASH to be ready </li></ul></ul><ul><ul><li>Executed from ROM, allows FLASH programming by code running out of FLASH </li></ul></ul><ul><ul><li>This function takes one argument in parameter: the command to be sent to the EFC </li></ul></ul>Ease IAP Development 2. Boot Solutions
    23. 23. FFPI – Fast Flash Programming Interface Application <ul><li>Provides programming solutions for high volume programming, with two interface options </li></ul><ul><ul><li>Serial: JTAG interface </li></ul></ul><ul><ul><li>Parallel: 8-bit (AT91SAM7S16/32) or 16-bit (other AT91SAM) </li></ul></ul>Serial (JTAG) Parallel (8- or 16-bit) Security Bit Must Be Cleared TST=1 H/W Programming Solution For Gang Prog. 2. Boot Solutions
    24. 24. 3. AT91SAM Application Deployment
    25. 25. Standard Application Deployment 1st Level Bootloader (NVM Memory Bootloader) 2nd Level Bootloader (Optional) 3rd Level Bootloader Main Application AT91 Bootstrap U-boot E-boot Linux WinCE Standalone App FLASH Media(s) 3. Application Deployment
    26. 26. <ul><li>Free 2 nd Level Bootloader for AT91SAM9 </li></ul><ul><li>AT91Bootstrap integrates several sets of algorithms: </li></ul><ul><ul><li>Device initialization such as clock speed configuration, PIO settings, SDRAM initialization </li></ul></ul><ul><ul><li>Physical media algorithms such as DataFlash, NAND Flash, etc . </li></ul></ul><ul><li>Loaded thanks to NVM Memory Bootloader located in ROM </li></ul><ul><li>Current Version is 1.11 and is integrated in our software packages </li></ul>AT91 Bootstrap Free 3. Application Deployment In Dev IAR In Dev In Dev I 2 C EEPROM GNU Keil SD Card 25xxx Serial Flash AT45 DataFlash CFI NOR Flash NAND Flash NVM Memory Bootloader Support
    27. 27. Getting Started NVM Boot AT91Bootstrap 0x0000 0x8400 D ATA F LASH AT91Bootstrap SRAM DataFlash Boot SAMBA Boot ROM SDRAM AT91Bootstrap AT91Bootstrap 0x300000 Application 0x20000000 AT91Bootstrap Application Application Current running Application in Red D ATA FL ASH Boot Example 3. Application Deployment DataFlash Boot
    28. 28. NVM Boot NAND FLASH Boot Example SRAM NandFlash-Boot SAMBA Boot ROM SDRAM NandFlash-Boot 0x300000 0x20000000 Current running Application in Red U-Boot 0x0000 0x60000 0x20000 NAND FLASH Linux Kernel AT91Bootstrap AT91Bootstrap Linux Kernel U-Boot AT91Bootstrap U-Boot Linux Kernel 0x22200000 3. Application Deployment
    29. 29. AT91SAM NVM Programming Solutions
    30. 30. <ul><li>Development Tools such as IAR, Keil integrate their own flash loaders utility to flash the application during debug phase </li></ul><ul><li>SAM-BA GUI: Atmel’s Free programming solution for on-chip and on-board memories </li></ul><ul><ul><li>Serial port, USB and JTAG SAM-ICE support </li></ul></ul><ul><ul><li>Graphical or command line interface </li></ul></ul><ul><ul><li>Easy customization to create a custom board, add new memories, etc. </li></ul></ul><ul><li>AT91Boot_DLL.dll: Atmel’s Free solution for customers to create their own GUI Interfaces </li></ul><ul><li>Gang Programmers: support for all AT91SAM flash-based microcontrollers thanks to FFPI </li></ul>NVM Programming Solutions Free Free 4. NVM Programming Solutions
    31. 31. SAM-BA GUI (AT91 ISP) <ul><li>Customizing SAM-BA is possible by adding or modifying TCL scripts files </li></ul><ul><li>Command Line Mode: allows memory programming without any GUI interaction </li></ul>Create your own board Add memory modules Modify Memory Algorithms <ul><li>Enable the NAND Flash, then Use the Sendboot file script </li></ul>4. NVM Programming Solutions
    32. 32. Appendix AT91SAM Boot Program Algorithm Flow Diagrams
    33. 33. AT91SAM7X/XC/SE Boot Sequence No Yes PA0=PA1=1 PA2 = 0 Yes Power Up No Yes FFPI Boot From Flash User Application Boot From ROM SAM-BA Boot Security Bit Must Be Cleared TST = 1 GPNVM2 = 1
    34. 34. AT91SAM7S Boot Sequence No TST = 1 Yes PA0=PA1=1 Power Up PA2 = 1 Yes No Power Up with TST=0 Yes Boot From Flash User Application Boot From Flash SAM-BA Boot SAM-BA Boot Recovery ≈ 10 seconds FFPI Security Bit Must Be Cleared Boot From ROM
    35. 35. SAM-BA Boot Recovery Application ( SAM7S only) <ul><li>AT91SAM7S ROM is not mapped by default </li></ul><ul><li>SAM-BA Boot Recovery Application is responsible for copying SAM-BA Boot into Flash </li></ul><ul><li>10 seconds necessary for the copy </li></ul><ul><li>Needs a power up sequence to run SAM-BA Boot (TST=0) </li></ul>Unlock Sectors 0 & 1 Copy SAM-BA Boot from ROM to FLASH while(1); Security Bit Must Be Cleared TST=1 Power Up
    36. 36. AT91SAM7L Boot Sequence No Yes PC0=PC1=1 Yes Power Up No Yes FFPI Boot From Flash User Application Boot From ROM SAM-BA Boot Security Bit Must Be Cleared IAP Function TST = 1 GPNVM1 = 1
    37. 37. AT91SAM9XE Boot Sequence No Yes Yes Power Up No Yes FFPI Boot From Flash User Application Boot From ROM SAM-BA Boot Security Bit Must Be Cleared IAP Function PA0=PA1=1 PA2 = 0 TST = 1 GPNVM3 = 1
    38. 38. AT91SAM9260 Boot Sequence Power Up BMS = 1 Yes No Boot From ROM DataFlash-Boot on SPI0 Chip Select 1 DataFlash-Boot on SPI0 Chip Select 0 NandFlash-Boot on EBI Chip Select 3 SAM-BA Boot Boot From External Memory on EBI Chip Select 0 User Application Boot From External 16-bit Flash Not Supported On revision A Optional
    39. 39. AT91SAM9261(S) Boot Sequence Power Up BMS = 1 Yes No Boot From ROM DataFlash-Boot on SPI0 Chip Select 0 SerialFlash-Boot on SPI0 Chip Select 0 NandFlash-Boot on EBI Chip Select 3 SAM-BA Boot Boot From External Memory on EBI Chip Select 0 User Application SDCard-Boot on MCI EEPROM-Boot on TWI Boot From External 16-bit Flash Not Supported On revision A Optional
    40. 40. AT91SAM9263 Boot Sequence Power Up BMS = 1 Yes No Boot From ROM Boot From External Memory on EBI0 Chip Select 0 User Application NandFlash-Boot on EBI0 Chip Select 3 SD Card Boot on MCI1 DataFlash-Boot on SPI0 Chip Select 0 SAM-BA Boot Boot From External 16-bit Flash Not Supported On revision A Optional
    41. 41. AT91SAM9R(L)64 Boot Sequence Power Up BMS = 1 Yes No Boot From ROM EBI Chip Select 0 User Application NandFlash-Boot on EBI Chip Select 3 SD Card Boot on MCI DataFlash-Boot on SPI Chip Select 0 SAM-BA Boot Boot From External 16-bit Flash Optional
    42. 42. AT91SAM9G20 Boot Sequence Power Up BMS = 1 Yes No Boot From ROM NandFlash-Boot on EBI Chip Select 3 SAM-BA Boot Boot From External Memory on EBI Chip Select 0 User Application SDCard-Boot on MCI EEPROM-Boot on TWI Boot From External 16-bit Flash SerialFlash-Boot then DataFlash-Boot on SPI0 Chip Select 0 SerialFlash-Boot then DataFlash-Boot on SPI0 Chip Select 1 Optional

    ×