2017-05-23 01:55 AM
Hello,
I am trying to reduce the HCLK frequency down to 8MHz or less on an STM32F405 MCU.
Using STM32CubeMX, when I configure an HCLK clock lower than 30MHz with the clock configuration tool, the box with the HCLK frequency number becomes red and the following error is indicated:
'AHB clock frequency must be >= 30 MHz and <= 168MHz'
This happens with or without the PLL.
However, looking at the documentation I do not see this limitation. There is only one which is specified:
'When the Ethernet is used, the AHB clock frequency must be at least 25 MHz.'
But in my case I do not use the Ethernet (not available for the STM32F405), and hence I should be able to go down to 8MHz for the HCLK in my opinion.
Can anybody tell me if this is an error of the clock configuration tool, or if this is a real limitation of the MCU (and where this is indicated)?
Thanks.
2017-05-23 02:26 AM
Hi
dulan
,Which STM32CubeMx version are you using ? Please attach your .ioc file to check your case.
Thanks
Imen
2017-05-23 02:54 AM
I am using STM32CubeMX version 4.1.
You can find the example with 18 MHz and the red box in attachment.
Also, it seems to be related to the activation of the USB FS as hosts. If we disable one, we can go down to 18MHz properly, but not below 9MHz. If I disable both USB hosts, then it is ok for 9MHz.
You can change the AHB prescaler from 4 to 8 for example. Bring it back to 2 so that it gives 36MHz and removes the red box.
Thanks for your help.
________________ Attachments : CubeMX_STM32F405V_HCLK_30MHz_limit.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyJO&d=%2Fa%2F0X0000000bAc%2FtsFtPijW1dgE6vTyKZKHtcnIuFLKZI7vGlRPipfV9lU&asPdf=false2017-06-28 11:19 PM
Any news about that issue and any potential solution? Is the datasheet of STM32F405 wrong or is STM32CubeMX the issue?
Dulan
2017-06-29 06:23 AM
I don't use CubeMX.
Don't you use the USB-OTG-HS unit, but with its on-chip FS-PHY? Then the quote from my above post pertains.
JW
2017-06-29 07:14 AM
Yes you are right! I was using the USB_OTG_HS unit but with internal FS Phy only, this is why I thought that I was not using the HS. By disabling the USB_OTG_HS internal FS Phy, the lower limit goes now from 30 MHz down to 14.2 MHz which is the USB_OTG_FS minimal speed:
Caution: To guarantee a correct operation for the USB OTG FS peripheral, the AHB frequency should
be higher than 14.2 MHz.Thank you for your help, now all is fine!
2017-06-29 07:34 AM
Do you use OTG_HS?
RM0090, 35.3.3 Embedded Full-speed OTG PHY:
Caution: To guarantee a correct operation for the USB OTG HS peripheral, the AHB frequency
should be higher than 30 MHz.JW
2017-06-29 07:39 AM
No I use USB OTG FS only. You can see that from the above attached *.ioc file that I provided.
Dulan