ES0621 · Errata sheetSTM32H523xx and STM32H533xx device errata
Download .pdfOpen in the full document

Description of device errata

Description of device errata

The following sections describe the errata of the applicable devices and provide a workaround where available. They are grouped by device functions.

The applicable devices are based on Arm® Cortex® core and TrustZone® architecture extension.



Note:

Arm and Cortex are registered trademarks of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere.

Arm and TrustZone are registered trademarks of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere.

The Arm word and logo are trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere. All rights reserved.

Access permission faults are prioritized over unaligned device memory faults

Description

A load or store which causes an unaligned access to device memory results in an UNALIGNED UsageFault exception. However, if the region is not accessible because of the MPU access permissions (as specified in MPU_RBAR.AP), then the resulting MemManage fault is prioritized over the UsageFault.

The failure occurs when the MPU is enabled and:
  • A load/store access occurs to an address which is not aligned to the data type specified in the instruction.
  • The memory access hits one region only.
  • The region attributes (specified in the MAIR register) mark the location as device memory.
  • The region access permissions prevent the access (that is, unprivileged or write not allowed).

The MemManage fault caused by the access permission violation is prioritized over the UNALIGNED UsageFault exception because of the memory attributes.

Workaround

None. However, it is expected that no existing software is relying on this behavior since it was permitted in Armv7‑M.

System

LSE crystal oscillator may be disturbed by transitions on PC13

Description

On LQFP and VFQFPN packages, the LSE crystal oscillator clock frequency can be incorrect when PC13 is toggling in input or output (for example when used for RTC_OUT1). The external clock input (LSE bypass) is not impacted by this limitation.

The WLCSP and UFBGA packages are not impacted by this limitation.

Workaround

None.

Avoid toggling PC13 when LSE is used on LQFP and VFQFPN.

Peripheral triggers connected to RTC wakeup timer interrupt instead of RTC wakeup timer trigger signal

Description

GPDMA1 and GPDMA2 triggers are connected to RTC wakeup timer interrupt instead of RTC wakeup timer trigger signal (rtc_wut_trg).

Workaround

Enable the RTC wakeup timer interrupt. The wakeup timer flag must be cleared in the interrupt subroutine before getting a new trigger.

To avoid serving an interrupt, use triggers from RTC alarm or from LPTIM instead of RTC wakeup timer.

Incorrect behavior of ICACHE refill from SRAM when an SRAM AHB error occurs

Description

If an AHB error is returned by the SRAM memory protection controller (MPCBB) during an ICACHE refill operation from SRAM, the next access may not be correctly handled and thus corrupted.

The SRAM (MPCBB) returns an AHB error during a CPU fetch operation if the one of the following conditions is met:
  • a secure access to a non-secure area is ongoing (only when TrustZone® is enabled),
  • a non-secure access to a secure area is ongoing (only when TrustZone® is enabled),
  • a non-privileged access to a privilege area is ongoing, or
  • a non-mapped address is accessed.

Workaround

None.

SRAMx_RST option bits have an immediate effect

Description

Clearing the SRAMx_RST option bit immediately triggers an SRAMx erase operation. This might lead to a CPU exception or unpredictable behavior if the erased SRAMx is being used by the application.

Note:

This reported SRAM erase is performed only once after system reset, and only if the SRAMxRST option bit is set to 1 during system reset.

Workaround

The application must be reset immediately after SRAMx_RST clear.

Full JTAG configuration without NJTRST pin cannot be used

Description

When using the JTAG debug port in Debug mode, the connection with the debugger is lost if the NJTRST pin (PB4) is used as a GPIO or for an alternate function other than NJTRST. Only the 4-wire JTAG port configuration is impacted.

Workaround

Use the SWD debug port instead of the full 4-wire JTAG port.

SRAM2 is erased when the backup domain is reset

Description

When the VSWRST bit of the RCC_BDCR register (entire VSW domain reset) and the DBP bit of the PWR_DBPCR register (write access to backup domain enabled) are both set, a backup domain reset also erases the SRAM2 content.

Workaround

