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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-22 3:33 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 7:26 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-22 4:41 PM
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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 7:01 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-23 7:26 AM
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.
Up vote any posts that you find helpful, it shows what's working..
