cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE Version: 1.15.0 failed at SystemClock_Config()

S_Ong
Associate II

Hi :

      I updated  STM32CubeIDE a few hours ago.

Version: 1.15.0

Build: 20695_20240315_1429 (UTC)

 

Now it will failed at the SystemClock_Config() and missing arm_sorting.h

 

void SystemClock_Config(void)

{

RCC_OscInitTypeDef RCC_OscInitStruct = {0};

RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

 

/** Configure the main internal regulator output voltage

*/

if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE3) != HAL_OK)

{

Error_Handler();

}

 

/** Initializes the CPU, AHB and APB buses clocks

*/

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;

RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;

RCC_OscInitStruct.HSIState = RCC_HSI_ON;

RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;

RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

RCC_OscInitStruct.PLL.PLLMBOOST = RCC_PLLMBOOST_DIV1;

RCC_OscInitStruct.PLL.PLLM = 1;

RCC_OscInitStruct.PLL.PLLN = 16;

RCC_OscInitStruct.PLL.PLLP = 8;

RCC_OscInitStruct.PLL.PLLQ = 2;

RCC_OscInitStruct.PLL.PLLR = 2;

RCC_OscInitStruct.PLL.PLLRGE = RCC_PLLVCIRANGE_1;

RCC_OscInitStruct.PLL.PLLFRACN = 0;

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) ----> failed here

{

Error_Handler();

}

 

/** Initializes the CPU, AHB, and APB buses clocks

*/

RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK

|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2

|RCC_CLOCKTYPE_PCLK3;

RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;

RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;

RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;

RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;

RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1;

 

if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)

{

Error_Handler();

}

}

 here are the details

 Dev Board Nucleo-U5A5ZJ-Q

 

Name : Error_Handler

Details:{void (void)} 0x800068c <Error_Handler>

Default:{void (void)} 0x800068c <Error_Handler>

Decimal:-128

Hex:0x80

Binary:10000000

Octal:0200

 

S_Ong_0-1711292059277.png

I have no such error before update.

Any idea how to resolve this?

 

Simon

11 REPLIES 11
S_Ong
Associate II

@STTwo-32 :

                     You have mentioned earlier regarding something about the path:

here is the link:

 

https://github.com/ARM-software/CMSIS_5/issues/910

below is the comment:

 

"You need to include the folder DSP/PrivateInclude when building.

This folder contains headers that are used only for building the libraries but not to use it.

The other folder DSP/Include is for headers which are needed to use the library. "

I can locate the arm_sorrting.h header files as mentioned in the link.

 

You did mentioned about path, build path ? if yes where can I check and probably change it? 

 

Best Regards

Simon

 

 

 

 

 

 

S_Ong
Associate II

hi @STTwo-32 :

                         I get passed the " SystemClock_Config()" but now it stop at  MX_USB_OTG_HS_HCD_Init().

 

 

static void MX_USB_OTG_HS_HCD_Init(void)
{

  /* USER CODE BEGIN USB_OTG_HS_Init 0 */

  /* USER CODE END USB_OTG_HS_Init 0 */

  /* USER CODE BEGIN USB_OTG_HS_Init 1 */

  /* USER CODE END USB_OTG_HS_Init 1 */
  hhcd_USB_OTG_HS.Instance = USB_OTG_HS;
  hhcd_USB_OTG_HS.Init.Host_channels = 16;
  hhcd_USB_OTG_HS.Init.speed = HCD_SPEED_HIGH;
  hhcd_USB_OTG_HS.Init.dma_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.phy_itface = USB_OTG_HS_EMBEDDED_PHY;
  hhcd_USB_OTG_HS.Init.Sof_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.low_power_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.use_external_vbus = ENABLE;
  if (HAL_HCD_Init(&hhcd_USB_OTG_HS) != HAL_OK) ----> it hang up here.
  {
    Error_Handler();
  }
 
  /* USER CODE BEGIN USB_OTG_HS_Init 2 */

  /* USER CODE END USB_OTG_HS_Init 2 */

}

 

it hang at 

if (HAL_HCD_Init(&hhcd_USB_OTG_HS) != HAL_OK)

{

Error_Handler();

}

Do you think it is about setting?

Best Regards

 

Simon