STM32F4 Discovery Blog

STM32U5 – DMA for UART TX and RX 0

STM32U5 – DMA for UART TX and RX

STMicroelectronics last STM32 release was with STM32U5 series, in Q4 2021. Product focus are extreme ultra-low-power features, enhanced security, integration, size and performance. Its advanced integration and performance options are key driver for new innovative silicon IPs. Product integrates new and most advanced DMA block ever seen in any of STM32 lines. Online training is available here. Key new DMA features Linked List : Define next configuration after first has been completed Option to work in low-power modes Selectable buses...

STM32CubeMX embedded software libraries 0

Manage embedded software libraries with STM32CubeMX

Starting with STM32CubeMX version 4.27.0 ST added an option to manage embedded software libraries directly into CubeMX and have fully integrated graphical tool to configure project into very details before building application in final toolchain (Keil, IAR, TrueSTUDIO, …). Embedded software libraries are libraries (also) provided by STMicroelectronics. You will notice them with X-CUBE-library_name name format, like X-CUBE-MEMS1 which is complete solution for ST MEMS sensors. Steps to follow To enable embedded libraries to be added to CubeMX, please follow steps, explained...

Getting started with STM32 step-by-step 0

Getting started with STM32 step-by-step

STMicroelectronics recently launched STM32 step-by-step learning program to educate and speed-up learning curve. It is ready for beginners and everyone interested to learn STM32 ARM-Cortex-M based microcontrollers together with its ecosystem around microcontroller itself. From beginner to pro in 5 steps Step 1: Pre-requisites: In this part, user must install all required software tools and make sure it has board for further development Step 2: LED blinking using STM32CubeMx and NUCLEO-L476RG development board Step 3: UART interface on NUCLEO-L476RG and L475 IoT...

C style and coding rules 0

C code style and coding rules

I’ve been trying to make my own C code style and coding rules approach, to be used in all my libs. From my first coding experience till today, I changed style many times, from first STM32F4 Library to latest projects, such as ESP_AT_Lib, onewire_uart and others.   Code style rules are published and regularly updated on my Github account, under c_code_style repository name. Please use URL below to access website: https://github.com/MaJerle/c_code_style It was originally inspired by LwIP coding style with some modification....

Tutorial: Control WS2812B leds with STM32 0

Tutorial: Control WS2812B leds with STM32

In this tutorial I will explain how to drive WS2812B with STM32 using TIM PWM and DMA peripherals in the most efficient way by using minimum amount of RAM, required to process all leds. There is a good explanation, already available on the web. If you have no experience with WS2812B leds, I strongly recommend you to read the blog post. It is very well written, but it has one major issue. It uses 24 words of RAM for each LED,...

1-Wire over UART 0

1-Wire over UART

Today’s application mostly use somekind of operating system on microcontroller. Since these apps are not really real time anymore, keeping standard 1-Wire protocol developed with delays in software may make programmer’s life much harder and annoying. UART and 1-Wire protocols have 2 things in common: To reset 1-Wire network, we can use 9600 bauds on UART To read/write 1-Wire bit, we can use 115200 bauds on UART Detailed timings for the UART reset sequence, write/read bit can be found on...