SAMA5D2 Quad SPI (QSPI) Performance. Introduction. SMART ARM-based Microprocessor APPLICATION NOTE

Similar documents
AVR42789: Writing to Flash on the New tinyavr Platform Using Assembly

AT03975: Getting Started with SAM L21. Descripton. Features. SMART ARM-Based Microcontroller APPLICATION NOTE

AT60142H/HT. Rad-Hard 512Kx8 Very Low Power CMOS SRAM ERRATA-SHEET. Active Errata List. Errata History. Abbreviations. 1.

APPLICATION NOTE. AT6486: Using DIVAS on SAMC Microcontroller. SMART ARM-Based Microcontroller. Introduction. Features

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

Smart RF Device Family - Getting Started Guide. Features. Description. References ATAN0115 APPLICATION NOTE

QT3 Xplained Pro. Preface. Atmel QTouch USER GUIDE

ATAES132A Firmware Development Library. Introduction. Features. Atmel CryptoAuthentication USER GUIDE

USER GUIDE. Atmel QT6 Xplained Pro. Preface

AT06467: Getting started with SAM D09/D10/D11. Features. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

AVR42772: Data Logger Demo Application on XMEGA A1U Xplained Pro. Introduction. Features. AVR XMEGA Microcontrollers APPLICATION NOTE

Ethernet1 Xplained Pro

AT11512: SAM L Brown Out Detector (BOD) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

EDBG. Description. Programmers and Debuggers USER GUIDE

APPLICATION NOTE. Atmel QT4 Xplained Pro User Guide ATAN0114. Preface

AT03262: SAM D/R/L/C System Pin Multiplexer (SYSTEM PINMUX) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

QT2 Xplained Pro. Preface. Atmel QTouch USER GUIDE

AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Features. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

APPLICATION NOTE. AT11008: Migration from ATxmega16D4/32D4 Revision E to Revision I. Atmel AVR XMEGA. Introduction. Features

APPLICATION NOTE. Scope. Reference Documents. Software Ethernet Bridge on SAMA5D3/D4. Atmel SMART SAMA5D3/D4 Series

APPLICATION NOTE. Generating Random Secrets. ATSHA204A, ATECC108A, and ATECC508A. Description. Topics

APPLICATION NOTE. AT04470: Differences between SAM D21 Variants A, B, and L. 32-bit Microcontroller. Introduction

This user guide describes how to run the Atmel ATWINC3400 Bluetooth Low Energy (BLE) Provisioning demo from out-of-box conditions.

AT21CS Series Reset and Discovery. Introduction. Serial EEPROM APPLICATION NOTE

ATECC108/ATSHA204 USER GUIDE. Atmel Firmware Library. Features. Introduction

AT10942: SAM Configurable Custom Logic (CCL) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

Hardware Prerequisites Atmel Xplained Pro Evaluation Kit Atmel WINC1500 extension USB Micro Cable (TypeA / MicroB)

USER GUIDE. ATWINC1500 Xplained Pro. Preface

Native route discovery algorithm

ATECC508A Public Key Validation. Introduction. Atmel CryptoAuthentication APPLICATION NOTE

USER GUIDE. Atmel QT1 Xplained Pro. Preface

APPLICATION NOTE. AT05567: TC Capture on External Interrupt with the Event System on SAM D20. Preface ASF PROJECT DOCUMENTATION

APPLICATION NOTE. 3-lead CONTACT Package Usage. ATSHA204A, ATECC108A, and ATECC508A. Introduction. 3-lead CONTACT Package

APPLICATION NOTE. Atmel AT03304: SAM D20 I 2 C Slave Bootloader SAM D20. Description. Features

APPLICATION NOTE. How to Securely Switch Atmel s LIN Transceiver ATA6662/ATA6662C to Sleep Mode ATA6662/ATA6662C. Concerning Atmel ATA6662

OLED display with pixels resolution Ambient light sensor CPU load Analog filter Quadrature Encoder with push button Digital I/O

DGILib USER GUIDE Atmel-42771A-DGILib_User Guide-09/2016

