Programming External SPI Flash on MM32F5330 through USART Host Interface
The MM32F5330 evaluation board is equipped with a 1 MB 25Q80 SPI NOR Flash and several USART/UART instances. By dedicating UART1 (PB6) to printf debug output and USART1 RX (PA10) to the host link, the MCU can receive a binary stream from a PC and persist it to external Flash.
Host Frame Format
The Python host transmits the file in fixed-size se ...
Posted on Thu, 13 Aug 2026 16:48:12 +0000 by thepriest
Configuring LPUART on NXP S32K148 for Modbus RTU
The S32K148 MCU’s Low-Power UART (LPUART) peripheral can be used as the physical layer for Modbus RTU. Below is a concise walk-through of the minimal steps and a reference driver that receives variable-langth frames terminated by a newline character.
Physical-layer essentials
Idle level: logic high (1)
Start bit: logic low (0)
Data bits: 8 (LS ...
Posted on Wed, 22 Jul 2026 16:33:40 +0000 by pacognovellino
Initializing HD44780-Based 16x2 LCD with STM32 Using 8-Bit Mode
The HD44780 controller governs standard character LCD modules like the 1602. Proper initialization requires issuing specific function commadns in a precise sequence and timing, respecting data bus width, display geometry, and internal state transitions.
Core HD44780 Command Summary
Function
RS
R/W
DB7–DB0
Timing
Notes
Clear Display
0
0
0 ...
Posted on Sun, 05 Jul 2026 16:28:12 +0000 by curioadmin
Capturing Dual Encoder Waveforms with STM32F407 Timer 5 Input Capture
This document details a method for capturing and processing waveforms from two digital quadrature encoders using the STM32F407ZGT6 microcontroller. The approach leverages the four input capture channels of Timer 5 (TIM5) to track the rotational position and direction of each encoder.
System Overview
The system utilizes the STM32F407's Cortex-M4 ...
Posted on Wed, 03 Jun 2026 18:13:14 +0000 by mattd123
Button Scan Routine with Release Detection for MCU Sleep Control
This button scanning routine is designed to manage a power-saving feature: a long press of the button triggers a shutdown of all MCU peripherals (simulated by turning off an LED), but the actual sleep mode is only entered after the button is released. This prevents accidental wake-ups by ensuring the user intentional completes the press-and-rel ...
Posted on Fri, 15 May 2026 11:36:59 +0000 by stylefrog
Handling Internal Flash Memory Operations on STM32 Devices
The internal flash memory integrated into STM32 microcontrollers provides non-volatile storage for both executable code and user data. While reading from this memory is as straightforward as dereferencing a pointer, modifying its contents requires strict adherence to hardware protection mechanisms. Write and erase cycles must be guarded by unlo ...
Posted on Fri, 08 May 2026 16:14:18 +0000 by AsianGuyJTran