cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX Nucleo H743 USB CDC Device not working

jamann
Associate II
Posted on August 28, 2017 at 22:35

I generated a new project selecting Nucleo H743 , set the RCC to 8Mhz and made sure that USB is clocked at 48Mhz just like I did on the F767. Unfortunately the device does not show up in the windows device manager.

Does somebody have a working USB device example of any kind on the Nucleo H743 ?

Any ideas ?

I have attached the CubeMX project file.

Thanks for your help !

#usb-fs #stm32h7
1 ACCEPTED SOLUTION

Accepted Solutions
jamann
Associate II
Posted on August 29, 2017 at 20:56

I found the problem. The peripheral clocks need to be initialized each separately because

in  stm32h7xx_hal_rcc_ex.c it is selected with 

if((PeriphClkInit->PeriphClockSelection)  == RCC_PERIPHCLK_USB)

for the F7 it used to have the format 

if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == (RCC_PERIPHCLK_USB))

View solution in original post

2 REPLIES 2
jamann
Associate II
Posted on August 29, 2017 at 20:56

I found the problem. The peripheral clocks need to be initialized each separately because

in  stm32h7xx_hal_rcc_ex.c it is selected with 

if((PeriphClkInit->PeriphClockSelection)  == RCC_PERIPHCLK_USB)

for the F7 it used to have the format 

if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == (RCC_PERIPHCLK_USB))

Posted on September 13, 2017 at 15:57

Hi

Amann.Joerg

‌,

You are right. There is an issue in

http://www.st.com/en/embedded-software/stm32cubeh7.html

V1.0.0 with the function HAL_RCC_ClockConfig().

To make it work as it is implemented, you need to modify the code generated with

http://www.st.com/en/development-tools/stm32cubemx.html

:

unroll and loop on each RCC_ClkInitStruct.ClockType definition within SystemClock_Config() before calling HAL_RCC_ClockConfig() (i.e. call HAL_RCC_ClockConfig() with only one ClockType defined, not using OR operator).

This will be corrected with the upcoming STM32CubeH7 V1.1.0 to be published on st.com.

Best regards,

Cedric