Registered User mNo edit summary |
Registered User mNo edit summary |
||
(32 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{ApplicableFor | ||
{{ | |MPUs list=STM32MP13x,STM32MP15x | ||
|MPUs checklist=STM32MP13x, STM32MP15x | |||
}}</noinclude> | |||
}} | |||
</noinclude> | |||
==Peripheral overview== | ==Peripheral overview== | ||
The '''EXTI''' peripheral is used to get an interrupt when a GPIO is toggling. It can also wake up the system from Stop [[Power overview|low power mode]], by means of the [[PWR internal peripheral]] when a wake up event occurs, before (eventualy - see the note below) propagating an interrupt to the client processor (Cortex-A7 [[GIC internal peripheral|GIC]] or Cortex-M4 [[NVIC internal peripheral|NVIC]]). The wake up events can be internal (from other IPs clocked by the LSE, LSI or HSI from [[RCC internal peripheral|RCC]]), or external (from [[GPIO internal peripheral|GPIO]]).<br /><br /> | The '''EXTI''' peripheral is used to get an interrupt when a GPIO is toggling. It can also wake up the system from Stop [[Power overview|low power mode]], by means of the [[PWR internal peripheral]] when a wake up event occurs, before (eventualy - see the note below) propagating an interrupt to the client processor (Cortex-A7 [[GIC internal peripheral|GIC]] or Cortex-M4 [[NVIC internal peripheral|NVIC]] in case of STM32MP15). The wake up events can be internal (from other IPs clocked by the LSE, LSI or HSI from [[RCC internal peripheral|RCC]]), or external (from [[GPIO internal peripheral|GPIO]]).<br /><br /> | ||
Notice that: | Notice that: | ||
* Up to 16 GPIO pins can be configured as external interrupts: for each index between 0 and 15, one EXTI can be selected among all banks (EXTI<index> = GPIO<one_bank><index>). | * Up to 16 GPIO pins can be configured as external interrupts: for each index between 0 and 15, one EXTI can be selected among all banks (EXTI<index> = GPIO<one_bank><index>). | ||
* The 16 GPIO and | * '''On {{MicroprocessorDevice | device=13}}''': The 16 GPIO and one internal peripheral events ( AVD/PVD), can generate interrupts connected to the GIC. All the other internal peripheral events can wake up the system, but the EXTI does not generate any interrupt to the GIC; in such cases, another peripheral interrupt has to be used as a trigger via the GIC. | ||
* '''On {{MicroprocessorDevice | device=15}}''': The 16 GPIO and 5 internal peripheral events (AVD/PVD, CPU1 SEV, CPU2 SEV, WWDG1 reset, CPU2 SYSRESETREQ) can generate interrupts connected to the GIC and NVIC. All the other internal peripheral events can wake up the system, but the EXTI does not generate any interrupt to the GIC or NVIC for them; in such cases, another peripheral interrupt has to be used as a trigger via the GIC or NVIC. | |||
===Features=== | ===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 implemented.<br> | Refer to [[STM32MP13 resources#Reference manuals|STM32MP13 reference manuals]] or [[STM32MP15 resources#Reference manuals|STM32MP15 reference manuals]] for the complete feature list, and to the software components, introduced below, to see which features are implemented.<br> | ||
===Security support=== | ===Security support=== | ||
Line 25: | Line 18: | ||
==Peripheral usage and associated software== | ==Peripheral usage and associated software== | ||
===Boot time=== | ===Boot time=== | ||
The EXTI is not used by the boot chain, but is configured during Linux initialization. Since wake-up event configuration is done via register bit-field reads and writes, concurrent accesses from Linux and the | The EXTI is not used by the boot chain, but is configured during Linux initialization.<br> | ||
==== On {{MicroprocessorDevice | device=15}} ==== | |||
Since wake-up event configuration is done via register bit-field reads and writes, concurrent accesses from Linux and the coprocessor are not possible at boot time: | |||
* Linux configures all EXTI events during their respective consumer driver probing | * Linux configures all EXTI events during their respective consumer driver probing | ||
* The | * The coprocessor uses the [[Resource manager for coprocessing|resource management]] mechanisms to request and configure the EXTI events it needs. | ||
===Runtime=== | ===Runtime=== | ||
====Overview==== | ====Overview==== | ||
The EXTI can be | {{InternalInfo| OP-TEE may also need to use some EXTI wake-up events. To achieve this, Linux relies on a secure service for wake-up event control from its EXTI driver, instead of direct reliance on register accesses. Once the EXTI is configured, each core (Cortex-A7 Secure, Cortex-A7 Non-Secure and Cortex-M4) can operate concurrently on the EXTI -edge pending registers- because those registers are cleared writing a 1 on the concerned EXTI, with secure protection on the secured ones}} | ||
* the Cortex-A7 non-secure | |||
===== On {{MicroprocessorDevice | device=13}} ===== | |||
The EXTI is used by: | |||
* the Cortex-A7 non-secure with Linux [[Interrupt overview|interrupts]] framework | |||
* the Cortex-A7 secure with [[OP-TEE overview|OP-TEE]] EXTI driver | |||
===== On {{MicroprocessorDevice | device=15}} ===== | |||
The EXTI is a shared peripheral, that can be used by: | |||
* the Cortex-A7 non-secure with Linux [[Interrupt overview|interrupts]] framework | |||
* the Cortex-M4 for using in STM32Cube with the [[STM32CubeMP1 architecture|EXTI HAL driver]] | * the Cortex-M4 for using in STM32Cube with the [[STM32CubeMP1 architecture|EXTI HAL driver]] | ||
{{ | ====Software frameworks==== | ||
===== On {{MicroprocessorDevice | device=13}} ===== | |||
{{:STM32MP13 internal_peripherals_software_table_template}} | |||
| Core/Interrupts | |||
| [[EXTI internal peripheral|EXTI]] | |||
| [[OP-TEE_overview|OP-TEE EXTI driver]] | |||
| [[Interrupt overview|Linux interrupt framework]] | |||
| | |||
|- | |||
|} | |||
==== | ===== On {{MicroprocessorDevice | device=15}} ===== | ||
{{: | {{:STM32MP15_internal_peripherals_software_table_template}} | ||
| Core/Interrupts | | Core/Interrupts | ||
| [[EXTI internal peripheral|EXTI]] | | [[EXTI internal peripheral|EXTI]] | ||
Line 54: | Line 64: | ||
====Peripheral assignment==== | ====Peripheral assignment==== | ||
{{: | ===== On {{MicroprocessorDevice | device=13}} ===== | ||
< | {{:STM32MP13_internal_peripherals_assignment_table_template}} | ||
<section begin=stm32mp13 /> | |||
| rowspan="1" | Core/Interrupts | |||
| rowspan="1" | [[EXTI internal peripheral|EXTI]] | |||
| EXTI | |||
| <span title="system peripheral" style="font-size:21px">✓</span> | |||
| <span title="system peripheral" style="font-size:21px">✓</span> | |||
| | |||
|- | |||
<section end=stm32mp13 /> | |||
|} | |||
===== On {{MicroprocessorDevice | device=15}} ===== | |||
{{:STM32MP15_internal_peripherals_assignment_table_template}} | |||
<section begin=stm32mp15 /> | |||
| rowspan="1" | Core/Interrupts | | rowspan="1" | Core/Interrupts | ||
| rowspan="1" | [[EXTI internal peripheral|EXTI]] | | rowspan="1" | [[EXTI internal peripheral|EXTI]] | ||
| EXTI | | EXTI | ||
| | | | ||
| <span title=" | | <span title="system peripheral" style="font-size:21px">✓</span> | ||
| <span title=" | | <span title="system peripheral" style="font-size:21px">✓</span> | ||
| | | Shared | ||
|- | |- | ||
<section end=stm32mp15 /> | |||
|} | |} | ||
{{Info | The EXTI peripheral is not listed in STM32CubeMX peripherals list because its configuration is partly embedded in the [[Device tree]] (for all internal EXTI sources, coming from peripherals with wake up capabilities) and completed with the GPIO configuration that comes from STM32CubeMX pinout view}} | |||
<noinclude> | |||
[[Category:Interrupts peripherals]] | |||
{{ArticleBasedOnModel | Internal peripheral article model}} | |||
{{PublicationRequestId | 8793 |2018-09-18 | (PhilipS )}} | |||
{{ReviewsComments|JCT 1840: alignment needed with the last version of the model<br> | |||
[[Category:ToBeAlignedWithModel]] | |||
}} | |||
</noinclude> |
Latest revision as of 17:11, 21 June 2022
1. Peripheral overview
The EXTI peripheral is used to get an interrupt when a GPIO is toggling. It can also wake up the system from Stop low power mode, by means of the PWR internal peripheral when a wake up event occurs, before (eventualy - see the note below) propagating an interrupt to the client processor (Cortex-A7 GIC or Cortex-M4 NVIC in case of STM32MP15). The wake up events can be internal (from other IPs clocked by the LSE, LSI or HSI from RCC), or external (from GPIO).
Notice that:
- Up to 16 GPIO pins can be configured as external interrupts: for each index between 0 and 15, one EXTI can be selected among all banks (EXTI<index> = GPIO<one_bank><index>).
- On STM32MP13x lines
: The 16 GPIO and one internal peripheral events ( AVD/PVD), can generate interrupts connected to the GIC. All the other internal peripheral events can wake up the system, but the EXTI does not generate any interrupt to the GIC; in such cases, another peripheral interrupt has to be used as a trigger via the GIC.
- On STM32MP15x lines
: The 16 GPIO and 5 internal peripheral events (AVD/PVD, CPU1 SEV, CPU2 SEV, WWDG1 reset, CPU2 SYSRESETREQ) can generate interrupts connected to the GIC and NVIC. All the other internal peripheral events can wake up the system, but the EXTI does not generate any interrupt to the GIC or NVIC for them; in such cases, another peripheral interrupt has to be used as a trigger via the GIC or NVIC.
1.1. Features
Refer to STM32MP13 reference manuals or STM32MP15 reference manuals for the complete feature list, and to the software components, introduced below, to see which features are implemented.
1.2. Security support
The EXTI is a secure peripheral. By default, at reset, all EXTI wake up events are non-secure.
2. Peripheral usage and associated software
2.1. Boot time
The EXTI is not used by the boot chain, but is configured during Linux initialization.
2.1.1. On STM32MP15x lines 
Since wake-up event configuration is done via register bit-field reads and writes, concurrent accesses from Linux and the coprocessor are not possible at boot time:
- Linux configures all EXTI events during their respective consumer driver probing
- The coprocessor uses the resource management mechanisms to request and configure the EXTI events it needs.
2.2. Runtime
2.2.1. Overview
2.2.1.1. On STM32MP13x lines 
The EXTI is used by:
- the Cortex-A7 non-secure with Linux interrupts framework
- the Cortex-A7 secure with OP-TEE EXTI driver
2.2.1.2. On STM32MP15x lines 
The EXTI is a shared peripheral, that can be used by:
- the Cortex-A7 non-secure with Linux interrupts framework
- the Cortex-M4 for using in STM32Cube with the EXTI HAL driver
2.2.2. Software frameworks
2.2.2.1. On STM32MP13x lines 
Domain | Peripheral | Software components | Comment | |
---|---|---|---|---|
OP-TEE | Linux | |||
Core/Interrupts | EXTI | OP-TEE EXTI driver | Linux interrupt framework |
2.2.2.2. On STM32MP15x lines 
Domain | Peripheral | Software components | Comment | ||
---|---|---|---|---|---|
OP-TEE | Linux | STM32Cube | |||
Core/Interrupts | EXTI | Linux interrupt framework | STM32Cube EXTI driver |
2.2.3. 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. It can then be manually completed (particularly for external peripherals), according to the information given in the corresponding software framework article.
2.2.4. Peripheral assignment
2.2.4.1. On STM32MP13x lines 
Click on the right to expand the legend...
Domain | Peripheral | Runtime allocation | Comment | ||
---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) | |||
Core/Interrupts | EXTI | EXTI | ✓ | ✓ |
2.2.4.2. On STM32MP15x lines 
Click on the right to expand the legend...
Domain | Peripheral | Runtime allocation | Comment | |||
---|---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) |
Cortex-M4 (STM32Cube) | |||
Core/Interrupts | EXTI | EXTI | ✓ | ✓ | Shared |