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
-
Boot the application with
SPI6ENandRTCAPBENset inRCC_APB4ENR. Have the running firmware record changes to the RCC peripheral clock enable registers in RAM. -
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 -
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!
