cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer API - Canceling current operation or disable reconnection attempt

fma
Associate

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();

fma_1-1753345297625.png

 

 

1 REPLY 1
fma
Associate

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.