5 years, 10 months ago.

Setting different MCU frequency

Hi everyone,

I need help regarding MCU parameters settings. I'm not sure how to set MCU frequency to highest value (in case of F446RE - 180MHz). On default parameters, when I run simple test program where I toggle state of one output pin, I got really low frequency reading on oscilloscope (about 2.7MHz between output state changes), which I think is too slow for 180MHz (on other MCU - STM32F415RG, with same application, on 168MHz, I got 7.8MHz output). Is it any way to access to MCU parameters via mbed online compiler, or is it possible to change some register settings with code.

Thanks in advance!

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F446RET6 microcontroller.

1 Answer

5 years, 10 months ago.

Sure, that is completely possible in the normal way you would do this. Also you can remove mbed lib, and import mbed-dev/src. Then you can have a look how the clock is setup: https://developer.mbed.org/users/mbed_official/code/mbed-dev/file/ac5b0a371348/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446RE/system_stm32f4xx.c

First glance seems to indicate it is running properly, but it might also depend on on which bus the GPIO is.

Then, to get the actual core clock, print SystemCoreClock to your serial terminal (it is a variable which always exists).

Finally, do a search on FastIO (there are two, you don't want the one who is only for the LPC1768). Try running that to toggle GPIO fast.

Accepted Answer

Thanks! This helped me a lot. :)

posted by Milos Lukic 20 Nov 2015