USER GUIDE. Atmel OLED1 Xplained Pro. Preface

APPLICATION NOTE. Atmel AT03160: Migrating Bootloader from ATxmega128A1 to other Atmel XMEGA Devices. Atmel AVR XMEGA. Features.

APPLICATION NOTE. CryptoAuthentication Personalization Guide. ATSHA204A and ATECC508A. Introduction. Features

SAM4 Reset Controller (RSTC)

ATtiny817 QTouch Moisture Demo User Guide. Description. Features. AVR 8-bit Microcontrollers USER GUIDE

USER GUIDE EDBG. Description

AT88CK101 HARDWARE USER GUIDE. Atmel CryptoAuthentication Development Kit. Atmel CryptoAuthentication AT88CK101 Daughterboard

USER GUIDE. Atmel maxtouch Xplained Pro. Preface

I/O1 Xplained Pro. Preface. Atmel MCUs USER GUIDE

Atmel AVR1619: XMEGA-B1 Xplained Demonstration. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR1315: Accessing the XMEGA EEPROM. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Atmel AVR32847: Migration from/to the UC3L0 64/32/16 from/to the UC3L0 256/ bit Atmel Microcontrollers. Application Note.

APPLICATION NOTE. AT03324: Atmel REB212BSMA-EK Quick Start Guide. Atmel MCU Wireless. Introduction

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

APPLICATION NOTE. AT07216: SAM G55 Schematic Checklist. Atmel SMART SAM G55. Introduction

APPLICATION NOTE. Atmel AT03261: SAM D20 System Interrupt Driver (SYSTEM INTERRUPT) SAM D20 System Interrupt Driver (SYSTEM INTERRUPT)

APPLICATION NOTE. Atmel AVR1638: XMEGA RTC Calibration. 8-bit Atmel Microcontrollers. Features. Introduction

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

USER GUIDE. Atmel PROTO1 Xplained Pro. Preface

APPLICATION NOTE. AT06863: SAM4L Peripheral Event Controller (PEVC) SAM4L Peripheral Event Controller (PEVC) ASF PROGRAMMERS MANUAL

ATZB-SAMR21-XPRO. Preface. SmartConnect USER GUIDE

USER GUIDE. Atmel Segment LCD1 Xplained Pro. Preface

AVR1503: Xplain training - XMEGA Programmable Multi Interrupt Controller 8-bit Microcontrollers Application Note Prerequisites

AVR32401: AVR32 AP7 Linux Interfacing DataFlash. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

ATtiny104 Xplained Nano. Preface. AVR 8-bit Microcontrollers USER GUIDE

AT07942: SAM4L Asynchronous Timer (AST) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

64K (8K x 8) Battery-Voltage Parallel EEPROM with Page Write and Software Data Protection AT28BV64B

APPLICATION NOTE. Atmel AVR3009: Driving QTouch Device with I 2 C Interface. Atmel QTouch. Introduction

Atmel ATtiny1634 MCU Atmel ATA SBC LIN transceiver with integrated voltage regulator Touch. Three Atmel QTouch buttons One Atmel QTouch slider

AVR1303: Use and configuration of IR communication module. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AT88RF04C. CryptoRF EEPROM Memory 13.56MHz, 4 Kilobits SUMMARY DATASHEET. Features

a clock signal and a bi-directional data signal (SCL, SDA)

USER GUIDE. ATWILC1000 Getting Started with SAMA5D3 Xplained Board. Atmel SmartConnect. Introduction. Features

OLED display Sensors readout. Light sensor Temperature sensor

RELEASE NOTES. GNU Toolchain for Atmel ARM Embedded Processors. Introduction

AVR32 UC3 Software Framework... User Manual

SMART ARM-based Microcontrollers ATSAMD21E16LMOTOR USER GUIDE

Atmel QT600 Quick Start Guide Touch Solutions

USER GUIDE. Wireless Production Test Reference Protocol Specification Document. Atmel MCU Wireless. Description

Atmel AVR1926: XMEGA-B1 Xplained Getting Started Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR32752: Using the AVR32 UC3 Static Memory Controller. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

