2014-07-08 08:39 AM
Hi everybody!
I want to migrate from STM32F407 to STM32F427, and use the full power of this microprocessor (180MHz instead of 168MHz), because I need more speed ressources.First, I find this new application note:http://www.st.com/web/en/resource/technical/document/application_note/DM00123028.pdfDo you know what is the frequency overdrive mode ?Secondly, I want to set the new maximum frequency on my project (I already use a STM32F427 but at lower frequency). I use an external oscillator of 8MHz.I use this clock parameters for the moment:SystemCoreClock = 168000000;
PLL_M = 8
PLL_N = 336
PLL_P = 2
PLL_Q = 7
AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
HSE_VALUE = 8000000
Can I only change the parameter
SystemCoreClock
to180000000
? Because it works but I don't know if the speed of core change.
Thank you very much!2014-07-08 09:06 AM
Hi jean,
simply setPLL_N = 360
the SystemCoreClock should be updated by the library. Please remember that it is required to enable overdrive mode when operating at more than 168MHz! The overdrive mode is, as far as i understand what's written in the user manual, an operation mode of the internal voltage regulator. See RM0090 for details. Hope that helps, bs2014-07-08 09:45 AM
Hi and thanks!
I set PLL_N to 360 and it everything works. Indeed in my case (HSE / PLL_M) * PLL_N / PLL_P = 180MHzI also needed to set PLL_Q = 8 to configure the right speed for my USB isn't it ?------About the over-drive, I find that on the ST app note: It is recommended to enter Over-drive mode when the application is not running critical tasks and when the system clock source is either HSI or HSE.In my case, the system clock source is HSE = 8MHz? So I can pretend to enable Over-drive? There is something I can't understand... To work at 180Mhz, I need to enable over-drive, it's required. Because for the moment overdrive is not enable, what is actually the real speed of my core?2014-07-08 11:13 AM
USB isn't going to work natively if you clock the core at 180 MHz.
You might be able to clock it with a HS PHY, but I haven't done that experiment. You're not running the part AT the HSE frequency, when you run it AT 180 MHz you SHOULD enable the over-drive mode, presumably because the switch currents are significantly higher there, or it needs some different filtering. You probably don't have a full set of peripherals running either, the over-drive is likely important when you get closer to the operating boundaries.2014-07-09 01:54 AM
This is the way to enter over-drive mode:
To enter Over-drive mode, follow the sequence below:
1. Select HSI or HSE as system clock.
2. Configure RCC_PLLCFGR register and set PLLON bit of RCC_CR register.
3. Set ODEN bit of PWR_CR register to enable the Over-drive mode and wait for the
ODRDY flag to be set in the PWR_CSR register.
4. Set the ODSW bit in the PWR_CR register to switch the voltage regulator from Normal
mode to Over-drive mode. The System will be stalled during the switch but the PLL
clock system will be still running during locking phase.
5. Wait for the ODSWRDY flag in the PWR_CSR to be set.
6. Select the required Flash latency as well as AHB and APB prescalers.
7. Wait for PLL lock.
8. Switch the system clock to the PLL.
9. Enable the peripherals that are not generated by the System PLL (I2S clock, LCD-TFT
clock, SAI1 clock, USB_48MHz clock....).
I think this is out of reach for me... And it seems that not a lot of people have achieved this function. So when ST indicates ''STM32F427 - 180MHz microprocessor'' it's a little bit untruth isn't it?
-------------------------------
Anyway, I set SystemCoreClock = 180MHz and PLL_N = 360- If PLL_Q = 7, the USB com is not working in my case, my computer can't detect it (USB clock = PLL_VCO / PLL_Q = 360Mhz / 7 = 51,4Mhz)- If PLL_Q = 8, the USB is working, my computer can interact with it (USB clock = 360Mhz / 8 = 45Mhz)Do you know how I can increase the speed of the USB, because the USB clock can support 48Mhz?2014-07-09 03:52 AM
Hello,
In fact the USB com behavior is a little bit random in my config (USB clock 45Mhz). I think USB clock have to be 48Mhz.Any solution to fix my problem ?Thanks !2014-07-09 04:34 AM
Like I said you could try using an external PHY via the ULPI
The 48 MHz issues has been brought up several times, the PLL48CK comes off the System PLL Q Tap. The Reference Manual (RM0090 Rev7 May 2014) mentions USB_48MHz a couple of times, and that it's not off the System PLL, but it's NEVER actually documented or described anywhere. I've never got a satisfactory answer about USB at 180 MHz. This doesn't of course preclude anyone from running the part at 180 MHz for application which don't use USB, which is likely a significant portion of the market.2014-07-09 04:39 AM
Pushed to moderation
2014-07-09 04:57 AM
I think this is out of reach for me... And it seems that not a lot of people have achieved this function. So when ST indicates ''STM32F427 - 180MHz microprocessor'' it's a little bit untruth isn't it?
This is ALL handled in the system_stm32f4xx.c code that's appropriate for your part, like the code in the STM32F4 Firmware/DSP Library 1.3 The processor does work at 180 MHz (and beyond), so don't confuse what you're doing, with the entirety of the market.2014-07-09 05:02 AM
Ok thanks I understand.
Another solution is to overclock the STM32F4?
I try to set
SystemCoreClock = 192MHzand
PLL_N = 384in order to have a USB clock = 384 / 8 = 48Mhz, and now USB is perfectly working.
How dangerous is this overclocking ?