Difference between revisions of "RETRAM internal memory"

[quality revision] [quality revision]
m
 
Template:ArticleMainWriter Template:ArticleApprovedVersion

1 Peripheral overview[edit]

The RETRAM internal memory is 64 Kbytes wide and is physically near to the Arm® Cortex®-M4 for optimized performance from the core. It is located in the VSW power domain, allowing it to be supplied during Standby low power mode, and to retain retention firmware that can be executed very quickly by the Cortex-M4 on wake up from Standby mode.

1.1 Features[edit]

Refer to STM32MP15 reference manuals for the complete feature list, and to the software components introduced below to see which features are actually implemented.

1.2 Security support[edit]

The RETRAM is a secure peripheral (under ETZPC control).

2 Peripheral usage and associated software[edit]

2.1 Boot time[edit]

Linux® remoteproc framework (running on the Cortex-A7) loads the Cortex-M4 firmware to the RETRAM, starting at address 0x00000000. At least, it must load the part of the firmware containing the vector table, since the Cortex-M4 reset entry point is address 0x00000004. The rest of the firmware code is loaded into the MCU SRAM. The overall memory mapping is shown in the platform memory mapping section.

2.2 Runtime[edit]

2.2.1 Overview[edit]

The Cortex-M4 vector table is mapped from address 0x00000000 (so to the RETRAM) at reset, but it can be remapped by software to any other location by means of the vector table offset register (VTOR). Beyond the reset entry point (0x00000004), the exception table also contains the software entries table used by the NVIC to branch the software execution to the right interrupt service routine.

While going to Standby low power mode, the RETRAM can remain supplied, so it can preserve a (small) Cortex-M4 piece of retention firmware that is executed on wake up when the ROM code (running on Cortex-A7) restarts the Cortex-M4.
All these constraints make the RETRAM the minimum (and default) choice for Cortex-M4 firmware.

RETRAM can be allocated to:

  • the Cortex-A7 secure to be used under OP-TEE.

or

or

  • the Cortex-M4 for use with the STM32Cube MPU Package, either for runtime firmware that ca be mapped in both RETRAM and MCU SRAM, or for retention firmware that only fits into the RETRAM, but could have some data in MCU SRAM (keeping in mind that these data are lost while entering Standby low power mode).

2.2.2 Software frameworks[edit]

Internal peripherals software table template

| Core/RAM
| RETRAM
| OP-TEE overview
| Linux reserved memory
| STM32Cube
|
|-
|}

2.2.3 Peripheral configuration[edit]

The configuration is applied by the firmware running in the context to which the peripheral is assigned. The configuration can be done alone via the STM32CubeMX tool for all internal peripherals, and then manually completed (especially for external peripherals), according to the information given in the corresponding software framework article.

2.2.4 Peripheral assignment[edit]

Internal peripherals assignment table template

| rowspan="1" | Core/RAM
| rowspan="1" | RETRAM
| RETRAM
| 
| 
| 
| Assignment (single choice)
|-
|}

3 How to go further[edit]

4 References[edit]



<noinclude>

{{ArticleBasedOnModel | [[Internal peripheral article model]]}}
{{ArticleMainWriter | GeraldB}}
{{ArticleApprovedVersion | GeraldB | FrancoisC, ArnaudP, NathalieS | No previous approved version| PhilipS - 29aug'18 - 8334 | 4Sep'18}}

[[Category:RAM interfaces]]
{{ReviewsComments|JCT 1840: alignment needed with the last version of the model [[Internal peripheral article model]]<br>

[[Category:ToBeAlignedWithModel]]
}}</noinclude>