USER GUIDE. ZigBit USB Stick User Guide. Introduction

AVR1508: Xplain training - XMEGA DAC 8-bit Microcontrollers Application Note Features 1 Introduction

AT03664: Getting Started with FreeRTOS on SAM D20/D21/R21/L21/L22. Introduction. Features. SMART ARM-based Microcontrollers APPLICATION NOTE

AVR1501: Xplain training XMEGA Timer/Counter 8-bit Microcontrollers Application Note Prerequisites 1 Introduction

APPLICATION NOTE. Atmel AT03782: Using Low Power Modes in SAM4N Microcontroller. Atmel 32-bit Microcontroller. Features.

AT88SC3216CRF. CryptoRF EEPROM Memory 13.56MHz, 32 Kilobits SUMMARY DATASHEET. Features

Atmel ATMXT143E touchscreen controller Capacitive touch ITO 320 x 240 pixel LCD display with SPI interface LED backlight

APPLICATION NOTE. Atmel AVR2131: Lightweight Mesh Getting Started Guide. Atmel MCU Wireless. Features. Description

AVR097: Migration between ATmega128 and ATmega1281/ATmega bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. Atmel AT01080: XMEGA E Schematic Checklist. Atmel AVR XMEGA E. Features. Introduction

Section 5 SERCOM. Tasks SPI. In this section you will learn:

USER GUIDE. ATmega168 Xplained Mini User Guide. Introduction

Atmel LF-RFID Kit Comparison Chart. Application Note. Atmel LF-RFID Kit Comparison Chart. 1. Description

AVR1922: Xplain Board Controller Firmware 8-bit Microcontrollers Application Note Features 1 Introduction

AVR4018: Inertial Two (ATAVRSBIN2) Hardware User's Guide. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

APPLICATION NOTE. Atmel AVR116: Wear Leveling on DataFlash. 32-bit Atmel Microcontrollers. Features. Description. Wear leveling

Atmel AVR ATxmega384C3 microcontroller OLED display with 128x32 pixels resolution Analog sensors. Ambient light sensor Temperature sensor

LBAT90USB162 Atmel. LBAT90USB162 Development Board User s Manual

Atmel and the use of Verilator to create uc Device Models

APPLICATION NOTE. Atmel AVR057: Internal RC Oscillator Calibration for ATtiny4/5/9/10/20/40. 8-bit Atmel Microcontrollers. Features.

How to manage Cortex-M7 Cache Coherence on the Atmel SAM S70 / E70

Transcription:

SMART ARM-based Microprocessor SAMA5D2 Quad SPI (QSPI) Performance APPLICATION NOTE Introduction The Atmel SMART SAMA5D2 Series is a high-performance, powerefficient embedded MPU based on the ARM Cortex -A5 processor. It features 2 Quad SPI (QSPI) interfaces which enable booting from QSPI and executing In Place (XIP) with QSPI. This Application Note describes how to run an RTOS from QSPI, measures the real-time performance of the RTOS, and shows the factors which affect performance. The purpose is to show the performance of QSPI and to provide an option to run a DDR-less system on SAMA5D2. QSPI features: Master SPI Interface Programmable Clock Phase and Clock Polarity Programmable Transfer Delays Between Consecutive Transfers, Between Clock and Data, Between Deactivation and Activation of Chip Select SPI Mode Interface to Serial Peripherals such as ADCs, DACs, LCD Controllers, CAN Controllers and Sensors 8-bit/16-bit/32-bit Programmable Data Length Serial Memory Mode Interface to Serial Flash Memories Operating in Single-bit SPI, Dual SPI and Quad SPI Supports execute In Place (XIP) Code Execution by the System Directly from a Serial Flash Memory Flexible Instruction Register for Compatibility with All Serial Flash Memories 32-bit Address Mode (default is 24-bit address) to Support Serial Flash Memories Larger than 128 Mbit Continuous Read Mode On-The-Fly Scrambling/Unscrambling Connection to DMA Channel Capabilities Optimizes Data Transfers One Channel for the Receiver, One Channel for the Transmitter Register Write Protection

