Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 12 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:
1 Answer
8 years, 12 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.