Skip to main content
ptracton
Associate
December 5, 2017
Solved

STM32F4 Discovery CubeMX and USB

  • December 5, 2017
  • 2 replies
  • 1174 views
Posted on December 05, 2017 at 22:33

I am setting up a USB OTG based project on the STM32F4 Discovery Board.  I am using STM32CubeMX 4.23.0 and STM32Cube_FW_F4_v1.18.0.  This is the same set up on my Windows 10 and Linux Mint 18.2 PCs and both have the same error.

The clock configuration tab is always indicating that the clock set up is in error.  In the PLL Source Mux,  the HSI input is selected and has a red box around it with the message 'PLL Mux should have HSE as input selected'.  The HSE button is, of course, grayed out.  It generates the code but I get warnings about an invalid clock configuration.

Is this a problem with STM32CubeMX?  Is there actually an invalid clock configuration?  Is the generated code safe to use?

#stm32f4-discovery #usb #stmcubemx
This topic has been closed for replies.
Best answer by Naoaki Kagotani
Posted on December 06, 2017 at 06:33

It is necessary to set 'High Spedd clock(HSE)' to 'Crystal/Ceramic Resonator' with RCC on the Pinout tab.

HSI is not accurate and can not be used for USB.

2 replies

Naoaki Kagotani
Visitor II
December 6, 2017
Posted on December 06, 2017 at 06:33

It is necessary to set 'High Spedd clock(HSE)' to 'Crystal/Ceramic Resonator' with RCC on the Pinout tab.

HSI is not accurate and can not be used for USB.

ptracton
ptractonAuthor
Associate
December 6, 2017
Posted on December 06, 2017 at 06:56

Thanks!  That did it.  I did not know about setting the HSE in the RCC pinout.