Table of Contents Introduction...1 1. Hardware and Software Environment...3 1.1. SAMA5D2 Xplained Ultra Evaluation Kit... 3 1.2. FreeRTOS Introduction... 3 1.3. Real-time Benchmark: Rhealstone...3 2. SAMA5D2 QSPI Introduction...7 2.1. QSPI SPI Mode... 7 2.2. QSPI Serial Memory Mode...7 3. Running FreeRTOS in QSPI...10 3.1. Cache Setting...10 3.2. SAMA5D2 QSPI Setting for XIP...10 3.3. Frequency Setting... 10 4. Real-time Performance Result...11 4.1. Result Overview...11 5. Result Summary... 18 5.1. Without Cache&MMU...18 5.2. With Cache&MMU...18 6. Revision History...19 2

1. Hardware and Software Environment 1.1. SAMA5D2 Xplained Ultra Evaluation Kit The Atmel SMART SAMA5D2 Xplained Ultra Evaluation Kit ( SAMAD2-XULT in this document) is ideal for evaluating and prototyping the Atmel ARM Cortex-A5-based microprocessors in the SAMA5D2x series. In this Application Note, the SAMA5D2-XULT board is used with the Micron QSPI module N25Q128A13ESE40G. 1.2. FreeRTOS Introduction FreeRTOS is a market-leading, de facto standard and cross-platform Real-Time Operating System (RTOS) offering the following advantages: Single and independent solution for many different architectures and development tools Minimal ROM, RAM and processing overhead. Typically, an RTOS kernel binary image is in the region of 6 to 12 Kbytes. Simplicity - the core of the RTOS kernel is contained in only 3 C files. The.zip file download includes many files, but most relate to the numerous demonstration applications. Comes with a porting, platform development, or application development service should it be required Contains a preconfigured example for each port. No need to figure out how to setup a project - just download and compile Excellent, monitored, and active free support forum Sample documentation provided Very scalable, simple and easy to use For more information and a demo of FreeRTOS, visit www.freertos.org. 1.3. Real-time Benchmark: Rhealstone Rhealstone is a real-time benchmark which was proposed by Rabindra P.Kar and Kent Porter in 1989. [Refer to Kar Rabindra P., Implementing the Rhealstone Real-Time Benchmark, Dr.Dobb s Journal, s 46-55, 100-104, April 1990]. Rhealstone is composed of six operations: Task Switch Time The average time it takes the system to switch between two independent and active tasks with equal priority. 3

Figure 1-1. Task Switch Time Task Pre-emption Time The average time it takes for a task of higher priority to take control of the system from a running task of lower priority. Figure 1-2. Task Pre-emption Time Interrupt Latency The time lapse between the reception of the interrupt request by the CPU and the execution of the first instruction in the interrupt service routine. 4

Figure 1-3. Interrupt Latency Semaphore Shuffling Time The time delay between a task s release of a semaphore until the activation of another task waiting for the semaphore. Figure 1-4. Semaphore Shuffling Time Deadlock Breaking Time The time required by the system to break a deadlock. 5

Figure 1-5. Deadlock Breaking Time Intertask Messaging Latency The time used to send a non zero-length data message from one task to another. Figure 1-6. Intertask Messaging Latency Task Switch Time, Task Pre-emption Time and Interrupt Latency are very important indicators of context switching efficiency and real-time performance of a multi-task system, which is mostly affected by the system CPU s architecture, instruction set, and the memory access speed. Semaphore Shuffling Time, Deadlock Breaking Time and Intertask Messaging Latency are mostly relative to the message communication mechanism of RTOS which is largely determined by the design of the RTOS. Since the aim of this application note is to compare the memory performance among QSPI, SRAM and DDR, we choose the first three Rhealstone operations (Task Switch, Task Pre-emption and Interrupt Latency) to benchmark the performance of memories. 6

