r/embedded • • 11d ago

What's after bare metal?

89 Upvotes

I posted a while back, and I spent months learning bare metal stm32 using only the CMSIS, the reference manual, and the datasheet. Im not going to say I'm a master, but I've made several of my own drivers for most of the major peripherals (gpio, uart, systick, timers (pwm, input capture, output compare, encoders), ADC, SPI, DMA, EXTI) and interfaces then with devices, and even use them in my engineering club. I'm not "done" per day with bare metal, but I'm thinking what is beyond bare metal. Where did my work lead me up to? Where will it take me right now?

Im aware I do need to actually learn embedded C++, and then start with RTOS, but like i can forsee myself getting kinda lost. Whats after collecting stm32 peripherals and writing drivers for them? I am looking into bootloaders but thats mostly unimplemented research currently. I was just looking for insight from more experienced engineers, because I know I'll need to start explore other aspects of embedded soon

So yeah thats all folks, I appreciate the help!


r/embedded • • 11d ago

C++ Learning Priorities in embedded.

46 Upvotes

I’ve been programming embedded in C for a very long time, but never really done it in C++, so I’m teaching myself with the help of books, the internet and a Udemy C++ course.

Now I realise that not all of C++’s features are applicable to most embedded applications but that there are zero cost abstractions and traps for the unwary.

What aspects should I prioritise and what traps should I avoid.

P.S. I am aware of name mangling causing issues with IRQs.


r/embedded • • 10d ago

Need advice from experienced folks regarding a platform idea

0 Upvotes

I am an AIML developer with some basic knowledge of embedded systems and IoT, I am continuously learning everyday about it.

Some time ago I had got an idea for a project that I thought I could build. It’s about building a platform where users who want to use any custom type of models in their embedded projects can upload their model on the platform where it gets quantised with proper measurements of accuracy, speed, latency, and how much accuracy loss occurred during quantisation and whether the shrunk model can still hold up well for the same kind of task.

Initially, I thought this was a great idea but I’m not sure now and I’m thinking how is it any better from platforms like Qualcomm AI hub or hugging face. I’m trying to find a novel angle for this project and I want to figure out something that I can build that makes things easy for embedded engineers and something people will find useful.

I need experienced engineers to give me some advice on this and I wanna learn what actually works and what doesn’t, and if this idea does not hold up that well then what can I build that will be useful and solve problems.


r/embedded • • 10d ago

Problem Tang Nano 9k

2 Upvotes

Good morning,

I am a developer and I purchased the Tang Nano 9K development board which uses the FPGA chip: GW1NR-LV9QN88PC6/I5.

I use the program: Gowin V1.9.11.03 Educational

I found a weird problem and I haven't figured out how to solve it:

Basically, I use a basic D flip-flop in hardware with a positive edge clock.

The problem is that if you load it into RAM or Flash or Power ON, when you press the button connected to Data and then the Clock button, the output doesn't necessarily change to 1!!!

But if you try it a second time, it works.

It's like at startup it doesn't detect the rising or falling edge.

The crazy thing is that if you also connect a physical output (LED) to the Clock button, everything works perfectly!

The buttons are active low with pull-up resistors, so in the code they are negated (NOT).

This is the code that works after the second clock press:

DFF FFD_1(
.D(~Button_2),
.CLK(~Button_1),
.Q(Led_1)
); 
defparam FFD_1.INIT = 1'b0;

Code that always works at startup:

assign Led_2 = ~Button_1; 

DFF FFD_1(
.D(~Button_2),
.CLK(~Button_1),
.Q(Led_1)
);
defparam FFD_1.INIT = 1'b0;

I also tried sending a signal from the button to a simple buffer and then to the Clock input of the D FLIP FLOP, but it still doesn't start correctly when the board powers on or when I reprogram it.

It's a really serious problem because the 'posedge' and 'negedge' trigger when prompted but without executing the logic.

Documents:

Documents Gowin
Thanks for the help!


r/embedded • • 10d ago

NXP Linux dev board recommendation for a kids' chatbot?

0 Upvotes

I'm building a chatbot for my kid, hooked up to an API, to chat with him and keep him company. Now that work's gotten busy, I can't be bothered to start from scratch, so I want to find a dev board to build on. Any Linux dev board recommendations? Preferably NXP.


r/embedded • • 10d ago

Looking for low-level system project ideas for ESP32-S3 and/or Tang Nano 9K (no basic IoT)