==Peripheral overview==
The '''RETRAM''' internal memory is 64 Kbytes wide and is physically near to the Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-M4 for optimized performance from the core. It is located in the VSW power domain, allowing it to be supplied during Standby [[Power overview|low power mode]], and to retain retention firmware that can be executed very quickly by the Cortex-M4 on wake up from Standby mode.
===Features===
Refer to [[STM32MP15 resources#Reference manuals|STM32MP15 reference manuals]] for the complete feature list, and to the software components introduced below to see which features are actually implemented.<br>


===Security support===
The RETRAM is a '''secure ''' peripheral (under [[ETZPC_internal_peripheral|ETZPC]] control).

==Peripheral usage and associated software==
===Boot time===
[[Linux remoteproc framework overview|Linux<sup>&reg;</sup> remoteproc framework]] (running on the Cortex-A7) loads the Cortex-M4 firmware to the RETRAM, starting at address 0x00000000. At least, it must load the part of the firmware containing the vector table, since the Cortex-M4 reset entry point is address 0x00000004. The rest of the firmware code is loaded into the [[MCU SRAM internal memory|MCU SRAM]]. The overall memory mapping is shown in the platform [[STM32MP15_RAM_mapping#Zoom in the Cortex-A7/Cortex-M4 shared memory |memory mapping]] section.

===Runtime===
====Overview====
The Cortex-M4 vector table is mapped from address 0x00000000 (so to the RETRAM) at reset, but it can be remapped by software to any other location by means of the vector table offset register (VTOR). Beyond the reset entry point (0x00000004), the exception table also contains the software entries table used by the [[NVIC internal peripheral|NVIC]] to branch the software execution to the right interrupt service routine.<br />
<br>

While going to Standby [[Power overview|low power mode]], the RETRAM can remain supplied, so it can preserve a (small) Cortex-M4 piece of retention firmware that is executed on wake up when the [[STM32MP15 ROM code overview|ROM code]] (running on Cortex-A7) restarts the Cortex-M4. <br>

All these constraints make the RETRAM the minimum (and default) choice for Cortex-M4 firmware.<br>


RETRAM can be allocated to:
* the Cortex-A7 secure to be used under [[OP-TEE overview|OP-TEE]].
or
* the Cortex-A7 non-secure to be used under Linux as [[Reserved memory|reserved memory]].
or
* the Cortex-M4 for use with the STM32Cube MPU Package, either for '''runtime firmware''' that ca be mapped in both RETRAM and [[MCU SRAM internal memory|MCU SRAM]], or for '''retention firmware''' that only fits into the RETRAM, but could have some data in [[MCU SRAM internal memory|MCU SRAM]] (keeping in mind that these data are lost while entering Standby [[Power overview|low power mode]]).

====Software frameworks====
{{:Internal_peripherals_software_table_template}}
 | Core/RAM
 | [[RETRAM internal memory|RETRAM]]
 | [[OP-TEE_overview|OP-TEE overview]]
 | [[Reserved memory|Linux reserved memory]]
 | [[STM32CubeMP1 architecture|STM32Cube]]
 |
 |-
 |}

====Peripheral configuration====
The configuration is applied by the firmware running in the context to which the peripheral is assigned. The configuration can be done alone via the [[STM32CubeMX]] tool for all internal peripherals, and then manually completed (especially for external peripherals), according to the information given in the corresponding software framework article.

====Peripheral assignment====
{{:Internal_peripherals_assignment_table_template}}<onlyinclude>

 | rowspan="1" | Core/RAM
 | rowspan="1" | [[RETRAM internal memory|RETRAM]]
 | RETRAM
 | <span title="assignable peripheral" style="font-size:21px"></span>

 | <span title="assignable peripheral" style="font-size:21px"></span>

 | <span title="assignable peripheral" style="font-size:21px"></span>

 | Assignment (single choice)
 |-</onlyinclude>

 |}
==How to go further==

==References==<references/><noinclude>

[[Category:RAM interfaces]]
{{PublicationRequestId | 8334 | 2018-08-29 | PhilipS}}
{{ArticleBasedOnModel | Internal peripheral article model}}
{{ReviewsComments|JCT 1840: alignment needed with the last version of the model<br>

[[Category:ToBeAlignedWithModel]]
}}</noinclude>
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>
 
{{ArticleBasedOnModel | [[Internal peripheral article model]]}}
 
{{ArticleMainWriter | GeraldB}}
 
{{ArticleApprovedVersion | GeraldB | FrancoisC, ArnaudP, NathalieS | No previous approved version| PhilipS - 29aug'18 - 8334 | 4Sep'18}}
 
 
[[Category:RAM interfaces]]
 
{{ReviewsComments|JCT 1840: alignment needed with the last version of the model [[Internal peripheral article model]]<br>
 
[[Category:ToBeAlignedWithModel]]
 
}}
 
</noinclude>
 
 
 
==Peripheral overview==
 
==Peripheral overview==
 
The '''RETRAM''' internal memory is 64 Kbytes wide and is physically near to the Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-M4 for optimized performance from the core. It is located in the VSW power domain, allowing it to be supplied during Standby [[Power overview|low power mode]], and to retain retention firmware that can be executed very quickly by the Cortex-M4 on wake up from Standby mode.
 
The '''RETRAM''' internal memory is 64 Kbytes wide and is physically near to the Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-M4 for optimized performance from the core. It is located in the VSW power domain, allowing it to be supplied during Standby [[Power overview|low power mode]], and to retain retention firmware that can be executed very quickly by the Cortex-M4 on wake up from Standby mode.
Line 66: Line 55:
 
  |}
 
  |}
   
==How to go further==
+
<noinclude>
 
+
[[Category:RAM interfaces]]
==References==
+
{{PublicationRequestId | 8334 | 2018-08-29 | PhilipS}}
<references/>
+
{{ArticleBasedOnModel | Internal peripheral article model}}
  +
{{ReviewsComments|JCT 1840: alignment needed with the last version of the model<br>
  +
[[Category:ToBeAlignedWithModel]]
  +
}}
  +
</noinclude>