2. SAMA5D2 QSPI Introduction 2.1. QSPI SPI Mode The QSPI can be set as normal SPI mode to interface to serial peripherals such as ADCs, DACs, LCD controllers, CAN controllers and sensors. In SPI mode, the QSPI acts as a regular SPI Master. To activate this mode, the SMM bit in Mode Register (QSPI_MR) must be cleared. Data transfers can be performed by interrupt or polling method. The speed can of course be improved by enabling DMA transfer. For a more detailed description on how QSPI works in SPI mode, refer to the product datasheet. 2.2. QSPI Serial Memory Mode The QSPI can also be set as Serial Memory mode to interface to serial Flash memories. The QSPI can control the serial Flash by specific commands and can also allow the CPU to execute the code from the serial Flash (XIP, or execute In Place). In this mode, provided the TFRTYP field in QSPI_IFR register is correctly set to either TRSFR_READ or TRSFR_WRITE: If QSPI_MR.SMRM = 0, data can be read or written directly to the QSPI memory space (0x9000_0000~0x9800_0000 and 0xD000_0000~0xD800_0000) If QSPI_MR.SMRM = 1, data can be read or written by accessing QSPI_RDR or QSPI_TDR (refer to "Instruction Frame Transmission" in section Quad Serial Peripheral Interface (QSPI) of the SAMA5D2 datasheet) 2.2.1. Serial Flash Memory Control In order to control serial Flash memories, the QSPI is able to send instructions via the SPI bus (ex: READ, PROGRAM, ERASE, LOCK, etc.). Because the instruction set implemented in serial Flash memories is memory vendor-dependent, the QSPI includes a complete Instruction Frame Register (QSPI_IFR), which makes it very flexible and compatible with all serial Flash memories. An instruction frame includes: An instruction code (size: 8 bits). The instruction is optional in some cases (such as Continuous Read mode) An address (size: 24 bits or 32 bits). The address is optional but is required by instructions such as READ, PROGRAM, ERASE, LOCK. By default the address is 24 bits long, but it can be 32 bits long to support serial Flash memories larger than 128 Mbits (16 Mbytes). An option code (size: 1/2/4/8 bits). The option code is not required, but it is useful to activate the Memory XIP mode or the Continuous Read mode (see Sub-section "Continuous Read Mode" in Section Quad SPI Interface (QSPI) of the SAMA5D2 datasheet) for READ instructions, in some serial Flash memory devices. These modes improve the data read latency. Dummy cycles. Dummy cycles are optional but required by some READ instructions. Data bytes. Data bytes are optional, but can be used for data transfer instructions such as READ or PROGRAM. Refer to the following figure. 7

Figure 2-1. Typical Instruction Frame Transfer Waveform In Serial Memory mode, QSPI is compatible with three protocols: Single-Bit SPI: communicate with external memory with IO0 Dual SPI: communicate with external memory with IO0 and IO1 Quad SPI: communicate with external memory with IO0, IO1, IO2 and IO3 For SAMA5D2, when communicating with external memory, the instruction, address and data can be set to use different modes which is configured in the Instruction Frame register (QSPI_IFR). There are in total seven combinations, as follows: Table 2-1. WIDTH: Width of Instruction Code, Address, Option Code and Data Value Name Description 0 SINGLE_BIT_SPI Instruction: Single-bit SPI / Address-Option: Single-bit SPI / Data: Single-bit SPI 1 DUAL_OUTPUT Instruction: Single-bit SPI / Address-Option: Single-bit SPI / Data: Dual SPI 2 QUAD_OUTPUT Instruction: Single-bit SPI / Address-Option: Single-bit SPI / Data: Quad SPI 3 DUAL_IO Instruction: Single-bit SPI / Address-Option: Dual SPI / Data: Dual SPI 4 QUAD_IO Instruction: Single-bit SPI / Address-Option: Quad SPI / Data: Quad SPI 5 DUAL_CMD Instruction: Dual SPI / Address-Option: Dual SPI / Data: Dual SPI 6 QUAD_CMD Instruction: Quad SPI / Address-Option: Quad SPI / Data: Quad SPI For detailed information on how to transfer instruction, address and data with external memory, refer to the SAMA5D2 Datasheet. 2.2.2. SAMA5D2 execute In Place (TFRTYP = 1) By sending an instruction with DATAEN=1 and TFRTYP=1 in QSPI_IFR, the user can access the serial memory data at a random address, allowing the CPU to execute code directly from the serial memory (XIP) without code shadowing to RAM. The serial Flash memory mapping is seen in the system as other memories such as ROM, SRAM, DRAM, embedded Flash memory, etc. 8

