deleted>Frq08988 mNo edit summary |
Registered User mNo edit summary |
||
(24 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{ApplicableFor | ||
{{ | |MPUs list=STM32MP13x, STM32MP15x | ||
|MPUs checklist=STM32MP13x,STM32MP15x, STM32MP25x | |||
}}</noinclude> | |||
</noinclude> | |||
==Article purpose== | ==Article purpose== | ||
The purpose of this article is to | The purpose of this article is to: | ||
* briefly introduce the QUADSPI peripheral and its main features | * briefly introduce the QUADSPI peripheral and its main features, | ||
* indicate the | * indicate the peripheral instances assignment at boot time and their assignment at runtime (including whether instances can be allocated to secure contexts), | ||
* list the software frameworks and drivers managing the peripheral, | |||
* explain | * explain how to configure the peripheral. | ||
==Peripheral overview== | ==Peripheral overview== | ||
The | The '''QUADSPI''' peripheral interfaces the processor with serial NOR flash and serial NAND flash memories. <br /> | ||
It supports: | It supports: | ||
* Single, | * Single, Dual- or Quad-SPI flash memories | ||
* A dual-flash mode, allowing to | * A dual-flash mode, allowing to aggregate two flash memories into a virtual-single one | ||
* Dual data rate and memory-mapped modes. | * Dual data rate and memory-mapped modes. | ||
Refer to the [[STM32 MPU resources#Reference manuals|STM32 MPU reference manuals]] for the complete list of features, and to the software frameworks and drivers, introduced below, to see which features are implemented. | |||
Refer to [[ | |||
== | ==Peripheral usage== | ||
This chapter is applicable in the scope of the '''OpenSTLinux BSP''' running on the Arm<sup>®</sup> Cortex<sup>®</sup>-A processor(s), and the '''STM32CubeMPU Package''' running on the Arm<sup>®</sup> Cortex<sup>®</sup>-M processor. | |||
== | ===Boot time assignment=== | ||
=== | ====On {{MicroprocessorDevice | device=1}}==== | ||
QUADSPI instance is boot device that | QUADSPI instance is a boot device that supports serial boot for flash programming with [[STM32CubeProgrammer]]. | ||
{{#lst:STM32MP1_internal_peripherals_assignment_table_template|stm32mp1_boottime}} | |||
<section begin=stm32mp13_boottime /><section begin=stm32mp15_boottime /> | |||
| rowspan="1" | Mass storage | |||
| rowspan="1" | [[QUADSPI internal peripheral|QUADSPI]] | |||
| QUADSPI | |||
| <span title="system peripheral" style="font-size:21px">✓</span> | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| | |||
|- | |||
<section end=stm32mp13_boottime /><section end=stm32mp15_boottime /> | |||
|} | |||
===Runtime=== | ===Runtime assignment=== | ||
==== | ====On {{MicroprocessorDevice | device=13}}==== | ||
{{#lst:STM32MP1_internal_peripherals_assignment_table_template|stm32mp13_runtime}} | |||
<section begin=stm32mp13_runtime /> | |||
| rowspan="1" | Mass storage | |||
| rowspan="1" | [[QUADSPI internal peripheral|QUADSPI]] | |||
| QUADSPI | |||
| <span title="assignable peripheral but not supported" style="font-size:21px">⬚</span> | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| Assignment (single choice) | |||
|- | |||
<section end=stm32mp13_runtime /> | |||
|} | |||
====On {{MicroprocessorDevice | device=15}}==== | |||
{{#lst:STM32MP1_internal_peripherals_assignment_table_template|stm32mp15_runtime}} | |||
<section begin=stm32mp15_runtime /> | |||
| rowspan="1" | Mass storage | |||
| rowspan="1" | [[QUADSPI internal peripheral|QUADSPI]] | |||
| QUADSPI | |||
| | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| Assignment (single choice) | |||
|- | |||
<section end=stm32mp15_runtime /> | |||
|} | |||
==Software frameworks and drivers== | |||
Below are listed the software frameworks and drivers managing the QUADSPI peripheral for the embedded software components listed in the above tables. | |||
== | * '''Linux<sup>®</sup>''': [[MTD overview|MTD framework]] and driver ({{CodeSource | Linux kernel | drivers/spi/spi-stm32-qspi.c}}) | ||
The | * '''STM32Cube''': [[STM32CubeMP15 Package architecture|QUADSPI HAL driver]] and {{CodeSource | STM32CubeMP1 | Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_hal_qspi.h | header file of QUADSPI HAL module}} | ||
* '''TF-A BL2''': MTD frameworks ({{CodeSource | TF-A | drivers/mtd/}}) and driver ({{CodeSource | TF-A | drivers/st/spi/stm32_qspi.c}}) | |||
* '''U-Boot''': MTD frameworks ({{CodeSource | U-Boot | drivers/mtd/}}) and drivers ({{CodeSource | U-Boot | drivers/spi/stm32_qspi.c}}) | |||
==How to assign and configure the peripheral== | |||
The peripheral assignment can be done via the [[STM32CubeMX]] graphical tool (and manually completed if needed).<br /> | |||
This tool also helps to configure the peripheral: | |||
* partial device trees (pin control and clock tree) generation for the OpenSTLinux software components, | |||
* HAL initialization code generation for the STM32CubeMPU Package. | |||
The configuration is applied by the firmware running in the context in which the peripheral is assigned. | |||
For Linux kernel configuration, | For Linux kernel configuration, refer to [[QUADSPI device tree configuration]]. | ||
<noinclude> | |||
[[Category:Mass storage peripherals]] | |||
< | {{ArticleBasedOnModel | Internal peripheral article model}} | ||
{{PublicationRequestId | 24667| 2022-09-26}} | |||
</noinclude> | |||
< |
Latest revision as of 14:53, 4 January 2024
1. Article purpose
The purpose of this article is to:
- briefly introduce the QUADSPI peripheral and its main features,
- indicate the peripheral instances assignment at boot time and their assignment at runtime (including whether instances can be allocated to secure contexts),
- list the software frameworks and drivers managing the peripheral,
- explain how to configure the peripheral.
2. Peripheral overview
The QUADSPI peripheral interfaces the processor with serial NOR flash and serial NAND flash memories.
It supports:
- Single, Dual- or Quad-SPI flash memories
- A dual-flash mode, allowing to aggregate two flash memories into a virtual-single one
- Dual data rate and memory-mapped modes.
Refer to the STM32 MPU reference manuals for the complete list of features, and to the software frameworks and drivers, introduced below, to see which features are implemented.
3. Peripheral usage
This chapter is applicable in the scope of the OpenSTLinux BSP running on the Arm® Cortex®-A processor(s), and the STM32CubeMPU Package running on the Arm® Cortex®-M processor.
3.1. Boot time assignment
3.1.1. On STM32MP1 series
QUADSPI instance is a boot device that supports serial boot for flash programming with STM32CubeProgrammer.
Click on to expand or collapse the legend...
Domain | Peripheral | Boot time allocation | Comment ![]() | |||
---|---|---|---|---|---|---|
Instance | Cortex-A7 secure (ROM code) |
Cortex-A7 secure (TF-A BL2) |
Cortex-A7 non-secure (U-Boot) | |||
Mass storage | QUADSPI | QUADSPI | ✓ | ☐ | ☐ |
3.2. Runtime assignment
3.2.1. On STM32MP13x lines 
Click on to expand or collapse the legend...
Domain | Peripheral | Runtime allocation | Comment ![]() | ||
---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) | |||
Mass storage | QUADSPI | QUADSPI | ⬚ | ☐ | Assignment (single choice) |
3.2.2. On STM32MP15x lines 
Click on to expand or collapse the legend...
Domain | Peripheral | Runtime allocation | Comment ![]() | |||
---|---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) |
Cortex-M4 (STM32Cube) | |||
Mass storage | QUADSPI | QUADSPI | ☐ | ☐ | Assignment (single choice) |
4. Software frameworks and drivers
Below are listed the software frameworks and drivers managing the QUADSPI peripheral for the embedded software components listed in the above tables.
- Linux®: MTD framework and driver (drivers/spi/spi-stm32-qspi.c )
- STM32Cube: QUADSPI HAL driver and header file of QUADSPI HAL module
- TF-A BL2: MTD frameworks (drivers/mtd/ ) and driver (drivers/st/spi/stm32_qspi.c )
- U-Boot: MTD frameworks (drivers/mtd/ ) and drivers (drivers/spi/stm32_qspi.c )
5. How to assign and configure the peripheral
The peripheral assignment can be done via the STM32CubeMX graphical tool (and manually completed if needed).
This tool also helps to configure the peripheral:
- partial device trees (pin control and clock tree) generation for the OpenSTLinux software components,
- HAL initialization code generation for the STM32CubeMPU Package.
The configuration is applied by the firmware running in the context in which the peripheral is assigned.
For Linux kernel configuration, refer to QUADSPI device tree configuration. Template:ArticleBasedOnModel