How to activate HSE monitoring

Revision as of 11:22, 17 June 2024 by Registered User (→‎How to activate the monitoring)
Applicable for STM32MP13x lines, STM32MP25x lines

1. Article purpose[edit source]

The purpose of this article is to explain how to monitor the HSE oscillator.

If the HSE oscillator is used in the clock tree, it is possible to enable a monitoring function to detect and avoid over frequency. The LPTIM mechanism can detect any over frequency and triggers a tamper event which runs the appropriate custom actions.

2. How to activate the monitoring[edit source]

By default, the HSE monitor is disabled in the dtsi "SoC" files.

To activate the HSE monitor, add this node in your board OP-TEE device tree

	&hse_monitor {
		status = "okay";
	};

The LPTIM connected to HSI and used for HSE over frequency monitoring has to be be assigned to the Arm® Cortex®-A secure context (OPTEE) and to be enabled in counter node in OP-TEE device tree with:

  • lptimer3 on STM32MP13x lines More info.png:
	&lptimer3 {
		status = "okay";
		counter {
			status ="okay";
	 	};
	};
  • lptimer1 on STM32MP25x lines More info.png:
	&lptimer1 {
		status = "okay";
		counter {
			status = "okay";
		};
	};