
{"id":265,"date":"2015-08-14T20:41:40","date_gmt":"2015-08-14T20:41:40","guid":{"rendered":"http:\/\/timallen.name\/?p=265"},"modified":"2016-01-07T16:09:20","modified_gmt":"2016-01-07T16:09:20","slug":"stm32f1xx-some-advice","status":"publish","type":"post","link":"https:\/\/timallen.name\/index.php\/2015\/08\/14\/stm32f1xx-some-advice\/","title":{"rendered":"STM32F1xx, some advice"},"content":{"rendered":"<p>I have worked with the ST Micro ARM Cortex-M3 micro-controllers. I think I like them but here is some advice to help you along.<\/p>\n<ul>\n<li>Yes, you really need all those capacitors. These things run at 75MHz or better. Put the caps close to the pins.<\/li>\n<li>These things are more easily damaged by ESD than one might think. Yes, I know they&#8217;re supposedly marketed for automotive applications. Yes, I know the data-sheet says class blah blah blah. You need to do more, I had a product whose only vulnerability was the battery compartment and I still had to do more. I found <a href=\"http:\/\/www.dbicorporation.com\/esd-art2.htm\">this<\/a> helpful<\/li>\n<li>Build your own cross compiler from scratch! You will learn things about C\/C++ that you need to know to be a good embedded systems engineer. I have some stuff like crt0 and linker scripts on this site. Yes I cut and pasted them but I was about 3\/4ths of the way through writing them from scratch before I found prettier ones on-line and no, I did not waste my clients time, I was able to solve deep problems with other people&#8217;s projects at the same client because I understood this stuff. I stood on the shoulders of giants and <a href=\"http:\/\/fun-tech.se\/stm32\/gcc\/\">here&#8217;s<\/a> a link to one of those giants \ud83d\ude42 The <a href=\"https:\/\/www.olimex.com\/Products\/ARM\/ST\/STM32-H103\/\">Olimex site<\/a> also has some info for building a cross compiler.<\/li>\n<li>I like and recommend the Olimex boards but they have the same ESD problems I had so don&#8217;t be lulled into a false sense of security, add mitigation to your design. I used a TVP diode between VDD and VSS on the line coming from the battery clip. <\/li>\n<li>I have the FlySwatterII and the Olimex ARM-USB-OCD-H, I prefer the latter mostly because it can provide power.<\/li>\n<li>Use the ST micro provided libraries sparingly, sometimes it&#8217;s easier to understand the peripheral and write your own code than to try to sort out their library madness or HAL.<\/li>\n<li>OpenOCD and gdb are awesome. Yes gdb has a steep learning curve, no it&#8217;s not pretty, but it is the most powerful debugger known to man&#8230; The only thing I&#8217;ve ever seen that was close ran on a VAX when I was a kid. I find cgdb helpful. I sometimes use the layout stuff but it&#8217;s a bit young (read buggy) but helpful. Seriously, learn to cope with gdb it can do things no other debugger can.\n<li>Read the errata these things have a surprising number of hardware bugs!<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I have worked with the ST Micro ARM Cortex-M3 micro-controllers. I think I like them but here is some advice to help you along. Yes, you really need all those capacitors. These things run at 75MHz or better. Put the caps close to the pins. These things are more easily damaged by ESD than one &hellip; <a href=\"https:\/\/timallen.name\/index.php\/2015\/08\/14\/stm32f1xx-some-advice\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">STM32F1xx, some advice<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-265","post","type-post","status-publish","format-standard","hentry","category-embedded"],"_links":{"self":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/comments?post=265"}],"version-history":[{"count":8,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":274,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/265\/revisions\/274"}],"wp:attachment":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/media?parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/categories?post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/tags?post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}