Porting FreeModbus RTU Slave to STM32F103 (Keil MDK) using USART1 and TIM6 on the Wildfire board requires wiring the protocol stack to the MCU’s UART, timer, and basic interrupt primitives. The following steps integrate FreeModbus v1.6 with the STM32F103VET6 Standard Peripheral Library (SPL), target...
1. Hardware Overview Sensor: 12 VDC industrial sensor with RS‑485 interface, Modbus RTU protocol Interface design: RS‑485 is half‑duplex; the transceiver must switch between transmit and recieve Direction control can be automated with a hardware auto‑TX enable circuit triggered by the UART TXD start...
Receive variable-length serial frames on STM32 microcontrollers using the USART idle line interrupt, without DMA. The pattern is simple: collect bytes via RXNE in the ISR and treat an IDLE event as the frame delimiter. Background: UART in brief UART sends data asynchronously as frames: start bit, da...
A complete CAN FD setup on STM32G474 (FDCAN1/2/3) using STM32CubeMX and MDK-ARM, adds minimal runtime code for UART logging, periodic scheduling, and error recovery, and verifies operation with a Jetson Xavier running SocketCAN. The example targets 500 kbit/s nominal, 2 Mbit/s data phase with BRS en...
ADS1115 at a glance 16‑bit SAR ADC, low power Four analog inputs: AIN0–AIN3 (single‑ended) or differential pairs Supply: 2.0–5.5 V on VDD, GND reference Digital interface: I²C (SCL, SDA) Address select: ADDR pin (GND/ VDD/ SDA/ SCL) Optional comparator/alert output: ALERT/RDY Typical wiring to STM32...
Bringing up 10/100M Ethernet on an STM32F429 board using STM32CubeMX to integrate FreeRTOS and LwIP with an external LAN8720 RMII PHY and an RJ45 (with integrated magnetics). 1. Hardware and pinout The LAN8720 connects to the STM32F429 via RMII. The typical signal mapping is: ETH_MDIO → PA2 ETH_MDC...
Timer capabilities at a glance 16-bit counter with up, down, and center-aligned (up/down) counting modes and auto-reload 16-bit prescaler Multiple independent channels per timer supporting: Input capture Output compare PWM generation One-pulse mode Advanced-control timers can generate complementary...
1. Fundamentals ADC converts an analog voltage into a digital code. Resolution defines the number of quantization steps: 8-bit: 0–255 12-bit: 0–4095 (2^12 − 1) A single ADC controller typicallly multiplexes multiple input channels. When reading more than one channel, enable scanning or explicitly se...
Overview In a recent project, I utilized the SBUS protocol with the Fus remote controller to control a vehicle's basic operations, including movement, lights, and mode switching. This article is aimed at beginners who are looking for a simplified guide to quickly grasp and use the SBUS protocol. Adv...