2025-11-24 12:36 PM
So coincidental enough all the projects I have done before required a RTC /w LSE. I am now working on a project that does not need a LSE, and I am finding that TF-A keeps throwing a panic because of this. The protos we had fortunately had the circuit DNL, so adding an LSE clock fixed the problem.
Is there a way to disable this? or at least use the LSI? I tried configuring it to use the LSI but still same panic.
//Error Message
NOTICE: Early console setup
PANIC at PC : 0x2ffe6b5b
Exception mode=0x00000016 at: 0x2ffe6b5b
Thank you for any help.
2025-12-02 4:26 AM
Hello @ChrisRCAL
Thank you for this, we have identify an issue in the OSTL DV6.1. A patch is available to deactivate the external oscillator when not available and prevent panic, but its frequency needs to be set to 0 in the DT. The following patch will be implemented in the next DV. Let us know if it fixes your issue.
stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.08.27/sources/ostl-linux/tf-a-stm32mp-v2.10.13-stm32mp-r2-r0/tf-a-stm32mp-v2.10.13-stm32mp-r2/drivers/st/clk/clk-stm32mp2.c
diff --git a/drivers/st/clk/clk-stm32mp2.c b/drivers/st/clk/clk-stm32mp2.c
index 9c93db5..6552161 100644
--- a/drivers/st/clk/clk-stm32mp2.c
+++ b/drivers/st/clk/clk-stm32mp2.c
@@ -846,6 +846,10 @@
{
struct clk_oscillator_data *osc_data = clk_oscillator_get_data(priv, id);
+ if (osc_data->frequency == 0UL) {
+ return true;
+ }
+
return _clk_stm32_gate_is_enabled(priv, osc_data->gate_id); }