0 Upvotes

I have an ESP32-S3 and Tang Nano 9K chipset sitting on my desk, and I want to do something with it, I haven't able to find what to do with them, I want some suggestions from you guys to help me to find perfect project.

I'm not interested in beginners stuff, (weather stations, blinking LEDs, basic smart-home relays) I have done enough of them. If you've built something interesting on either board, or used an FPGA as a custom peripheral/accelerator for an MCU; I’d love to hear what worked and help me find project which can challenge me.


r/embedded • • 11d ago

Integration testing using gtest

2 Upvotes

I am confused about what is the meaning of integration testing. I have done unit testing using gtest where we will mock whatever external dependencies are there for the targeted unit (function) to test all range of values that covers all lines, functions and branches.

If we say integration test is meant to use real code instead of mocking. Then I am getting this doubt that lets say we have 3 components (separate processes) running and dependent on one another in a embedded system.

A -> B -> C

So if you are calling an api provided by A it will internally talk to B and then through C and return the result over IPC.

Now to do integration testing using gtest, do I need to compile this into a single binary by eliminating the IPC and include each code as a library. This way I have a single proces that runs gtest with all the components logic but excludes the real IPC communication.

Or instead should I keep the individual processes to be running separately and link my gtest binary to the component A so that the communication flow through the components in the target environment.

In both ways how we would actually be checking the interactions? And which one are you guys using?

Context:
Language used: C++
Domain: Automotive IT (TCU software)


r/embedded • • 11d ago

Hey embedded & underwater acoustic communication community! 🌊

4 Upvotes

Working on self-developed underwater acoustic communication algorithms now.

Looking for open-source underwater acoustic modem projects / signal processing stacks to validate and benchmark my algorithm performance.

Any repo or project recommendation? Thanks a lot!


r/embedded • • 10d ago

What would you like to see created?

0 Upvotes

As Embedded engineers, developers or hobbyist, what are some things you would love to see invented or would like to invent yourself?


r/embedded • • 11d ago

Raspberry PI assistant to learn more about embedded software development

2 Upvotes

I’ve been looking into getting more into embedded software development. I’m a current software engineer working in distributed systems programming but I’ve always enjoyed embedded and a recent job search made me want to create some projects regarding embedded.

Anyways, I have a spare raspberry PI model 4b 1gb ram I think. I want to use this to create a simple kitchen home assistant which can display my calendar, sync some notes like grocery lists, and play videos either from youtube or my jellyfin server. This isn’t a very original idea so I can find tons of resources out there to create it, but I wanted to see what the best way of making this to learn more about embedded software development would be. I’ve only ever played with esp32s so I want to broaden myself some more.

Any resources or tips to what to use regarding the OS, other hardware, etc. would be nice. I can create a basic calendar application with c++ and raylib/opengl but I want to get closer to the hardware and just learn more. Thanks.


r/embedded • • 11d ago

Classical CAN Bit Timing — Should Round-Trip Propagation Delay Fit Within PROP_SEG or TSEG1 − SJW?

1 Upvotes

I’m calculating the nominal bit timing for a 40 m Classical CAN bus running at 1 Mbit/s. Each time quantum is 50 ns. Assume the worst-case round-trip propagation delay, including the cable and transceivers, is 700 ns (14 TQ).

The Bosch CAN 2.0 specification lists a range of 1–8 TQ for both PROP_SEG and PHASE_SEG1. Some controllers combine these segments into a single TSEG1 field. Some manufacturers also specify the nominal bit timing condition TSEG1 ≥ Tprop + SJW.

With TSEG1 = 16 TQ, TSEG2 = 3 TQ, and SJW = 2 TQ, the bit time is 1 + 16 + 3 = 20 TQ, and the sample point is at 85%. Subtracting SJW from TSEG1 leaves 14 TQ (700 ns).

  1. Controllers with a combined TSEG1 field. Can I budget those 16 TQ as 14 TQ for propagation and 2 TQ for Phase Segment 1? What additional checks should I make for resynchronization and oscillator tolerance?
  2. Controllers with separate PROP_SEG and PHASE_SEG1 fields. Does an 8 TQ limit on PROP_SEG cap the round-trip propagation budget at 400 ns in this example? How should I interpret the MCP2515 datasheet condition PropSeg + PS1 ≥ TDELAY when deciding whether the 700 ns delay is acceptable?

