cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX HCLK clock configuration 30MHz limit

Dulan D
Associate II
Posted on May 23, 2017 at 10:55

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.

7 REPLIES 7
Imen.D
ST Employee
Posted on May 23, 2017 at 11:26

Hi

dulan

,

Which STM32CubeMx version are you using ? Please attach your .ioc file to check your case.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Dulan D
Associate II
Posted on May 23, 2017 at 11:54

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=false
Dulan D
Associate II
Posted on June 29, 2017 at 08:19

Any news about that issue and any potential solution? Is the datasheet of STM32F405 wrong or is STM32CubeMX the issue?

Dulan

Posted on June 29, 2017 at 15:23

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

Dulan D
Associate II
Posted on June 29, 2017 at 16:14

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!

Posted on June 29, 2017 at 14:34

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

Posted on June 29, 2017 at 14:39

No I use USB OTG FS only. You can see that from the above attached *.ioc file that I provided.

Dulan