Apply the following sequence to reset the backup domain and safely erase SRAM2:
  1. After the device exits the reset state, check that no SRAM erase is ongoing in SystemInit().
  2. Reset the backup domain. This also erases the SRAM2 content.
  3. Wait until SRAM2 erase is complete.
  4. Proceed with normal application execution, and store data into the SRAM2.

Clearing WWDG_SW might result in debug authentication or STiRoT failure

Description

If the WWDG_SW configuration option bit is cleared (window watchdog controlled by hardware), the WWDG is always enabled after a reset, and cannot be disabled. As a result:
  • The ST-DA debug authentication sequence might fail, preventing any possibility to securely reopen the debug or launch regressions on secure products.
  • The STiRoT (immutable root of trust) execution might fail during the boot sequence.

Workaround

Do not enable the WWDG controlled by hardware configuration. Instead, use the WWDG controlled by software configuration (WWDG_SW configuration option bit set).

LSE low drive mode is not functional

Description

The LSE oscillator may not start or may stop in low drive mode (LSEDRV = 00). Using this mode is forbidden.

Workaround

None.

Incorrect backup domain reset

Description

The backup domain reset may be missed upon a backup domain power‑on following a VBAT power‑off in VBAT mode, if the VBAT voltage drops during the power‑off phase hitting a window, which is a few mV wide before it starts to rise again. This window is located in the range between 100 mV and 700  mV, the exact position depending mainly on the device and on the temperature.

The missed reset results in unpredictable values of the backup domain registers. This may lead to raising an unexpected tamper event preventing the access to SRAM2 and PKA, or influencing any of the backup domain functions.

Workaround

Apply one of the following measures to avoid an incorrect backup domain reset:
  • Before performing a new power‑on, let the VBAT supply voltage fall to a level below 100 mV for more than 200 ms.
  • If none of the previous workarounds can be applied, and the boot follows a backup domain power‑on reset, erase the backup domain by software. In order to discriminate the backup domain power‑on reset from a power‑on reset, at least one backup register (called, for example, BackupTestRegister) must be previously programmed with a BKP_REG_VAL value containing 16 bits set and 16 bits cleared. The robustness of this workaround can be significantly improved by using a CRC rather than registers, since the registers are subject to backup domain reset.

    The workaround consists in calculating the CRC of the backup domain registers, RCC_BDCR and RTC/TAMP registers, excluding the bits modified by hardware. The CRC result can be stored in the backup register, instead of a fixed BKP_REG_VAL value. The CRC result needs to be updated for each modification of values covered by the CRC, for example when the CRC peripheral is used.

    Insert the following software sequence at the very beginning of the boot code:
    1. Check if the BORRSTF flag of the RCC_RSR register is set (the reset is caused by a power‑on).
    2. If it is set, check that the BackupTestRegister content is different from BKP_REG_VAL, or that the new CRC calculated value is different from stored results, depending on the chosen workaround implementation.
    3. If this is the case and if no tamper flag is set (when the tamper detection is enabled), the reset is caused by a backup domain power‑on. Then apply the following sequence:
      1. Enable backup domain access by setting the DBP bit of the PWR_DBPCR register.
      2. Reset the backup domain by applying the following sequence:
        1. Write 0x0001 0000 to the RCC_BDCR register, which sets the VSWRST bit and clears the other register bits that may not be cleared.
        2. Read the RCC_BDCR register to make the reset time long enough.
        3. Write 0x0000 0000 to the RCC_BDCR register to clear the VSWRST bit.
      3. Clear the BORRSTF flag by setting the RMVF bit of the RCC_RSR register.

Debug not available when TrustZone security is disabled and the PRODUCT_STATE is iROT-Provisioned

Description

When the TrustZone® security is disabled, and the PRODUCT_STATE is iROT-Provisioned, the debug must be available for a code executed from an HDPL 3 area. However, in this case, the code cannot be debugged.

Workaround

If PRODUCT_STATE = iROT-Provisioned, force the debug opening in the first stage of the boot sequence software.

Below an example of code:
/* This code ensures that in PRODUCT_STATE = IROT_PROVISIONED, the Debug is opened for HDPL3 when TZEN = disabled. */
 /* This code must be integrated in a HDPL1 code */
