Skip to main content
Associate II
April 8, 2025
Solved

The NUCLEO-U5A5 example doesn't work.

  • April 8, 2025
  • 2 replies
  • 871 views

NUCLEO-U5A5ZJ-Q

STM32CubeIDE Version 1.17.0

STM32Cube MCU Package for STM32U5 Series 1.7.0

 

In the call chain from main() -> SystemClock_Config() -> HAL_RCC_OscConfig(), HAL_OK is not being returned.

It seems that the HSE configuration is failing. After calling __HAL_RCC_HSE_CONFIG, the code waits for the HSE to become ready, but it appears to be timing out.

 

I created and built the project as described below.

(1) STM32 project -> Borad Selector -> NUCLEO-U5A5ZJ-Q -> Finish

(2) Project -> Build All

 

I haven't made any code changes, but if anyone has an idea of what might be causing this, I would appreciate your input.

 

Best answer by SirineST

Hello @Seiji_Hiraki 

Actually, in SystemClock_Config() function, HSE state is generated by default as RCC_HSE_BYPASS, please make sure to update it to state ON (RCC_OscInitStruct.HSEState = RCC_HSE_ON)

With regards

2 replies

ST Employee
April 8, 2025

Hello @Seiji_Hiraki, which example exactly you are testing please ?

"If your question is answered, please close this topic by clicking ""Accept as Solution"""
Associate II
April 8, 2025

Hi, @SirineST , Thank you for your reply.

The example is generated using the steps below.

Project Explorer -> New -> STM32 project -> Board Selector -> NUCLEO-U5A5ZJ-Q -> Finish

When I click 'Finish', the 'Board Project Options' dialog appears. In the dialog, I made the following selections. A screenshot is also attached.

Checked 'Generate demonstration code'
Checked 'USER LED GREEN', 'USER LED BLUE', 'USER LED RED',
Checked 'USER BUTTON', 'Virtual Com Port'
Pressed OK

SirineSTAnswer
ST Employee
April 9, 2025

Hello @Seiji_Hiraki 

Actually, in SystemClock_Config() function, HSE state is generated by default as RCC_HSE_BYPASS, please make sure to update it to state ON (RCC_OscInitStruct.HSEState = RCC_HSE_ON)

With regards

"If your question is answered, please close this topic by clicking ""Accept as Solution"""
Associate II
April 10, 2025

Hi, @SirineST 

It worked after I made the update as you suggested.

I understand that since the evaluation board is equipped with a crystal, it is necessary to set RCC_HSE_ON.

I hope the default value in the example will be updated accordingly.

Thank you very much.