cancel
Showing results for 
Search instead for 
Did you mean: 

Inquiry about clock activation of stm32cube.

LSung.1
Associate III

Hello?

As the title states, I would like to inquire about the settings of STM32CUBEIDE(V1.13.1) of the STM32F730V8T product.

If you select USB_OTG_FS (Dual/OTG, Host Only or Device only) for the relevant MCU, it will be activated in the clock, but USB_OTG_HS (Dual/OTG, Host Only or Device only) will not be activated no matter which one you select.

This means that HS mode does not require an internal clock. Does this work properly?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

For H750, the USB can be clocked from different sources. Under this mode, it just needs a clock, it doesn't need to be 48 MHz.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

If you choose External Phy, the clock is provided by the external chip. But you need to provide that chip with a clock either with a crystal or with a clock signal.

If you feel a post has answered your question, please click "Accept as Solution".
LSung.1
Associate III

In the case of H750, it was the same as HS (External PHY), but the clock for USB was activated internally.

Is there a difference?

 

Also, in the case of the HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle) function created in CUBEIDE, there is a problem in which an error occurs every time it is compiled.

----------------------------------------------------------------------

/* Peripheral clock enable */
__HAL_RCC_USB_OTG_HS_CLK_ENABLE();
__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE__HAL_RCC_USB_OTG_HS_CLK_ENABLE();
__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE();

/* Peripheral interrupt init */
HAL_NVIC_SetPriority(OTG_HS_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(OTG_HS_IRQn);
/* USER CODE BEGIN USB_OTG_HS_MspInit 1 */

/* USER CODE END USB_OTG_HS_MspInit 1 */
}

----------------------------------------------------------------------------------

It's probably because it's a function without a function in the second line. Is there a solution to this happening every time?

 

 

LSung.1
Associate III

For H750, when using USB_HS (External PHY), the internal clock for USB is activated at 48 MHz.

What is the difference between F730 and H750?

 

Also, in the case of the HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle) function created in CUBEIDE, there is a problem in which an error occurs every time it is compiled.

---------------------------------------------------------------------------------------------------------------

/* Peripheral clock enable */
__HAL_RCC_USB_OTG_HS_CLK_ENABLE();
__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE__HAL_RCC_USB_OTG_HS_CLK_ENABLE();
__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE();

/* Peripheral interrupt init */
HAL_NVIC_SetPriority(OTG_HS_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(OTG_HS_IRQn);
/* USER CODE BEGIN USB_OTG_HS_MspInit 1 */

/* USER CODE END USB_OTG_HS_MspInit 1 */
}

---------------------------------------------------------------------------------------------------------------

It's probably because it's a function without a function in the second line. Is there a solution to this happening every time?

TDK
Guru

For H750, the USB can be clocked from different sources. Under this mode, it just needs a clock, it doesn't need to be 48 MHz.

If you feel a post has answered your question, please click "Accept as Solution".