if (READ_BIT(FLASH->OPTSR_CUR, FLASH_OPTSR_PRODUCT_STATE_Msk) == OB_PROD_STATE_IROT_PROVISIONED)
 {
 __HAL_RCC_SBS_CLK_ENABLE();
 ((SBS_TypeDef *)SBS_BASE)->DBGCR = 0x006FB4B4U; // 6F value to open debug when HDPL3 is reached
 }
 /* To be able to attach the debugger, the code to debug must be executed in HDPL3. */
 /* The code must call the below function twice before reaching the code to debug: */
 /* HAL_SBS_IncrementHDPLValue(); */

Low-speed external clock in analog bypass mode might not work properly

Description

While the LSE bypass in analog mode is selected (LSEBYP = 1 and LSEEXT = 0 in the RCC_BDCR register), the LSE clock might not work properly.

Workaround

Do not use the LSE bypass in analog mode. Instead, use the digital LSE bypass mode (LSEBYP = 1 and LSEEXT = 1 in the RCC_BDCR register).

Octo-SPI memory data failure when using HCLK as kernel clock

Description

When the HCLK clock (rcc_hclk4) frequency is lower than the SYSCLK clock frequency, the HCLK clock duty cycle is not 50 %. In this condition, selecting HCLK as Octo-SPI kernel clock may lead to memory data failure.
Note:

The HCLK clock is prescaled by a ratio controlled with the HPRE[3:0] bitfield of the RCC_CFGR2 register. Any value exceeding 0b0111 makes the HCLK frequency lower than the SYSCLK frequency.

The Octo-SPI kernel clock is selected with the OCTOSPI1SEL[1:0] bitfield of the RCC_CCIPR4 register.

Workaround

When the HCLK and SYSCLK frequencies differ, do not select rcc_hclk4 as Octo-SPI kernel clock. Instead, select another clock such as pll1_q_ck or pll2_r_ck.

PLL1P output can unduly be disabled by software when used as SYSCLK clock

Description

The PLL1P output (pll1_p_ck clock signal) is expected to be protected against disabling by software while selected for SYSCLK (sys_ck clock signal). Unduly, it is on the PLL1Q output that this protection acts, instead on PLL1P. As a consequence, the PLL1P output selected as SYSCLK can be disabled by software, which leads to a system deadlock.

Note:

The PLL1P output (pll1_p_ck clock signal) is selected as SYSCLK (sys_ck clock signal) by setting the SW[1:0] bitfield of the RCC_CFGR1 register to 0b11. The PLL1P and PLL1Q outputs of the PLL1 are enabled and disabled through, respectively, the bits PLL1PEN and PLL1QEN of the RCC_PLL1CFGR register.

Workaround

Do not clear the PLL1PEN bit while the PLL1P output is used as SYSCLK clock.

ADC and DAC clock selection cannot be secured when the ADC is nonsecure

Description

The ADC and DAC kernel clock source selection is expected to be secure whenever the ADC or the DAC is secure. It is duly secured when the ADC is secure. However, it unduly remains nonsecure when the DAC is secure but the ADC nonsecure.

Note:

The ADC and DAC kernel clock source is selected with the ADCDACSEL[2:0] bitfield of the RCC_CCIPR5 register.

Workaround

To secure the ADC and DAC kernel clock source selection bitfield, always make the ADC secure.

Reset vector catch feature cannot be used when debugging is disabled for secure code

Description

If the product state (PRODUCT_STATE[7:0] bitfield of the FLASH_OPTSR_CUR register) is different from the open state, debugging is not allowed except by resetting the CPU by mean of a reset vector catch. This may lead to the CPU not halting before executing the first instruction of the nonsecure exception handler.

Consequently, nonsecure code execution may not stop after switching to the nonsecure state, and the CPU may proceed executing code in the nonsecure area.

Workaround

To halt the CPU in the reset handler, insert a software break point in the first nonsecure instruction of the user application. The address of the reset handler can be read from the NSBOOTADD[23:8] bitfield of the FLASH_NSBOOTR_CUR register.

