Skip to main content
Associate
Question

STM32CubeProgrammer 2.20.0: Hot Plug clears SPI6EN and RTCAPBEN on STM32H743

Hi ST Community,

I’m investigating a reproducible issue on our STM32H743. A connect-only SWD Hot Plug operation with STM32CubeProgrammer 2.20.0 clears peripheral clock enable bits in RCC_APB4ENR. The next SPI6 transfer then fails to start and times out.

Setup

  • STM32H743 Rev V, device ID 0x450, on a custom board

  • STM32CubeProgrammer CLI 2.20.0 on Windows

  • STLINK-V3MINIE with probe firmware V3J17M11, SWD at 8 MHz

  • Interrupt-driven SPI6 transfers to a MAX31865

Steps to reproduce

  1. Boot the application with SPI6EN and RTCAPBEN set in RCC_APB4ENR. Have the running firmware record changes to the RCC peripheral clock enable registers in RAM.

  2. While the application runs, execute the following command three times, allowing SPI6 to recover between connections.

    STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=8000
  3. Let the firmware freeze the RAM trace before attaching to read it. For the control run, leave SWD disconnected until after the trace freezes.

Expected behavior

A connect-only Hot Plug preserves the peripheral clock enables of the running application.

Observed behavior

Trial RCC_APB4ENR Result
Control without live SWD 0x00010022 throughout No clock-enable changes observed
Hot Plug 1 0x00010022 → 0x00000002 SPI6EN and RTCAPBEN cleared
Hot Plug 2 0x00000022 → 0x00000002 SPI6EN cleared
Hot Plug 3 0x00000022 → 0x00000002 SPI6EN cleared

The application’s existing SPI6 recovery restored SPI6EN after approximately 150, 178 and 275 ms, respectively. RTCAPBEN remained clear until the trace froze. The other eight sampled RCC clock enable registers stayed unchanged. RTC functionality was outside the scope of the test.

A separate firmware trace showed SPI6EN set at the preceding successful EOT, then clear before and after the next HAL transfer start call. At timeout, HAL reported BUSY_TX_RX, all three bytes were still outstanding in both directions, and no completion callback had arrived. The firmware captured these changes during connect-only operations, without an explicit debugger memory-read command during the capture window.

Can anyone confirm whether the Hot Plug connection sequence modifies RCC_APB4ENR on the STM32H743? Is there a CubeProgrammer or ST-LINK firmware version that preserves these clock enable bits?

Thanks for your help!

1 reply

Associate

Hi everyone,

I repeated the test with STM32CubeProgrammer v2.24.0 and reproduced the same issue on the STM32H743. During an ST-LINK Hot Plug connection, the firmware’s RAM trace again showed both SPI6EN and RTCAPBEN cleared after the connection. The PT1000 readout via the MAX31865 on SPI6 failed again.

Has anyone else reproduced this with v2.24.0, or does ST know what could cause these clock-enable bits to clear during Hot Plug?

Thanks for your help!