cancel
Showing results for 
Search instead for 
Did you mean: 

System Clock Initialization problem with HSE while USB is active

AKAN.1
Associate

Hi everybody,

I have a weird problem with my STM32F302CC;In my project, HSE can work properly without USB is configured. But when I configure USB, things get weird.In debug mode, the program crash in SystemClock_Config() function when it reaches to ;

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }

Console shows "Target is not responding, retrying..."

As I mentioned before, with the same clock settings and USB unconfigured, the program can work properly but when I configured the USB device it starts to crash.

0 REPLIES 0