2025-07-24 1:22 AM
Hi,
I am using the STM32CubeProgrammer API (v2.20.0) on Windows 11 using the Visual Studio example as a base. Everything works fine, however this issue is slowing down the programming workflow.
After programming the MCU option bytes to RDP1 (or Closed state on some newer devices), there is a long delay (20 to 30 seconds) during the attempts to reconnect to the device. I already expect that the reconnection attempt will fail, so is there a way to reduce the time or number of reconnection attempts? Or a way to cancel the current operation? The time taken for failed reconnection attempts is 2x longer than the actual programming of the MCU.
I noticed that there is a getCancelPointer() function in the API, but I have found no documentation or examples on how to use it. Is it possible to use this or is there some other way?
/**
* \brief This routine allows to drop the current read/write operation.
* \return 0 if there is no call for stop operation, otherwise 1.
*/
volatile int* getCancelPointer();
2025-07-25 7:41 AM
To add more information, this will be used in a production environment with 3000 to 5000 MCUs programmed every month. That's why the 30 second delay matters.