2.2.3. Continuous Read Mode The QSPI is compatible with the Continuous Read mode which is implemented in some serial Flash memories. In Continuous Read mode, the instruction overhead is reduced by excluding the instruction code from the instruction frame. When the mode is activated, the instruction code is stored in the memory. For the next instruction frames, the instruction code is not required as the memory used the stored one. The addresses of the system bus read are often non-sequential and this leads to many instruction frames that have the same instruction code. By disabling the sending of the instruction code, the Continuous Read mode reduces the access time of the data. When the SAMA5D2 is set in XIP mode (TFRTYP = 1), working with continuous Read mode can greatly help to improve performance. 9

3. Running FreeRTOS in QSPI Follow the instruction provided at the following link to download the FreeRTOS demo: http://www.freertos.org/a00104.html FreeRTOS V8.2.3 is used in this Application Note. The demo can be found in directory: FreeRTOS\Demo\CORTEX_A5_SAMA5D3x_Xplained_IAR to SAMA5D2. The demo project is attached to this Application Note with the User Guide. 3.1. Cache Setting Cache (L1 and L2) effect to the real-time performance is considered. Performance was measured under two conditions: without Cache&MMU and with Cache&MMU. Refer to softpack: softpack\target\sama5d2\ 3.2. SAMA5D2 QSPI Setting for XIP To execute directly from the QSPI memory, the ICF files (IAR Linker Configuration File) must be customized as described in the softpack for the IAR and GCC tool chain: softpack\target \sama5d2\toolchain The QSPI registers must be set as described in the softpack when the SAMA5D2 is set to XIP mode. 3.3. Frequency Setting Normally, the QSPI clock setting is done by the ROM Code and there is no need for the customer to set the QSPI clock. However, for some application we also researched the effect of the QSPI clock on performance. The customer can call function qsip_set_baudrate(qspi *qspi, uint32_t baudrate) to set the QSPI clock. This function is defined in file qspi.c, available in the softpack (softpack\drivers\peripherals\). 10

4. Real-time Performance Result 4.1. Result Overview This project uses three Rhealstone benchmark items (Task Switch, Task Pre-emption, and Interrupt Latency) on three types of memory: QSPI SRAM DDR3L (MT41K128M16JT) with two types of setting: with Cache&MMU and without Cache&MMU. The benchmark results are represented by clock cycles used for each single operation for the benchmark, e.g., clock cycles for task switch once, clock cycles for task pre-emption once, or clock cycles for one interrupt latency. Clock cycles are used to represent the time because it is unique for all system clock settings. The less the number of clock cycles, the better the performance. Table 4-1. Benchmark Result Overview Clock Cycle Compared Memory Types Memory Type Benchmark Loops DDR3L QSPI SRAM QSPI/SRAM QSPI/DDR3L 1 50000 1 50000 1 50000 1 50000 1 50000 Cache&MMU 1824 1080 7248 1040 1488 1029 4.87 1.01 3.97 0.96 2880 1539 12240 1540 2688 1538 4.55 1.00 4.25 1.00 task-switch 1008 560 3648 560 960 560 3.80 1.00 3.62 1.00 No Cache&MMU interruptlatency taskpreempt interruptlatency taskpreempt 8736 9037 49200 55200 4944 5097 9.95 10.83 5.63 6.11 57504 44264 2E+05 2E+05 31104 23878 7.86 9.78 4.25 5.28 task-switch 17808 13912 71568 62365 8832 7395 8.10 8.43 4.02 4.48 Note: 1. Benchmark Loops: Interrupt Latency: the time between the trigger of an interrupt and the execution of the first code in the interrupt routine. Task Pre-emption: running 50000 times of benchmark, including 49999 times of task preemption. Task Switch: running 50000 times of benchmark, including 50000*2-1=99999 times of task switch. 11

