2022-02-11 10:05 PM
Hai, I am using ST NUCLEO-H7A3ZI-Q board and I am new it. It worked properly for first one or two times. But now I cant flash code into it, it say "unable to connect to the target". Then I tried STM32CubeProgrammer to connect it and ts connected in 'Power down' mode. Then I performed Full chip erase. After that the board worked properly.
But the problem arises again when I reconnected the board and I done the full chip erase again.
That is I need to run the full chip erase every time I power the board.
How can I resolve the problem?
Thank you.
Sachin
Solved! Go to Solution.
2022-02-11 11:29 PM
Make sure your code sets LDO/SMPS and VOS settings appropriately, and doesn't disable, change or reconfigure the SWD involved pins.
Check SystemClock_Config(), etc, here example for NUCLEO-H7A3ZI-Q from H7 repo
static void SystemClock_Config(void)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
/*!< Supply configuration update enable */
HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY); // << THIS
/* The voltage scaling allows optimizing the power consumption when the device is
clocked below the maximum system frequency, to update the voltage scaling value
regarding system frequency refer to product datasheet.
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
...
2022-02-11 11:29 PM
Make sure your code sets LDO/SMPS and VOS settings appropriately, and doesn't disable, change or reconfigure the SWD involved pins.
Check SystemClock_Config(), etc, here example for NUCLEO-H7A3ZI-Q from H7 repo
static void SystemClock_Config(void)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
/*!< Supply configuration update enable */
HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY); // << THIS
/* The voltage scaling allows optimizing the power consumption when the device is
clocked below the maximum system frequency, to update the voltage scaling value
regarding system frequency refer to product datasheet.
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
...
2022-02-12 12:26 AM
I mean your code put MCU to STOP or any low power mode. This result to unable to connect.
You have two ways out