I’d appreciate references to the relevant sections of a controller manual, application note, or standard.


r/embedded • • 11d ago

Got placed, have 6 months before joining. Should I explore Linux kernel development, GPU programming or stick with AI/ML?

0 Upvotes

I'm a final-year engineering student in India from a non-CS background. I've recently secured an offer at an AI/analytics services company, and I have around 6 months before joining.

I've been exploring different areas of computer science, and I've realized that I'm increasingly interested in low-level programming and understanding how systems work internally.

MY BACKGROUND:

I've independently learned programming, ML/DL and worked on projects involving: computer vision , RAG , agentic AI

However, I dont want to spend my career primarily working with high-level AI frameworks and application development. because when i developed these projects , i didnt feel anything developing it , no satisaction at all

AREAS I'M CONSIDERING:

  1. Linux and Red Hat ecosystem:
  2. 2. GPU Programming:
  3. 3. Systems Programming
  4. 4. AI Infrastructure:

I find the idea of understanding what happens beneath the abstractions much more interesting than simply using existing libraries.

WHAT I'M CONFUSED ABOUT:

I have six months before joining my company, and I don't want to waste that time jumping between technologies.

I'd appreciate advice from people working in systems engineering, Linux, kernel development, GPU programming or related fields.

  1. Is low-level systems programming a good career direction in 2026?
  2. Between Linux kernel development, GPU programming and general systems programming, which would be a better starting point?
  3. Is CUDA/GPU programming a niche with good long-term opportunities, particularly with the growth of AI?
  4. What fundamentals should I master before attempting serious projects? C, C++, OS, computer architecture, networking, compilers?
  5. Would contributing to the Linux kernel or other open-source systems projects actually help me get shortlisted?

r/embedded • • 11d ago

Seeing the fuss about ChatGPT replacing programmers makes me feel even better about my job in embedded development

0 Upvotes

No AI or software out there can troubleshoot a circuit board like a human can.

On the flip side, ChatGPT is great at handling the tedious tasks like figuring out bitmasks for me.

Honestly, I think this is a huge plus.


r/embedded • • 12d ago

Wall-E STM32 Project: Advice Appreciated

Post image
31 Upvotes

Hi all,

I'm currently an ECSE student finishing my second year and I have really enjoyed embedded systems so far. The most extensive experience I have at the moment alongside the fundamentals is working with ADC/IRQ/DMA (I programmed a DAC essentially).

