2019-02-14 04:51 AM
Hi,
I use SWD interface to configure my STM32 board.
It all worked out, but I changed #define and moved to a part of the program that disabled the sw interface.
Now my STLINK/V2 can not connect to the device.
Do you have an idea to erase the chip or restore the SWD interface?
#else /* DEBUG */
/* sw interface off*/
// GPIO_InitTypeDef GPIO_InitStructure ={0};
//
// GPIO_InitStructure.Mode = GPIO_MODE_ANALOG;
// GPIO_InitStructure.Pull = GPIO_NOPULL;
// GPIO_InitStructure.Pin = (GPIO_PIN_13 | GPIO_PIN_14);
// __GPIOA_CLK_ENABLE() ;
// HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);
// __GPIOA_CLK_DISABLE() ;
//
// __HAL_RCC_DBGMCU_CLK_ENABLE( );
// HAL_DBGMCU_DisableDBGSleepMode( );
// HAL_DBGMCU_DisableDBGStopMode( );
// HAL_DBGMCU_DisableDBGStandbyMode( );
// __HAL_RCC_DBGMCU_CLK_DISABLE( );
#endif
Solved! Go to Solution.
2019-02-14 05:23 AM
Or connect under reset.
2019-02-14 04:55 AM
Reset with BOOT0 pulled high, and erase
2019-02-14 05:23 AM
Or connect under reset.
2019-02-14 06:00 AM
Thank to you too @Community member @Uwe Bonnes
I don't try the first method because i've a 0402 resistance in pull down but it could have been done if necessary.
Just to configure ST-LINK in another way
2019-03-04 08:00 AM
Aie,
another problem.
I unplug my SWD with power applied and my STM32 is locked with a 3.5W conssomation..
If i put MCU_nRST to GND the power is 1.85W.
I try to put BOOT0 to high but nothing better...