{"id":1181,"date":"2014-03-02T21:17:56","date_gmt":"2014-03-03T03:17:56","guid":{"rendered":"http:\/\/thehackerworkshop.com\/?p=1181"},"modified":"2014-03-02T21:17:56","modified_gmt":"2014-03-03T03:17:56","slug":"the-woes-of-debugging-dma-on-the-stm32-platform","status":"publish","type":"post","link":"https:\/\/thehackerworkshop.com\/?p=1181","title":{"rendered":"The Woes of Debugging DMA on the STM32 Platform"},"content":{"rendered":"<p>I spent a good chunk of today getting frustrated with my AVC code. I have custom firmware on my GPS so that it sends a fixed-length binary sentence to my microcontroller. Rather than polling the USART, or handing an interrupt every time a character comes in, I figured this is a perfect application for the DMA controller... tell the DMA controller how many characters there are, and have it wake up my code when I receive a full GPS sentence.<\/p>\n<p>Well, during debugging, I found that my DMA IRQ was being handled once, but I couldn't get it to trigger a second time. After wrestling with this for hours, I finally thought, what if the second DMA interrupt really <em>is<\/em> happening, but because I've got the CPU stopped at a breakpoint, I'm missing it?<\/p>\n<p>So, I took out my breakpoint and instead threw a character out the USART every time the DMA IRA was called. And lo and behold, I got a DMA IRQ five times a second, which is just how often the GPS is sending me data.<\/p>\n<p>Embedded programming can be so frustrating.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spent a good chunk of today getting frustrated with my AVC code. I have custom firmware on my GPS so that it sends a fixed-length binary sentence to my microcontroller. Rather than polling the USART, or handing an interrupt every time a character comes in, I figured this is a perfect application for the &hellip; <a href=\"https:\/\/thehackerworkshop.com\/?p=1181\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Woes of Debugging DMA on the STM32 Platform<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8],"tags":[43,29],"class_list":["post-1181","post","type-post","status-publish","format-standard","hentry","category-projects","tag-avc","tag-stm32f4"],"_links":{"self":[{"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=\/wp\/v2\/posts\/1181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1181"}],"version-history":[{"count":0,"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=\/wp\/v2\/posts\/1181\/revisions"}],"wp:attachment":[{"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thehackerworkshop.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}