Instability running STM32F205 at full speed (120 MHz) off of HSI clock
I probably should have posted this many weeks ago but after the hell I've been through I thought it worth posting this as a question that I now believe I've answered myself but in the hopes of saving someone else a few weeks of hell here goes.
For the past 3 months we've been finalizing a design built around a STM32F205. We're using both a 64 and a 100 pin version of this chip in 2 different versions of the product. Unlike our last product, this time we went without an external clock crystal (HSE) and went instead with the internal 16 MHz HSI clock source. We set the system clock at 120 MHz - the rated speed of this chip family. We don't use USB so timing precision wasn't top of mind.
After we got up the learning curve and had the application code working, we started getting intermittent lock-ups....hard faults. Sometimes it would happen immediately, sometimes it would take a few minutes, and sometimes it would go hours and even days....and then lock up.
We edited and refined the application code endlessly looking for the culprit. We wrung out practically every possible bad coding practice and loose end we could find. Nothing would stop the lock-ups which remained unpredictable but inevitable.
After weeks of having tried everything else, including reverting all the code from C++ back to C (didn't help), we finally dropped the clock rate from 120 to 100 MHz, adjusted the timer settings accordingly, and boom.....no more lock-ups.
I've looked high and low on the internet and have not found any clear cautionary guidance about this kind of problem and this solution. I've no idea if this is commonplace or just some obscure problem with this chip model.
So much time spent on something with such a simple solution. So it goes.
Cheers,
Morten
