<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Overclocking the STM32 to 128MHz</title>
		<link>http://forums.leaflabs.com/topic.php?id=31</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:16:16 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=31" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "Overclocking the STM32 to 128MHz"</title>
			<link>http://forums.leaflabs.com/topic.php?id=31#post-5919</link>
			<pubDate>Fri, 05 Aug 2011 20:17:00 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">5919@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;That code is very old.  rcc.h has been heavily reworked since then, so you'll have to port the old libmaple style of register access, individual register addresses #defined as numbers (e.g. RCC_CR) and manipulated with macros that cast them to pointers (__read(), __write()) to the new style, which is explained here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://leaflabs.com/docs/libmaple/overview.html&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/libmaple/overview.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Given that I have no idea about the practical consequences of overclocking the board, I'll just say that if you attempt this, good luck, have fun, I hope your Maple doesn't break.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>house91320 on "Overclocking the STM32 to 128MHz"</title>
			<link>http://forums.leaflabs.com/topic.php?id=31#post-5914</link>
			<pubDate>Fri, 05 Aug 2011 19:01:42 +0000</pubDate>
			<dc:creator>house91320</dc:creator>
			<guid isPermaLink="false">5914@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;can i use this in the maple ide
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bnewbold on "Overclocking the STM32 to 128MHz"</title>
			<link>http://forums.leaflabs.com/topic.php?id=31#post-114</link>
			<pubDate>Wed, 19 May 2010 22:22:50 +0000</pubDate>
			<dc:creator>bnewbold</dc:creator>
			<guid isPermaLink="false">114@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;To preface all of this, overclocking is a HACK not a FEATURE; running your Maple above the design frequency could damage it irreparably and we won't replace your board for free if you break it this way. That being said it's pretty fun...&#60;/p&#62;
&#60;p&#62;As described (discovered?) by Thomas Jespersen (&#60;a href=&#34;http://elec.tkjweb.dk/blog/2010/02/stm32-overclocking/&#34; rel=&#34;nofollow&#34;&#62;http://elec.tkjweb.dk/blog/2010/02/stm32-overclocking/&#60;/a&#62; ), the regular 72MHz system clock on certain stm32 chips can be upped by simply changing the PLL multiplier. I wrote a junky usercode implementation with libmaple; see &#60;a href=&#34;http://gist.github.com/407140&#34; rel=&#34;nofollow&#34;&#62;http://gist.github.com/407140&#60;/a&#62;. This demonstrates resetting the clock multiplier on-the-fly by dropping to the internal (HSI) clock while reconfiguring the PLL to multiply the external 8MHz crystal (HSE) by 16x instead of 9x. I confirmed with a scope; an inefficient, high-level GPIO read/write usually takes about 945ns. After calling overclock() this was reduced to 532ns, the ratio of ~1.77 indicating a SYSCLK speed around 128MHz. I'm not sure if the GPIO peripheral bus can keep up with that SYSCLK, but the uC gears are definitely spinning faster.&#60;/p&#62;
&#60;p&#62;Bumping the clock speed will break a lot of things, some of which could be configured around and some probably not. Notably USB stops working and you'll have to reprogram by resetting and uploading during the DFU wait period. Most of the peripheral clocks could probably be reconfigured to work, but the internal FLASH memory almost certainly will probably not work at these speeds. &#60;/p&#62;
&#60;p&#62;Right now this overclock() function takes about 50us to switch speeds, but this could optimized.&#60;/p&#62;
&#60;p&#62;PS: I think there's a #define typo in rcc.h that is taken advantage of here; can you find it?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