Invalid DAC output voltage for several DAC kernel clocks

Description

The DAC output voltage might be incorrect when the DAC kernel clock is different from rcc_hclk (ADCDACSEL[2:0] bits equal to 000 in RCC_CCIPR5 register) or sys_ck (ADCDACSEL[2:0] bits equal to 001 in RCC_CCIPR5 register).

Workaround

When DAC is used, use ADCDACSEL[2:0] = 000 or 001 in the RCC_CCIPR5 register.

LPTIM2_CH1 might prevent the system from entering low-power modes

Description

When LPTIM2_CH1 output is enabled, it might lead to a wake-up interrupt request from EXTI input event 49, as the default value for an IMR49 bit in the EXTI_IMR2 register is equal to 1 (EXTI interrupt input 49 is unmasked). Consequently, it might prevent the system from entering low-power modes.

Workaround

When LPTIM2_CH1 output is enabled, and the system needs to enter low-power mode, mask EXTI interrupt input 49 by setting the IMR49 bit in the EXTI_IMR2 register to 0.

CPU execution freeze upon first erase or program operation after power-on or wake-up from Standby

Description

The first flash memory erase or program operation performed after power-on sequence or after wake-up from Standby makes the flash memory inaccessible for about 60 µs. Any CPU fetch or read access to the flash memory during this period freezes the CPU execution until the flash memory becomes accessible again.

This also concerns the read-while-write operation where the code executes in one bank, and it writes and reads another bank of the flash memory.

Note:

Any subsequent flash memory erase or program operation is free of this issue.

Workaround

If the application is sensitive to this limitation, apply the following measure:
  1. Relocate the interrupt vector table and critical interrupt handlers to the SRAM.
  2. Execute the code for the first flash memory erase or program operation in the SRAM.

Ensure that the code executed in the SRAM does not access the flash memory during the period of its inaccessibility.

Once the first erase or program operation is completed, the software can resume execution in the flash memory.

FDCAN TrustZone protection not aligned with memory

Description

The FDCAN memory is shared by both FDCAN1 and FDCAN2 data. These data are contiguous but not aligned with the TrustZone® protection.

As a result, the lower data of FDCAN2 could unduly be inaccessible when FDCAN1 is secure and FDCAN2 is nonsecure. Conversely, the lower data of FDCAN2 could unduly be accessible when FDCAN2 is secure and FDCAN1 is nonsecure.

Workaround

Keep the same security level for FDCAN1 and FDCAN2, either both secure or both nonsecure.

Backup domain erased upon reset when STiRoT boot is active and the clock other than LSI selected

This erratum is only applicable to devices with the system flash security package (SFSP) version 1.2.0 or earlier. Devices with SFSP version 1.3.0 (returning 0x0103 0000 upon reading address 0x0BF9 60CC) are exempt of this issue.

Description

Selecting STiRoT boot forces the RTC/TAMP clock source to LSI. If the software application then selects a clock source other than LSI, this results in erasing the backup domain upon reset.

Workaround

After the reset, restore the backup domain data and the RTC clock source.

STiRoT fails if a tamper event arises during the startup

This erratum is only applicable to devices with the system flash security package (SFSP) version 1.2.0 or earlier. Devices with SFSP version 1.3.0 (returning 0x0103 0000 upon reading address 0x0BF9 60CC) are exempt of this issue.

Description

If a tamper event (on tamper 9 or tamper 15) arises during the startup, the execution remains in an infinite loop, failing to jump to the user application code.

In this situation, the only way to quit the infinite loop and restart the device is to remove all power supplies (also on the VBAT pin), then power the device back on.

When using STiRoT, it is also recommended that the user application deactivates, as early as possible, the tampers 9 and 15.

Workaround

None.

Tampers are not usable with STiRoT

This erratum is only applicable to devices with the system flash security package (SFSP) version 1.2.0 or earlier. Devices with SFSP version 1.3.0 (returning 0x0103 0000 upon reading address 0x0BF9 60CC) are exempt of this issue.

Description

When the application requires the tamper functionality, STiRoT cannot be used.

Workaround

Configure the device to use the proprietary boot entry (OEMiRoT).