Arm Cortex-M4

Revision as of 11:50, 6 January 2021 by Registered User (→‎Peripheral configuration)

1. Article purpose[edit source]

The purpose of this article is to:

  • briefly introduce the Arm® Cortex®-M4 core and its main features
  • indicate the level of security supported by this processor

2. Peripheral overview[edit source]

The Arm Cortex-M4 is seen as a coprocessor on STM32MP15, where the Arm Cortex-A7 is the main processor that controls it. The Cortex-M4 is present across all the STM32MP15x lines.

2.1. Features[edit source]

The Cortex-M4 is a 32 bits processor that belongs to Armv7E-M architecture family. Armv7E-M corresponds to the ARMv7-M architecture, with DSP extension. Among a wide range of features, it includes a memory protection unit (MPU) and single-precision floating point unit (FPU).

Refer to the STM32MP15 reference manuals for the complete list of features.

2.2. Security support[edit source]

The Cortex-M4 does not support secure mode (Arm Trustzone) : it only supports a non-secure mode that is defining the Cortex-M4 non-secure hardware execution context.

3. Peripheral usage and associated software[edit source]

3.1. Boot time[edit source]

The STM32CubeMP1 package execution startup on the Cortex-M4 coprocessor is controlled by the Cortex-A7, that is running the OpenSTLinux distribution.

The coprocessor startup can be done at two different stages of the boot chain:

3.2. Runtime[edit source]

3.2.1. Overview[edit source]

The Cortex-M4 is running STM32CubeMP1 package.

The Cortex-M4 operates as a coprocessor, either autonomously like any external microcontroller (such as a STM32F4) could do, or communicating with the main processor (Cortex-A7) via RPMsg communication pipe.

3.2.2. Software frameworks[edit source]

Domain Peripheral Software frameworks Comment
Cortex-A7
secure
(OP-TEE)
Cortex-A7
non-secure
(Linux)
Cortex-M4

(STM32Cube)
Ecosystem Cortex-M4 STM32CubeMP1 package

3.2.3. Peripheral configuration[edit source]

The Cortex-M4 configuration is done in two times:

  • As the main processor of the system, the Cortex-A7 (running OpenSTLinux distribution) is the first one taking care of all the system resources initialization : supplies, clock tree, etc.
  • Then, the STM32CubeMP1 package takes care of all the Cortex-M4 local configuration (NVIC, MPU, etc.) and it can rely on the resource manager to modify system resources without interfering with the Cortex-A7

3.2.4. Peripheral assignment[edit source]

The Cortex-M4 is the Cortex-A7's coprocessor, so it cannot be assigned but it is managing all the peripherals assigned to its context.


4. How to go further[edit source]

Refer to Arm website[1] for more detailled information on this core.

5. References[edit source]