cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F413 USB oscillator error when USB enabled

Adi1
Associate II

Hi All,

I have added recommended oscillator to a Nucleo - F413 board and made it to work on external oscillator by doing the recommended mods.

When, I Initialised the clock for USB, with the settings below, then HAL_RCC_OscConfig returns a timeout as HSE is never ready.

 

/* Wait till HSE is ready */

while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)

{

if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)

{

return HAL_TIMEOUT;

}

}

}

Adi1_0-1733228665761.png

 

 

Could someone please give me some insights into the problems.

3 REPLIES 3

> I have added recommended oscillator to a Nucleo - F413 board

What oscillator?

> by doing the recommended mods

What mods? How did you do them? Can you post a photo?

JW

Adi1
Associate II

As per the Nucleo user manual, I made the modifications. The oscillator is a 8MHz connected to microcontroller.

Adi1_0-1733244644540.png

 

That looks OK.

You have not set HSE BYPASS, have you? I don't know how is it set in CubeMX, I don't use CubeMX.

JW