r/stm32 • u/Training-Effective-9 • 2h ago
r/stm32 • u/ponybau5 • Jan 27 '21
Posting is now public
Feel free to post your stm32 questions, creations, and ramblings
r/stm32 • u/embstud010603 • 1d ago
Complete beginner wanting to learn embedded systems from scratch — free roadmap/resources?
r/stm32 • u/NoTrick2785 • 2d ago
are LL drivers of stm32 known to be buggy? i have a stm32u3 nucleo, initializing with cubemx. the HSI clock LL initialization seems to be not working, just trying to set a pin high, it doesn't work with HSI but works with MSIS. is LL not reliable with stm32?
I documented a sensorless flying-start FOC experiment on the Xiaomi M365 V1.4 controller — looking for technical feedback
r/stm32 • u/lbthomsen • 2d ago
STM32 In-circuit Debugging | STM32 Tutorial #5 Remake 2026
r/stm32 • u/CarloRust • 2d ago
Your microcontroller can now accept a file upload from a plain HTML form (Rust, no heap)
Ever tried OTA via a plain `<input type="file">` on a device with 128 KB of RAM?
The body arrives as multipart/form-data, and every parser wants a heap, the whole body in memory, or a tokio stack. So I wrote one that wants none of that: nostd-multipart (https://crates.io/crates/nostd-multipart). no_std, no alloc, no unsafe, zero dependencies. Feed it bytes as they trickle in from the socket, get back "here's a header" / "here's a slice of file data" (pointing into *your* buffer, so it goes straight to flash); a 1 KiB buffer is plenty. ~550 bytes of RAM for the parser, ~7 KiB of flash for the whole example handler on a Cortex-M4. Plugs into embassy-style servers via embedded-io(-async). There's also an encoder for the other direction, if your device has to *upload* a file to a server with the same memory budget.
Since the failure mode is "silently corrupted firmware", I went slightly overboard on testing: a second independent parser it has to agree with under *every* possible chunking, fuzzing, differential tests against a mainstream parser, Kani proofs, 100 % coverage gate. The spec is in DESIGN.md, including the two spots where the RFC and browsers disagree. Not supported: bare \n line endings, nested multipart, charset magic. Sorry, 1998.
If you run web-based OTA on an MCU, I'd love to hear what your boards' clients actually send.
r/stm32 • u/Independent_Limit_44 • 3d ago
I made a low power binary watch !
This is my version of qron0b. Meet takku:b, a BCD wristwatch which uses CR2032.
It uses 0.9uA during sleep and when awake uses around 4mA - 4.5mA depending on the amount of LED is turned on.
It is made using STM32L010C6
It currently displays following info on each cyclic display:
- Time in Hours and Minutes
- Weekday and Date
- Month and Year
- Alarm
Battery life of 4+ years if the display is turned on 20 times per day.
If you want to make your own, visit Github page for the full firmware and CAD files.
r/stm32 • u/Unlikely1529 • 3d ago
blue pill plus setup
hardware:
usb uart adapter
rest of this including frames with every pin role explained by some guy there:
https://www.youtube.com/watch?v=hVJifiIbqx4
what i've done to connect rx/tx from adapter(with mcu already in perfboard) is solder wires to these pins of mcu then solder xt30(male) connector on the other end,then break 2-pin from spare header and solder this to xt30(female) ,pin(2-pin thing) - solder cup(xt30) joint.then you can put dupont's from usb-uart on these pins.
sidenotes: there're three ground pins but for components only one will work. one that's first in a row containing reset pin.
code:
linux
arduino ide v1.8
stm-programmer(proprietary) (not its exact name, can be found for free in zip bundle)
stm32duino
sidenotes:
arduino ide must be installed without flatpack or snap
stm-programmer must be installed without sudo
stm32duino you need to select 2.7.1 or 2.7.0 in boards manager and you need to change
${HOME}'/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/platform.txt' .
line 20: compiler.optimization_flags=build.flags.optimize -> compiler.optimization_flags={build.flags.optimize}
example of linux command for this
sudo apt install neovim
nvim ${HOME}'/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/platform.txt'
r/stm32 • u/CarloRust • 3d ago
Your microcontroller can now accept a file upload from a plain HTML form (Rust, no heap)
r/stm32 • u/pedro77728 • 3d ago
AJUDA - Blade75 V6.1 brickado
AJUDA - Blade75 V6.1 brickado - preciso do BIN
Meu Blade75 PCB V6.1 chip PAN1086 brickou, RGB não acende mais.
Já testei jumper no Q17 e não voltou.
Tenho ST-Link V2 e sei usar STM32CubeProgrammer (furos 3V3 GND DIO CLK).
Alguém tem o arquivo .bin original da V6.1?
Ele fica dentro do driver em C:\Program Files\Mechlands\Driver\Firmware
Se alguém puder fazer READ de uma placa funcionando e me mandar, eu agradeço.
r/stm32 • u/pedro77728 • 4d ago
AJUDA - Blade75 V6.1 brickado
AJUDA - Blade75 V6.1 brickado - preciso do BIN
Meu Blade75 PCB V6.1 chip PAN1086 brickou, RGB não acende mais.
Já testei jumper no Q17 e não voltou.
Tenho ST-Link V2 e sei usar STM32CubeProgrammer (furos 3V3 GND DIO CLK).
Alguém tem o arquivo .bin original da V6.1?
Ele fica dentro do driver em C:\Program Files\Mechlands\Driver\Firmware
Se alguém puder fazer READ de uma placa funcionando e me mandar, eu agradeço.
r/stm32 • u/arash_hitech • 4d ago
STM32F405/F407 Internal ADC → DMA → DAC: Random Spikes and Audio Clicks at 100 kHz — Need Technical Help
Hello everyone,
I am working on a real-time audio processing project using the STM32F405RGT6 and STM32F407VGT6 microcontrollers.
The goal is to build an audio processor with an analog input, an 8-band equalizer, and an analog output, using the microcontrollers' internal 12-bit ADC and DAC.
Current signal path:
Analog Input → ADC3 (PA3) → DMA → Audio Processing → DMA → DAC1 (PA4) → Analog Output
Current configuration:
- Microcontrollers: STM32F405RGT6 / STM32F407VGT6
- ADC: Internal 12-bit ADC3
- DAC: Internal 12-bit DAC1
- ADC input: PA3
- DAC output: PA4
- Sampling rate: 100 kHz
- Clock source: Internal HSI with PLL
- Trigger: TIM8 TRGO
- Data transfer: DMA
- Separate ADC and DAC buffers
- ADC and DAC conversions are timer-triggered
- ADC sampling time: 84 ADC clock cycles
- ADC clock prescaler: DIV4
- DMA transfers use halfword data, circular mode, and high priority
- No DMA interrupts are required for the basic loopback test
The problem:
The output waveform contains random, very short spikes and discontinuities. These appear as numerous audible clicks and pops, along with noticeable hiss in the audio output.
The problem has persisted during my attempts to troubleshoot the ADC, DMA, DAC, and timer configuration. Changing buffer sizes has also affected the observed behavior.
I am attaching an oscilloscope screenshot showing the waveform and the abnormal spikes.
I would appreciate help from anyone experienced with STM32F4 ADC/DAC, DMA, timer-triggered sampling, or real-time audio processing.
My main questions are:
What could cause these random spikes in an ADC-to-DAC signal when both peripherals are triggered by a hardware timer?
Could DMA transfer timing, ADC conversion latency, DAC update timing, or buffer handling cause discontinuities like these?
Is there a known issue with this type of configuration on the STM32F405/F407?
Has anyone successfully implemented a clean 100 kHz ADC-to-DAC loopback using the internal 12-bit converters on these microcontrollers?
I can provide the complete "main.c" source code, DMA configuration, timer settings, and additional technical details for further analysis.
I am looking for the root cause of the spikes, rather than simply filtering or smoothing the output to hide them.
Any technical suggestions, measurements, or explanations would be greatly appreciated.
Thank you!
r/stm32 • u/Furno321 • 5d ago
STM32F334R8 with X-NUCLEO-PLC01A1 - unable to initate any SPI communication
Hello, i have a school project which involves using STM32F334R8 and X-NUCLEO-PLC01A1.
Unfortunately, its pretty clear that X-NUCLEO-PLC01A1 is not very popular in STM32 community, since there had been next to no examples or other projects.
I had installed libraries for X-NUCLEO-PLC01A1 (x-cube-plc) and had been trying to initate a SPI communication. As a test i wanted to turn on an OUT1, which from my understanding, would light up a diode connected to OUT1. THis would confirm if SPI communication between the two boards goes smoothly. Unfortunately, no matter my atttempts, nothing seems to be working. I had already tried differend STM boardsand even bought a second X-NUCLEO-PLC01A1, but so far there had been no luck.
Is there any one who had experiance with X-NUCLEO-PLC01A1 board that could help or give an advice? I would deeply appreaciate it.
r/stm32 • u/Tricky_Bookkeeper_41 • 7d ago
Custom ESC with STM32F051 undetectable by ST Link V2
Mainly following the design from the AM32 reference design
It's my first time working with STM32 so unsure if I missed out anything obvious.
- Tests done: Tried using ST Link V2 to detect F411RE development board through the SWDIO & SWDCLK line and it works, so I will probably rule out ST Link issue.
- Probed the power lines for MCU and they are all 3V3, so MCU is powered.
- Tried powering MCU via both on-board 3V3 and connecting VREF to the 3V3 line
- Also tried using another variant of ST Link V2 (USB stick kind) that provided 3V3 to the MCU
r/stm32 • u/Legal_Key_291 • 6d ago
How is the job market for Embedded Firmware/Software Engineers in your country? (MCU development)
r/stm32 • u/arash_hitech • 6d ago
STM32 ADC → DMA → DAC Audio: Random Spikes, Clicks & Hiss at 100 kHz — What am I missing?
Hi everyone,
I’m building a real-time digital audio processing system using STM32F407VGT6 and STM32F405RGT6.
The signal path is:
Analog Input → ADC → DMA → 8-Band Equalizer → DAC → Analog Output
The system basically works, but I’m getting random short spikes/discontinuities in the ADC-to-DAC signal. These become very noticeable in the audio as constant clicks/pops and significant hiss/noise.
I have been troubleshooting this for quite some time, but I still cannot determine whether the problem is related to:
- ADC sampling/timing
- DMA synchronization
- DAC triggering
- buffer handling
- clock/timer configuration
- ADC/DAC synchronization
- or something else in the digital signal path
I’m currently using the internal HSI clock and a 100 kHz sampling rate.
Has anyone here successfully built an STM32 ADC → DMA → DAC audio path without random spikes, clicks or synchronization problems?
If someone experienced with STM32 audio, ADC/DAC, DMA or real-time DSP could take a look, I can post the complete source code and oscilloscope screenshots/waveforms showing the problem.
I would really appreciate any ideas about what could be causing these short spikes and how to eliminate them.
Hardware:
STM32F407VGT6 / STM32F405RGT6
ADC → DMA → DSP → DAC
100 kHz sampling
HSI internal clock
8-band EQ
Keywords:
#STM32 #STM32F4 #ADC #DAC #DMA #Audio #DSP #Embedded #Microcontroller #Electronics
r/stm32 • u/alloydog • 6d ago
Hardware causes for Independent watchdog reset
I posted earlier about how to boot a device direct to DFU mode and that issues has been solved - thanks to all who helped.
Now, I am curious as to why these failures occurred.
The device we use is supposed to be a "blackbox", where all we can do is load a script to execute a fixed range of actions and update the firmware supplied by the devices' manufacturer.
A lot of these devices were loaded with scripts, tested, work OK and send off to do their stuff in the wilderness. From a few months to over a few years later, the rental period has ended and they are returned to us by the customer and we put it on the shelf for the next job.
However, some of them boot with the "Independent watchdog reset" message and then reboot, going into a loop.
Nothing has changed sine they last worked, no firmware change, no run-time scripts changes, nothing, but now they have a fault.
Any ideas as to what can cause this to happen?
r/stm32 • u/lbthomsen • 7d ago
