cancel
Showing results for 
Search instead for 
Did you mean: 

Error in initializing ST-LINK device. Reason: No device found on target

StanCosgrove
Associate II

Hello i encountered this error on F072 nucleo board, it was working fine yesterday and todayit couldnt connect up to STM IDE, whats coursing this and how to overcome this issue?

Error in initializing ST-LINK device. Reason: No device found on target

9 REPLIES 9
Andrew Neil
Evangelist III

@StanCosgrove wrote:

it was working fine yesterday and today it couldn't connect


What did you change between yesterday & today - hardware and/or software ?

Nothing...full error as below, anyone can help?

Error in final launch sequence:

Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (4) No device found on target.

Nothing at all - no changes to your code? No links fallen off?

 

Does the ST-Link appear in the Windows Device Manager (or equivalent on other platforms) ?

 

Does any of this help: https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693 ?

 

 

yes i see STLink virtual Comport...

correction: the board is H7A3ZI-Q Nucleo

Can you use it with STM32 Cube Programmer?

Did you get the SMPS setting wrong, and use the LDO one instead?

Check SystemClock_Config() code last uploaded.

Recovery method for SMPS/LDO issue, is to strap BT0/VDD and power cycle board a couple of times completely (ie remove all cable), and then mass-erase part when it permits connectivity.

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

No CubeProgrammer unable to connect too. Not possible as i had never done anything on the SMPS...

/**
  * @brief  System Clock Configuration
  *         The system Clock is configured as follow :
  *            System Clock source            = PLL (HSE)
  *            SYSCLK(Hz)                     = 280000000 (CPU Clock)
  *            HCLK(Hz)                       = 280000000 (Bus matrix and AHBs Clock)
  *            AHB Prescaler                  = 1
  *            CD APB3 Prescaler              = 2 (APB3 Clock  140MHz)
  *            CD APB1 Prescaler              = 2 (APB1 Clock  140MHz)
  *            CD APB2 Prescaler              = 2 (APB2 Clock  140MHz)
  *            SRD APB4 Prescaler             = 2 (APB4 Clock  140MHz)
  *            HSE Frequency(Hz)              = 8000000
  *            PLL_M                          = 4
  *            PLL_N                          = 280
  *            PLL_P                          = 2
  *            PLL_Q                          = 2
  *            PLL_R                          = 2
  *            VDD(V)                         = 3.3
  *            Flash Latency(WS)              = 6
  * @PAram  None
  * @retval None
  */
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)) {}
...
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..