is there an ability to dynamic clock the maple and to shutdown parts of the core.
maple ide power save functions
(4 posts) (3 voices)-
Posted 4 years ago #
-
house91320 - the STM32F103 can certainly do that, but so far there are no library functions to make it straightforward.
What sort of level of shutdown are you thinking you might need?
Posted 4 years ago # -
is there a way run it at a lower clock speed i am working on a very low power application.
Posted 4 years ago # -
You can save power by using any one of the three sleep modes - which are engaged with special instructions (see the programming manual for the cortexm3 http://leaflabs.com/docs/hardware/maple.html#recommended-reading ). So far we dont have libmaple support for this.
You can also save power by changing the clock configuration - either running slower, or using the internal RC oscillator rather than the external clock. This also doesnt have general library support, but since we initialize the clocks for you in libmaple, you can certainly start hacking away that these files in your own maple-ide-install/hardware/leaflabs/cores/maple/ directory to get the desired effect.
for example in: https://github.com/leaflabs/libmaple/blob/master/wirish/boards.cpp
you can see that the init() function (called on the front of every sketch) calls some clock setup functions (rcc_clk_init and rcc_set_prescaler). You can modify the arguments to lower the clock speed.You can also add an "#include rcc.h" to your sketch and calls these rcc_* functions directly to muck with the clock speed.
Be careful though, screwing with the clock will probably break things. For example, USB requires the clock be at least 48MHz, and other peripherals are all biased against the clock speed as well.
Posted 4 years ago #
Reply
You must log in to post.