2. Cache&MMU: I/D Cache, L2 Cache and MMU are all enabled. 3. No Cache&MMU: I/D Cache, L2 Cache and MMU are all disabled. 4. Cache Miss: when Cache&MMU is enabled, running benchmark 1 loop. 5. Cache Hit: when Cache&MMU is enabled, running benchmark more than 1 loop. 4.1.1. QSPI Clock Effect on Performance When Cache&MMU is disabled, or when Cache miss The faster the QSPI clock is, the better the QSPI performance. As shown in the following two diagrams, the QSPI performance is proportional to QSPI clock. 12

Figure 4-1. SPCK Effect on QSPI Performance when Cache&MMU Disabled Figure 4-2. SPCK Effect on QSPI Performance when Cache Miss When Cache hit QSPI performance remains stable no matter what the SPCK is. The reason is that the benchmark code size is in the range of Cache which can be executed directly from Cache after it is loaded from QSPI to Cache the first time. 13

Figure 4-3. SPCK Effect on QSPI Performance when Cache Hit 4.1.2. Performance QSPI vs. SRAM vs. DDR3L When Cache&MMU is disabled, or when Cache miss The time used for each benchmark item is stable for a fixed type of memory (QSPI, SRAM or DDR3L), which is only affected by the memory speed. When Cache miss, QSPI performance is greatly boosted, but its speed is still slower than SRAM and DDR3L. Details are shown in Table "Benchmark Result Overview". When Cache hit Performance is greatly boosted for the three types of memory, especially QSPI. The benchmark result of QSPI is the same as that of SRAM and DDR3L because all the code is executed from Cache. The following diagrams show the results of benchmark times on three different memories (QSPI, DDR3L and SRAM) under two conditions (without I/D Cache&MMU, with I/D Cache&MMU): 14

Figure 4-4. Task Switch Time Diagram Note: 1. Row 55.3-1 means the task switch is run once (QSPI SPCK@55.3 MHz). 2. Row 55.3-99999 means the benchmark item is run 50000 times, which includes 99999 times of task switch operation, and gets the average performance (QSPI SPCK@55.3 MHz). 15

Figure 4-5. Task Pre-emption Time Diagram Note: 1. Row 1 means the task switch is run once (QSPI SPCK@55.3 MHz). 2. Row 49999 means the benchmark item is run 50000 times, which includes 49999 times of task switch operation, and gets the average performance (QSPI SPCK@55.3 MHz). 16

Figure 4-6. Interrupt Latency Diagram Note: 1. Row 55.3-1 means the interrupt is generated once (QSPI SPCK@55.3 MHz). 2. Row 55.3-50000 means the interrupt is generated 50000 times and gets the average latency (QSPI SPCK@55.3 MHz). 17

5. Result Summary 5.1. Without Cache&MMU QSPI performance is proportional to its clock (SPCK). QSPI performance is about 10%~12% of SRAM. QSPI performance is about 20%~26% of DDR3. 5.2. With Cache&MMU When Cache miss: QSPI performance can improve by about 7~20 times (compared with No Cache&MMU). QSPI performance still lower than SRAM and DDR3, which is about 20% to 26% of SRAM and 23%~27% of DDR3. When Cache hit: QSPI performance boost about 50~150 times (compared with No Cache&MMU). QSPI performance equal to SRAM and DDR3. So we can reach the conclusion that if the executed code size can fit in Cache, the performance of QSPI can compete with DDR or SRAM, which is a good choice to run a small size application with a DDR-less system. 18

6. Revision History Table 6-1. Revision History Doc. Rev. Date Changes A 4-Aug-16 First release 19

Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 www.atmel.com 2016 Atmel Corporation. / Rev.: Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, test and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. ARM is a registered trademark of ARM Ltd. Other terms and product names may be trademarks of others. DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death ( Safety-Critical Applications ) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.