Difference between revisions of "WWDG internal peripheral"

[quality revision] [quality revision]
m
 
 


Template:ArticleMainWriter Template:ArticleApprovedVersion


1 Article purpose[edit]

The purpose of this article is to:

  • briefly introduce the WWDG peripheral and its main features
  • indicate the level of security supported by this hardware block
  • explain how it can be allocated to the three runtime contexts and linked to the corresponding software components
  • explain, when necessary, how to configure the WWDG peripheral.

2 Peripheral overview[edit]

The WWDG peripheral is a watchdog unit that can be used to protect the Cortex®-M4 based coprocessor firmware from endless loops or to monitor some real-time activities. This peripheral is clocked by the bus on which it is connected, thus it is frozen as soon as the system goes to Stop or Standby low power mode (except if the Stop emulation mode is enabled via DBGSTOP bit in DBGMCU_CR register). This block has an early interrupt feature that allows to get an interrupt (on GIC or NVIC) one cycle before reaching the final reset: this can allow to trigger a recovery mechanism on Cortex®-M4 or on Cortex®-A7.
On WWDG expiration, a MCU reset is generated, reseting Cortex®-M4 sub-system and the WWDG itself. This MCU reset also generates an interrupt on GIC thanks to EXTI. This allows Cortex®-A7 to detect Cortex®-M4 crashed and to recover it by stopping associated services, reloading Cortex®-M4 firmware and restarting Cortex®-M4.

2.1 Features[edit]

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

2.2 Security support[edit]

The WWDG is a non secure peripheral.

3 Peripheral usage and associated software[edit]

3.1 Boot time[edit]

The WWDG is not used at boot time.

3.2 Runtime[edit]

3.2.1 Overview[edit]

WWDG can be allocated to the Cortex®-M4 for using in STM32Cube with STM32Cube WWDG driver.
As there is only one WWDG counter cycle between the WWDG early interrupt and the WWDG reset generation, ST preconizes to allocate the WWDG early interrupt to Cortex®-M4 for a better reactivity and not to Cortex®-A7.

3.2.2 Software frameworks[edit]

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

(STM32Cube)
Core/Watchdog WWDG STM32Cube WWDG driver

3.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 (particularly for external peripherals), according to the information given in the corresponding software framework article.

3.2.4 Peripheral assignment[edit]

Internal peripherals

Check boxes illustrate the possible peripheral allocations supported by STM32 MPU Embedded Software:

  • means that the peripheral can be assigned () to the given runtime context.
  • is used for system peripherals that cannot be unchecked because they are statically connected in the device.

Refer to How to assign an internal peripheral to a runtime context for more information on how to assign peripherals manually or via STM32CubeMX.
The present chapter describes STMicroelectronics recommendations or choice of implementation. Additional possiblities might be described in STM32MP15 reference manuals.

Domain Peripheral Runtime allocation Comment
Instance Cortex-A7
secure
(OP-TEE)
Cortex-A7
non-secure
(Linux)
Cortex-M4

(STM32Cube)
Core/Watchdog WWDG WWDG

4 References[edit]

<noinclude>

{{ArticleBasedOnModel | [[Internal peripheral article model]]}}
{{ArticleMainWriter | GeraldB}}
{{ArticleApprovedVersion| GeraldB | LudovicB, FrancoisC | No previous approved version | AlainF - 17Oct'18 - 9291 | 23'May18}}
[[Category:Watchdog peripherals]]</noinclude>

==Article purpose==
The purpose of this article is to:
* briefly introduce the WWDG peripheral and its main features
* indicate the level of security supported by this hardware block
* explain how it can be allocated to the three runtime contexts and linked to the corresponding software components
* explain, when necessary, how to configure the WWDG peripheral.

==Peripheral overview==
The '''WWDG''' peripheral is a watchdog unit that can be used to protect the Cortex<sup>&reg;</sup>-M4 based coprocessor firmware from endless loops or to monitor some real-time activities. This peripheral is clocked by the bus on which it is connected, thus it is frozen as soon as the system goes to Stop or Standby [[Power overview|low power mode]] (except if the Stop emulation mode is enabled via [[DBGMCU internal peripheral|DBGSTOP bit in DBGMCU_CR register]]). This block has an early interrupt feature that allows to get an interrupt (on [[GIC internal peripheral|GIC]] or [[NVIC internal peripheral|NVIC]]) one cycle before reaching the final reset: this can allow to trigger a recovery mechanism on Cortex<sup>&reg;</sup>-M4 or on Cortex<sup>&reg;</sup>-A7.<br>

On WWDG expiration, a MCU reset is generated, reseting Cortex<sup>&reg;</sup>-M4 sub-system and the WWDG itself. This MCU reset also generates an interrupt on [[GIC internal peripheral|GIC]] thanks to [[EXTI internal peripheral|EXTI]]. This allows Cortex<sup>&reg;</sup>-A7 to detect Cortex<sup>&reg;</sup>-M4 crashed and to recover it by stopping associated services, reloading Cortex<sup>&reg;</sup>-M4 firmware and restarting Cortex<sup>&reg;</sup>-M4.

===Features===
Refer to the [[STM32MP15 resources#Reference manuals|STM32MP15 reference manuals]] for the complete list of features, and to the software components, introduced below, to see which features are really implemented.

===Security support===
The WWDG is a '''non secure''' peripheral.

==Peripheral usage and associated software==
===Boot time===
The WWDG is not used at boot time.

===Runtime===
====Overview====
WWDG can be allocated to the Cortex<sup>&reg;</sup>-M4 for using in STM32Cube with [[STM32CubeMP1 architecture|STM32Cube WWDG driver]].<br>

As there is only one WWDG counter cycle between the WWDG early interrupt and the WWDG reset generation, ST preconizes to allocate the WWDG early interrupt to Cortex<sup>&reg;</sup>-M4 for a better reactivity and not to Cortex<sup>&reg;</sup>-A7.

====Software frameworks====
{{:Internal_peripherals_software_table_template}}
 | Core/Watchdog
 | [[WWDG internal peripheral|WWDG]]
 | 
 |
 | [[STM32CubeMP1 architecture|STM32Cube WWDG driver]]
 |
 |-
 |}

====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 (particularly 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/Watchdog
 | rowspan="1" | [[WWDG internal peripheral|WWDG]]
 | WWDG
 |
 | 
 | <span title="assignable peripheral" style="font-size:21px"></span>

 | 
 |-</onlyinclude>

 |}

==References==<references/>

<noinclude>

[[Category:Watchdog peripherals]]
{{PublicationRequestId | 9291 | 2018-10-17 | AlainF}}
{{ArticleBasedOnModel | Internal peripheral article model}}</noinclude>
Line 1: Line 1:
<noinclude>
 
{{ArticleBasedOnModel | [[Internal peripheral article model]]}}
 
{{ArticleMainWriter | GeraldB}}
 
{{ArticleApprovedVersion| GeraldB | LudovicB, FrancoisC | No previous approved version | AlainF - 17Oct'18 - 9291 | 23'May18}}
 
[[Category:Watchdog peripherals]]
 
</noinclude>
 
 
 
==Article purpose==
 
==Article purpose==
 
The purpose of this article is to:
 
The purpose of this article is to:
Line 62: Line 55:
 
==References==
 
==References==
 
<references/>
 
<references/>
  +
  +
<noinclude>
  +
[[Category:Watchdog peripherals]]
  +
{{PublicationRequestId | 9291 | 2018-10-17 | AlainF}}
  +
{{ArticleBasedOnModel | Internal peripheral article model}}
  +
</noinclude>

Attachments

Discussions