cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, please i was using the function RCC_OTGFSCLKConfig to initilize my clock sources for usb on stm32f1 now am using stm32f4 so i want to know if there is an equivalent function for this on the rcc library Best regards,

ham10za
Associate II
1 ACCEPTED SOLUTION

Accepted Solutions

I don't know what F4 part you are using. Most only need that if you use high speed parts, like at 180 MHz, where the VCO won't divide down into 48 MHz naturally. The classic F2/F4 parts can only use the PLL-Q tap.

Perhaps looks a USB Device examples provided in the HAL for F429 or F446 type processors, if you're using those.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

The Generic F4 pulls the 48 MHz from the Q Tap of the PLL

ie 336 / 7 = 48 where 336 / 2 = 168 from the P Tap

 RCC_OscInitStruct.PLL.PLLN = 336; // VCO from 1 MHz comparison frequency, ie (HSE / M)

 RCC_OscInitStruct.PLL.PLLP = 2; // CPU

 RCC_OscInitStruct.PLL.PLLQ = 7; // USB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ham10za
Associate II

thanks for your reply Clive, so should i also configure the RCC_DCKCFGR2 by configuring the SDIO/USBFS clock selection bit or just clocking the RCC_AHB2Periph_OTG_FS with the AHB2 is sufficient in order to use my usb driver properly?

I don't know what F4 part you are using. Most only need that if you use high speed parts, like at 180 MHz, where the VCO won't divide down into 48 MHz naturally. The classic F2/F4 parts can only use the PLL-Q tap.

Perhaps looks a USB Device examples provided in the HAL for F429 or F446 type processors, if you're using those.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..