{"id":14822,"date":"2025-07-16T17:30:56","date_gmt":"2025-07-16T17:30:56","guid":{"rendered":"https:\/\/blog.bachi.net\/?p=14822"},"modified":"2025-07-20T18:04:59","modified_gmt":"2025-07-20T18:04:59","slug":"stm32g030-tutorial","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=14822","title":{"rendered":"STM32G030 Tutorial"},"content":{"rendered":"<p><a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-embedded-software\/timer-pwm-with-dma-stops-too-early-on-stm32g431\/td-p\/823773\">Timer PWM with DMA stops too early on STM32G431<\/a><\/p>\n<h1>Pinout &#038; Configuration<\/h3>\n<h3>Unused Pins<\/h3>\n<p>The unused I\/O pins should be configured as analog input by software; they should also be connected to a fixed logic level 0 or 1 by an external or internal pull-up or pull-down.<br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-products\/recommended-course-of-action-for-unused-pin-of-stm32-mcu\/td-p\/582148\">Recommended course of action for Unused pin of STM32 MCU<\/a><br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-products\/pin-value-of-a-gpio-pin-set-as-high-impedance\/td-p\/430517\">Pin value of a GPIO pin set as high impedance<\/a><br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-boards-and-hardware\/gpio-outputs-are-in-high-impedance-state\/td-p\/591414\">GPIO outputs are in high-impedance state<\/a><\/p>\n<h1>HAL<\/h1>\n<h3>HAL_Delay<\/h3>\n<p>Because it&#8217;s an &#8220;at-least-N-ms&#8221; delay with 1ms granularity.<br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-embedded-software\/hal-delay-works-and-doesn-t-work\/td-p\/371056\">HAL_Delay works and doesn&#8217;t work<\/a><br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-embedded-software\/is-hal-delay-1-quaranteed-to-be-close-to-1ms\/td-p\/239890\">Is HAL_Delay(1) quaranteed to be close to 1ms?<\/a><br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-embedded-software\/hal-delay-1-takes-2ms\/td-p\/51219\">HAL_Delay(1); takes 2ms<\/a><\/p>\n<h1>Timer + DMA<\/h1>\n<p><a href=\"https:\/\/www.youtube.com\/playlist?list=PLnMKNibPkDnHHfPVKKOE8A4AJpgDR932A\">Hands-on with STM32 Timers<\/a><\/p>\n<h3>PWM<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=9bpMReVEVzM\">It takes 2 mins to generate PWM signal in STM32<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=AjN58ceQaF4\">STM32 Guide #3: PWM + Timers<\/a><\/p>\n<h3>PWM + DMA on G431<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=SEYe6D1tiwA\">STM32 LESSON #5: TMER (PWM + DMA)<\/a><br \/>\n<a href=\"https:\/\/community.st.com\/t5\/stm32-mcus-embedded-software\/confusion-about-length-parameter-in-hal-tim-pwm-start-dma\/td-p\/786493\">Confusion about length parameter in HAL_TIM_PWM_Start_DMA<\/a><\/p>\n<ul>\n<li>On STM32F4 the length seems to be with respect to Data Width in the timers DMA setting<\/li>\n<li>on STM32U575 it seems to be measured in bytes (regardless of the GPDMA settings)<\/li>\n<\/ul>\n<h3>WS2812<\/h3>\n<p><a href=\"https:\/\/controllerstech.com\/interface-ws2812-with-stm32\/\">Interface WS2812 with STM32<\/a><br \/>\n<a href=\"https:\/\/github.com\/MaJerle\/stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer\">github.com\/MaJerle\/stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer<\/a><br \/>\n<a href=\"https:\/\/www.martinhubacek.cz\/blog\/stm32-ws2812b-dma-library\/\">Improved STM32 WS2812B DMA library<\/a><br \/>\n<a href=\"https:\/\/mcuoneclipse.com\/2015\/08\/05\/tutorial-adafruit-ws2812b-neopixels-with-the-freescale-frdm-k64f-board-part-5-dma\/\">Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board \u2013 Part 5: DMA<\/a><\/p>\n<h1>SPI (no DMA)<\/h1>\n<h3>WS2812<\/h3>\n<p><a href=\"https:\/\/controllerstech.com\/ws2812-leds-using-spi\/\">WS2812 LEDs using SPI<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Timer PWM with DMA stops too early on STM32G431 Pinout &#038; Configuration Unused Pins The unused I\/O pins should be configured as analog input by software; they should also be connected to a fixed logic level 0 or 1 by an external or internal pull-up or pull-down. Recommended course of action for Unused pin of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14822","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/14822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14822"}],"version-history":[{"count":7,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/14822\/revisions"}],"predecessor-version":[{"id":14829,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/14822\/revisions\/14829"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}