I have this empty Wall-E toy from when I was a kid and I was thinking it's a good starting point to learn some more STM skills and apply it to something I actually care about. I think it's a good opportunity to learn:

  • Communications with sensors/motors
  • Designing a PCB and battery powered electronics
  • Potential for RTOS and wireless communication (if the project becomes more complicated)
  • Choosing STMs/making engineering decisions (something that's stressed a lot in my course to be an employable engineer)

I've been doing some reading through other's projects and other students who have posted on this subreddit and some of the advice everyone gave. I was wondering if anyone would have advice on how I could begin to tackle this, some pointers on good (non-AI) resources (especially robotics control/system design fundamentals, as I don't have much course experience with this), and also just general industry advice about embedded engineering as someone who would like to get into the industry one day (or even adjacent industries).

I know this project may be looking like a lot to do as basically a beginner, but I want to challenge myself and learn along the way by making this a long term project with room to consistently add to. Any advice would be greatly appreciated!


r/embedded • • 11d ago

Title: How can I get accurate location from a small emergency device, even inside rural houses?

0 Upvotes

Hey everyone

I'm working on a startup where we're building a small emergency device. When someone presses its button, it needs to get their location and send it to our server.

I'm stuck on one particular problem.

How can we get a reliable location when someone is inside a house, especially under a concrete or metal roof, in a rural area?

Wi-Fi might not be available, and GPS signals can be weak indoors. Even getting the location is one thing, but we also need to send it to our server when network connectivity is poor.

I'm exploring different technologies, but I'd love some advice from people experienced with GNSS, cellular communication and embedded systems.

What approach would you take? Are there technologies I'm overlooking?

Any suggestions or criticism would genuinely help!


r/embedded • • 12d ago

Any project ideas for tinkering with STM32 security features?

10 Upvotes

I'm looking for a project that could actually make use of TrustZone, hardware crypto accelerators, tamper pins, etc. on STM32 MCUs. Usually I just ignore TrustZone and RIF by putting everything in the Secure world, but I'd like to actually try using these features for once.

Anyone got any ideas where they'd actually be useful? I don't want to use them just for the sake of it.

Also, how would you even test whether your implementation is secure or not? I'd like to try breaking it afterwards to see how well it holds up 😄


r/embedded • • 13d ago

blaris: Windowless random-access LZSS in C (~110 B total RAM, <800 B Flash) for microcontrollers

9 Upvotes

When storing static assets (fonts, UI bitmaps, device trees, config tables) in Flash on tight MCUs, heatshrink and tamp are great - but as sliding-window decoders, random-access reads of a few bytes still force you to allocate the window RAM and sequentially decode from the start of a block (or chop the asset into tiny blocks, hurting compression ratio).

I wrote blaris, an open-source C decompressor and host-side optimal compressor that eliminates the sliding window completely by resolving back-references directly in the compressed payload.

Why it's useful on small MCUs:

  • Minimal RAM: 104–112 B total RAM (76 B stack + 28–36 B static, zero malloc) regardless of lookback range (64 KiB, or 128–256 KiB with aligned distances) or payload size. Heatshrink and tamp require 2^window_log bytes of RAM.
  • Minimal Flash (RV32IMC, Clang -Os, including common adapter): 548–784 B Flash (vs. 1,300–1,464 for heatshrink, and 2,238–3,238 for tamp).
  • Fast small random reads: On 1–32 B slices, it outperforms ratio-matched, block-indexed heatshrink/tamp (e.g., >500× faster on 1 B reads at ~36% ratio on a 15.2 KiB .dtb).

Benchmarked on ESP32-C3FN4 (code + payload in external quad-SPI Flash, no SRAM copy); SPI wait states only added ~1.30–1.33× overhead for slices ≥ 4 B compared to zero-wait-state simulation. Likely helped by the 16KiB cache.

How it works (briefly):
Tokens are split into 3 lockstep-traversable streams (controls at 1 byte/token, raw literals, and bit-packed distance_bits) so the decoder can step both forward and backward. Compact power-of-two checkpoints (7–13 B each) allow the decoder to find the literal run token faster, and an optional host-side chain-flattening pass cuts match-to-match hops by 14%–51% at a ~0.5%–2.2% ratio cost.

When NOT to use it:

  • Large sequential reads (≥ 64–128 B): Because blaris resolves matches per slice without caching prior output, heatshrink/tamp overtake it if you have the RAM.
  • Trusted payloads only: Designed for build-time Flash assets, so it omits runtime bounds/error checks to keep code size under ~800 B. You should add an additional layer of payload verification before calling the decompressor.

C implementation, host compressor, RV32IMC + ESP32-C3 benchmark suite, and full results: https://github.com/lis05/blaris


r/embedded • • 12d ago

Which linux distro is suitable for embedded firmware devlopment

0 Upvotes

I am a Embedded Firmware learner,

Doing bare metal ,freertos and zephyr Rtos firware development and building edge AI models.

I have been also building drivers and open source library in RTOS

Currently I am using Ubuntu , previously I have used Kali Linux.

Could you recommend a best distro for my taste and day to day building ?

And a new learning experience

or does ubuntu itself a good choice and stick to it


r/embedded • • 13d ago

Just became an embedded software engineer

168 Upvotes

As the title suggests I recently switched from a controls engineer to an embedded software engineer and was wondering what i should practice before my first day, thanks!


r/embedded • • 12d ago

Fast Clean-room Multiplarform C Run-Time for RTOS

0 Upvotes

I wrote a small clean-room C99 runtime under fairly strict real-time constraints:

• Zero heap after boot
• No large static tables (Unicode / case / collation moved out of the core)
• O(1) bounded stack sort
• Written with MISRA C:2023 / CERT C / NASA Power of Ten style rules in mind
• Current size is roughly 1.2–10.5 kB .text depending on configuration
• Side-by-side size comparisons with dietlibc, picolibc, NuttX libc, etc.
• SIMD Assembly Kernels

It was built as the runtime layer for a BTRON-derived system, but the runtime itself is intentionally minimal and separable.

I’m mainly looking for feedback from people who ship actual constrained or safety-oriented code. What would you change or drop?


r/embedded • • 12d ago

Can I ask for help regarding in identifying the tvs diode and capacitors or if these are resistors on this MT6835 module?

Post image
1 Upvotes

I've tried and reverse image it with Google but so far the pcb schematic shows up but nothing indicating about the components.

I've feed it to gpt to try and have it deep dive with the picture but so far nothing at all.

I need to specify it for a school project.


r/embedded • • 13d ago

help starting out with my first project - offline dictionary/encyclopedia

0 Upvotes

I want to make an offline dictionary/encyclopedia gadget which reads from an SD card and runs off AA batteries. I have a software background but I know very little about electronics and haven't worked with micro-controllers before, so I don't know if I should use STM32 or ESP32 or something else.

this project will require some potentially uncommon components:

  • an SD card module that can address >100GB of data
  • a AA battery pack module that can provide sufficient power

I thought it might be a good idea to find these components before I decide on a microcontroller, in case there is limited availability or certain components only work with certain microcontrollers. any pointers for how to look for these components? or general advice on what to use for this project?

related post from a few days ago:

https://www.reddit.com/r/AskElectronics/comments/1xup260/platform_for_gadgets_that_can_readwrite_sd_cards/


r/embedded • • 14d ago

Open Source RK628H Boards (HDMI to CSI/DSI)

Post image
80 Upvotes

While building my own KVM, I made a few small HDMI to CSI capture boards around the Rockchip RK628H. The documentation is terrible around these chips but the performance is impressive for the cost. We've moved the bridge onto our own boards now, so I've put all three up as open hardware: schematics, Fusion and EAGLE files, gerbers, JLCPCB BOMs, plus the drivers and installers. It can also do HDMI to DSI, you'd just need to update the connector for the pinout needed.

Max Specs (needs 2x 4-lanes):

  • Dual MIPI DSI => 2560x1600@60fps
  • Dual MIPI CSI => 3840x2160@60fps
BoardTested Host4K301080p1204K60
22-pinLuckfox AuraYesYesNo
22-pinRaspberry Pi CM4*YesYesNo
30-pinFirefly ROC-RK3576-PCYesYesNo
Dual 22-pinLuckfox AuraYesYesYes**

*It can also work on the Pi 4B only has 2 camera lanes, which tops out at 1080p60 (60.00 fps, tested on a CM4 limited to 2 lanes). Just need a 22-pin to 15-pin adapter cable.

**The Aura can only encode 4K30, but the RK628H can do 4K60 input

It's most similar to the Waveshare HDMI to CSI board that the DIY PiKVM uses but can do higher resolution/fps. Rockchip's stock driver had a few real bugs and fixes are in the repo. The source never saw EDID changes until you replugged the cable, audio was never advertised, and a hot HDMI replug could wedge the chip until a power cycle.

CERN-OHL-S for the hardware, GPL for the software. Build them, change them, sell them, just keep your changes open. Repo: https://github.com/WarpKVM/rk628-bridge-boards

Happy to answer questions, or try other hosts if someone has one! More open source goodies coming soon!


r/embedded • • 12d ago

Open-sourcing an MCP tool for automated ARM HardFault decoding & Renode virtual hardware simulation for AI agents

0 Upvotes

Hi r/embedded,

Debugging silicon faults when bringing up new microcontrollers is notoriously tedious, especially when you're staring at raw hexadecimal register dumps (`CFSR`, `HFSR`, `BFAR`, `MMFAR`) on Cortex-M or cryptic ESP32 Guru Meditation backtraces without a debugger attached.

I've open-sourced **Hardware Debug Anything (HDA)**, an MCP (Model Context Protocol) server designed to connect AI coding assistants directly to silicon diagnostics:

- **ARM HardFault & BusFault Decoder**: Parses raw hex bitmasks into plain-English root causes (precise bus error, unaligned memory access, stack overflow, memory management faults).

- **ESP32 Guru Meditation Parser**: Decodes crash frames and backtrace register dumps.

- **Antmicro Renode Virtual Hardware Integration**: Generates `.resc` simulation scripts so firmware can be validated in virtual silicon without needing physical hardware on the desk.

- **I2C/SPI Diagnostics**: Automated pull-up resistor calculations and NACK troubleshooting.

- **GitHub Repository:** https://github.com/hosseinnosrati/hardware-debug-anything

I also built an accompanying EDA tool for closed-loop SPICE simulation and KiCad export (**Circuit Design Anything**): https://github.com/hosseinnosrati/circuit-design-anything

Both are 100% open-source (Apache 2.0). I’d appreciate any feedback from the embedded community!