STM32G030 Tutorial

Timer PWM with DMA stops too early on STM32G431

Pinout & 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 STM32 MCU
Pin value of a GPIO pin set as high impedance
GPIO outputs are in high-impedance state

HAL

HAL_Delay

Because it’s an “at-least-N-ms” delay with 1ms granularity.
HAL_Delay works and doesn’t work
Is HAL_Delay(1) quaranteed to be close to 1ms?
HAL_Delay(1); takes 2ms

Timer + DMA

Hands-on with STM32 Timers

PWM

It takes 2 mins to generate PWM signal in STM32
STM32 Guide #3: PWM + Timers

PWM + DMA on G431

STM32 LESSON #5: TMER (PWM + DMA)
Confusion about length parameter in HAL_TIM_PWM_Start_DMA

  • On STM32F4 the length seems to be with respect to Data Width in the timers DMA setting
  • on STM32U575 it seems to be measured in bytes (regardless of the GPDMA settings)

WS2812

Interface WS2812 with STM32
github.com/MaJerle/stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer
Improved STM32 WS2812B DMA library
Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 5: DMA

SPI (no DMA)

WS2812

WS2812 LEDs using SPI

Leave a Reply

Your email address will not be published. Required fields are marked *