The Cortex-M7 is a high-performance microcontroller (MCU) core designed by ARM. It is part of the Cortex-M series of cores targeted for embedded and Internet of Things (IoT) applications requiring high computation capabilities.
The Cortex-M7 core has configurable memory architecture to meet the needs of different applications. The key memory features are:
- Up to 1MB of embedded flash memory
- Up to 1MB of embedded SRAM
- External memory interface for additional memory
Embedded Flash Memory
The Cortex-M7 has an embedded flash memory block of up to 1MB in size. Flash memory is non-volatile, meaning it retains data even when power is removed. It is used for storing code and data that needs to persist across power cycles.
The embedded flash memory is part of the Cortex-M7 system and tightly integrated with the core, giving low latency access. For example, the STM32F756 series MCUs based on Cortex-M7 provide flash memory options from 512KB to 1MB.
The embedded flash allows executing code directly from flash (XIP or eXecute In Place). This avoids having to copy the code to RAM for execution, saving memory. The Cortex-M7 includes instruction and data caches to boost execution performance when running XIP code.
Embedded SRAM
In addition to flash memory, the Cortex-M7 integrates up to 1MB of SRAM (static random access memory). SRAM provides fast access for data storage and scratchpad operations.
The embedded SRAM is located in the Cortex-M7 system tightly coupled to the core for low latency access. For example, the STM32H743 MCU provides up to 1MB of embedded SRAM.
The SRAM provides data and instruction storage needed for program execution. It operates as a read-write memory allowing much faster access compared to flash. The SRAM memory space is also used for CPU registers, stack allocation, and other transient data.
External Memory Interface
While the Cortex-M7 supports up to 1MB each of embedded flash and SRAM, many applications require significantly higher memory capacity. For this, the Cortex-M7 includes an external memory interface to connect to additional memory chips or modules.
The external memory interface is highly configurable and supports various types of memories like SRAM, PSRAM, flash, and SDRAM. It uses a bus architecture to connect to external memories and has dedicated control signals.
For example, the STM32H743 MCU allows adding external memories using its flexible memory controller. This includes support for external SDRAM up to 32MB in size. Such large memory capacity is useful for data-intensive applications.
External Flash Memory
The Cortex-M7 can interface with additional flash memory ICs through its external memory interface. For instance, the Cypress PSoC 6 Cortex-M4 based MCUs allow adding an external flash chip using Quad-SPI for memory expansion.
The external flash memory can store code and large data sets. It provides non-volatile storage that persists across power cycles. External flash is useful when the embedded flash capacity is insufficient for application code size.
External SRAM
For applications needing a large working memory for data, external SRAM can be added. SRAM provides fast read-write access necessary for buffering data during processing. It can be used as a frame buffer for graphics processing as an example.
The Cortex-M7 memory interface supports connecting to higher density SRAM chips. For instance, the NXP iMXRT1050 EVK board includes a 64MB external SRAM chip for memory expansion.
External PSRAM
In addition to static RAM, the Cortex-M7 can interface with pseudo-SRAM (PSRAM) externally. PSRAM provides SRAM functionality at higher densities and lower cost compared to discrete SRAM chips.
The Cortex-M7 memory interface includes support for PSRAM specific control signals. PSRAM densities going up to 64MB can be supported for large working memory requirements.
External SDRAM
Synchronous DRAM (SDRAM) memory can also be added externally to the Cortex-M7 MCU. SDRAM provides very high memory capacity for data-intensive processing. The Cortex-M7 memory interface is configurable to support different SDRAM modes and clocking.
For example, the STM32H743 MCU can interface with up to 32MB of external SDRAM. The SDRAM can be used as program memory as well as large data buffers or frame buffers.
Memory Options Summary
In summary, the Cortex-M7 microcontroller core supports the following memory options:
- Up to 1MB embedded flash for storing code and data.
- Up to 1MB embedded SRAM for fast access data and scratchpad memory.
- External memory interface to add more flash, SRAM, PSRAM, and SDRAM.
The flexible memory architecture allows the Cortex-M7 to meet the needs of a wide range of embedded applications – from memory constrained IoT edge nodes to data-intensive cloud connected devices requiring maximum memory.
Cortex-M7 Memory Features
Beyond just the memory capacity, the Cortex-M7 architecture includes several features to optimize memory access performance:
- Caches – Separate instruction and data caches to accelerate access to frequently used code and data.
- Prefetch buffers – Instruction prefetch units minimize stalls during sequential code execution.
- Multilayer AHB bus matrix – High bandwidth interconnect between CPU and internal/external memories.
- DMA controllers – Allow autonomous memory transfers without CPU involvement.
- Memory protection units (MPUs) – Improve robustness and security by enforcing memory access rules.
These features maximize performance when accessing the different memory blocks, both internal and external. There are also dedicated hardware blocks for accelerating encryption, decryption, hashing, and other security algorithms.
Example Cortex-M7 Devices
Several semiconductor vendors provide Cortex-M7 based microcontroller units (MCUs) with different memory configurations:
- STM32F756 – Up to 1MB flash, 320KB SRAM, external memory interface.
- STM32H743 – Up to 2MB flash, 1MB SRAM, 32MB SDRAM interface.
- Cypress PSoC 64 – Up to 1MB flash, 256KB SRAM, external Quad-SPI flash.
- NXP iMXRT1050 – 512KB flash, 256KB SRAM, 64MB external SRAM.
These represent a sampling of MCUs using the Cortex-M7 core with different memory capacities targeting various applications – from IoT endpoints to advanced industrial systems.
Use Cases Enabled by Cortex-M7 Memory
The Cortex-M7 memory architecture enables advanced applications in various domains including:
- Industrial Automation – Programmable logic controllers, robotics, motor control.
- Medical – Imaging systems, patient monitors, analyzers.
- Automotive – Autonomous driving systems, infotainment, telematics.
- Consumer – High-end wearables, smart home hubs, surveillance systems.
- Aerospace and Defense – Navigation systems, radar and sonar processing.
These applications require both code space as well as data and frame buffer memory. The Cortex-M7 configurable memory architecture allows system designers to meet the memory needs for such advanced use cases.
Conclusion
In summary, the Cortex-M7 microcontroller core provides a flexible memory system tailored for advanced embedded applications. The key highlights are:
- Up to 1MB each of embedded flash and SRAM integrated in the core.
- External memory interface to add more memory as needed.
- Features to optimize memory access performance.
- Allows creating microcontroller designs with memory capacity ranging from a few KB to several MB.
The highly configurable memory architecture enables the Cortex-M7 to serve a wide range of use cases from deeply embedded to highly data-intensive applications.