Skip to main content
Visitor
August 8, 2026
Question

STM32MP257: Cortex-A35 updates RTC time even when Cortex-M33 holds RESMGR_RTC_INIT_RSC lock

  • August 8, 2026
  • 0 replies
  • 3 views

Hello,

I'm working with an STM32MP257 and encountering unexpected behavior regarding RTC resource isolation between the Cortex-M33 (bare metal/HAL) and Cortex-A35 (OpenSTLinux).

I performed a simple test where my Cortex-M33 requests the initialization resource using the Resource Manager and holds it while reading the time registers:

ResMgr_Status_t st = ResMgr_Request(RESMGR_RESOURCE_RIF_RTC, RESMGR_RTC_INIT_RSC);
if (st == RESMGR_STATUS_ACCESS_OK)
{
// Reading registers directly while holding the lock
uint32_t tr = RTC->TR; uint32_t dr = RTC->DR;
// ... intentionally omitting ResMgr_Release to test the lock ...
}
 

While the M33 is actively holding this RESMGR_RTC_INIT_RSC lock, I execute the following command from the Linux shell on the A35 core:

hwclock --set --date="2026-07-18 12:34:56" --utc

To my surprise, the time is successfully changed.

My question is: why does this happen? Does the OpenSTLinux RTC driver (rtc-stm32.c) completely bypass the RIF synchronization mechanism and force its way into the INIT mode to overwrite the TR and DR registers? If the INIT_RSC lock is meant to synchronize access to the RTC initialization phase, why is Linux allowed to ignore it?

Is there a proper hardware way (e.g., via TF-A / OP-TEE Device Tree) to enforce true RIF isolation so that Linux cannot overwrite the time while the M33 holds the lock?