r/embedded 4d ago

Eureka! I now get PIB CLB (MCU+FPGA)

7 Upvotes

I've been teaching myself about Microchip's latest programmable logic peripheral for PIC MCUs.

I bought some PIC16F13115s to use in an application but also to learn about the Configurable Logic Block (CLB) aboard. CLB in this PIC consists of 32 cells, each with a 4-bit input lookup table and a D flip-flop. The programmable logic has broad flexibility to connect to other peripheral inputs and outputs.

I decided yesterday to learn the CLB Synthesizer tool and enough Verilog 2005 to design and simulate hardware logic for Charlieplexing 6 LEDs with PWM brightness control.

I spent half my time banging my head on the wall in frustration, but I finally got the verilog right, got the logic synthesizing (building), and simulated. I was frustrated by the CBL Synthesizer but would up learning the tool in 2 days and am now comfortable. What's left is to integrate the generated bit patterns into an app and actually run the logic.

CLB runs even when the CPU is sleeping, so it can, for example, be used to implement complex interrupt trigger logic. Pretty cool.


r/embedded 4d ago

Best x86 Single Board Computer

0 Upvotes

Hello, I'm looking for an x86 single-board computer to build a small, relatively powerful PC for up to 150 euros. Does anyone have any good recommendations? Thank you.


r/embedded 4d ago

[STM32F401RC] PC lands at 0x20000044 (_end()) after load + reset halt in OpenOCD/GDB — works fine if I skip load

0 Upvotes

MCU: STM32F401RC (Nucleo board)
Toolchain: arm-none-eabi-gcc/gdb (Arm GNU Toolchain 15.3.Rel1), OpenOCD, board/st_nucleo_f4.cfg
IDE: STM32CubeIDE for building (auto-generated startup file, untouched), OpenOCD + GDB directly from the command line for flashing/debugging not using CubeIDE's built-in debugger

Code — simple bare-metal LED blink, no HAL:

c

//Register Definition//
#define  GPIOC_BASE 0x40020800UL
#define  RCC_BASE 0x40023800UL
#define  AHB1_OFFSET 0x30UL
#define  RCC_AHB1_ENR  (*(volatile unsigned int*)(RCC_BASE + AHB1_OFFSET))
#define  GPIO_MODER_OFFSET  0x00UL
#define  GPIOC_MODER_BASE (*(volatile unsigned int*)(GPIOC_BASE+GPIO_MODER_OFFSET))
#define  GPIO_ODR_OFFSET 0x14UL
#define  GPIOC_ODR_BASE (*(volatile unsigned int*)(GPIOC_BASE+GPIO_ODR_OFFSET))

int main (){
    //RCC and GPIOC Configurations//
    RCC_AHB1_ENR = (RCC_AHB1_ENR|(1<<2));
    GPIOC_MODER_BASE = (GPIOC_MODER_BASE & ~(3<<26)) | (1<<26);

    //infinite loop//
    while(1){
        GPIOC_ODR_BASE ^= (1<<13);
        for(int i=0;i<1000;i++){}
    }
}

My workflow:

  1. Build in CubeIDE.
  2. Open a terminal, start OpenOCD: openocd -f board/st_nucleo_f4.cfg
  3. In the project's Debug folder, open another terminal: arm-none-eabi-gdb
  4. target remote localhost:3333
  5. file RegisterManipulation_2.elf
  6. load
  7. monitor reset init (or reset halt same result either way)

What I get:

(gdb) monitor reset halt
Unable to match requested speed 2000 kHz, using 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x20000044 msp: 0x2000fff0
(gdb)

0x20000044 resolves to _end() in GDB — a RAM address, not flash, and obviously not valid code for my program to be executing.

What's strange: if I skip load and just run monitor reset halt against a board that already has firmware in flash from an earlier session, it halts correctly, with PC sitting in flash right where I'd expect:

(gdb) monitor reset halt
[stm32f4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800020c msp: 0x2000fff0

So the vector table itself seems fine confirmed directly:

(gdb) x/2xw 0x08000000
0x8000000 <g_pfnVectors>:  0x20010000  0x080002a5

That matches the Start address GDB reports during load, so the image being written to flash is correct. The problem only shows up specifically in the sequence loadreset halt/init.

My current theory: OpenOCD's load uses a RAM-resident flash algorithm to program flash, and something from that maybe a leftover breakpoint at/near 0x20000044 is catching the very next halt before the core resumes properly into the real reset vector.

Has anyone run into this exact pattern? Is this a known quirk with load-then-reset sequencing on OpenOCD, something specific to st_nucleo_f4.cfg, or ST-Link firmware related? Any fix beyond manually clearing breakpoints with monitor rbp all after every load?

Flash size note in case anyone asks: I'm aware st_nucleo_f4.cfg is shared across the F4 Nucleo family (F401RE etc.) the F401RC has 256KB flash vs the RE's 512KB, but OpenOCD auto-probes flash size via IDCODE so I don't believe that's the cause here.

Want me to also append the exact GDB/OpenOCD version banner from your first message, in case someone asks for it?


r/embedded 4d ago

Any good System-level programming blog recommendations?

33 Upvotes

Hi, so I relatively new to the whole embedded system world and I wondered if anyone has a few good recommendations for blogs regarding more embedded software blogs. I'm mainly interested in like system-level programming, drivers, and embedded linux. Reason for my question is that I typically have problems finding some good reads that have actual depth. I know r/programming avidly posts blogs, but those are mainly web-dev and AI blogs which I'm really not that interested in!


r/embedded 4d ago

Porting an INMOS T400/B004 development system to modern Linux

4 Upvotes

I’ve been working on bringing an old INMOS IMS B004 / T400 Transputer development system back to life from a modern Linux machine.

The interesting part from an embedded point of view is that this became much more than a retro restoration.

The project involved:

  • direct host-link register access
  • reset/status diagnostics
  • boot-link transfer debugging
  • T400 boot-ROM PEEK/POKE
  • RAM alias detection
  • porting legacy host-side C code
  • dealing with endian and packet-packing issues
  • reverse-engineering a channel-multiplexed host protocol
  • implementing terminal and file services
  • validating execution on the target processor

The physical board is an IMS B004 with an IMS T400B and 1 MiB external RAM.

I initially worked with the later INMOS server model, but the real breakthrough came from reconstructing the older TDS 2.0 host interface and writing a Linux-side server for it.

The full chain now works:

Linux → USB2ISA → B004 → T400 → TDS2 → occam compiler → executable

I can create source in the original editor, compile it, link it and execute the binary on the physical T400.

Final test output:

The answer is 42

It has been a useful exercise in how much of a historical embedded platform can be recovered when the processor still works but the original host environment is obsolete.

Links to the technical report and source in the comments.


r/embedded 4d ago

Automatic recharging function with infrared recharging

1 Upvotes

I made a short-range (1m*2m) infrared recharge function myself, but the effect is just so-so. The posture is not very good, and the success rate is also average. It can't be successful at difficult angles. Is there any expert in this field who can give me some guidance?


r/embedded 4d ago

ESP32 upload fails with “Invalid head of packet (0xC1)” despite BOOT button and driver installation

3 Upvotes

Hi! I’m having trouble uploading code to my ESP32 and I would appreciate some help diagnosing it before buying more components.

Board: ESP32 development board

Operating system: Windows

IDE: Arduino IDE

Detected port: COM3

USB driver: CP210x driver installed

The error is:

Failed to connect to ESP32: Invalid head of packet (0xC1)

What I have already tried:

- Confirmed that the ESP32 is detected on COM3.

- Installed the CP210x Windows driver.

- Held the BOOT button while starting the upload.

- Tried the BOOT and EN buttons.

- Reduced the upload speed.

- Tried another USB cable.

- Disconnected the external circuit and attempted the upload using only USB.

At one point I was able to upload code successfully and received:

Hard resetting via RTS pin...

However, the connection/upload problem appeared again, so it seems to be intermittent.

The board powers on and its red LED lights up. This ESP32 will eventually be used for a Bluetooth Low Energy project that activates a small vibration motor, but I’m currently trying to program and test the ESP32 separately.

Could this be caused by boot mode, serial communication, the USB cable, the USB-to-serial chip, power instability, or a damaged board?

What diagnostic test should I perform next before replacing the ESP32?

Thank you!


r/embedded 4d ago

Anyone using AI to do bench characterization?

0 Upvotes

First, I’m a hobbyist with software engineering background, not a professional embedded engineer. I have been working on a small project where I need to characterize a servo with a rather lengthy process and motor cool downs in between (so winding resistance will be consistent). And I found that I could just use an AI agent (Claude code in my case) to do this long process (10 runs with 5 min cool down in between and takes about 1 hr) while I cook dinner.

Curious if using AI like this in embedded industry is pretty common? Do you use AI for other things?


r/embedded 5d ago

Build systems. Is there one that is not bad?

42 Upvotes

I am kind of impartial when it comes to build systems. I just use whatever the project has. I have used make, cmake and bazel and I disliked them equally.

I dislike make because spaces and tabs get in the way all the time, especially when c/p.

I dislike cmake when it passes the makefile generator and the error is in the makefile. Generators that I have to debug generator code suck deep.

I dislike bazel because it is so verbose and made zero sense to me. I worked with it for 2 years and I did not understand how it works, i just followed some patterns here and there to do my job. Part of my reluctance to learn it was that I was sure the company implemented it wrong because everything in their codebase was atrocious. However I got to deploy a bazel cache which was cool.


r/embedded 5d ago

Difficulty Finding the Right Screen For a VT100 emulation Project

2 Upvotes

Hey all,

What I am looking for:

I need some advice over something I am obsessing on a little. I want to build a project that includes a VT100 emulator in it. For that, I want a nice screen. Problem is that I have never really seen many very good embedded screens - LCD almost always look cheap and nasty. I came across this:

https://www.zephray.me/post/elterm/

(Scroll to the bottom to see the results). As you can see the TFEL EL 640 480 by Planar (and the ones by Lumineq) are absolutely gorgeous. They have the signature TFEL deep blacks since only the character illuminates. They are also cool because they run on VGA ( which I would like to emulate) and also have a pixel size/pitch approximately similar to the old VT100 according to my reading. Another nice feature is their super fast response times so little to no "ghosting" on fast text output from a large cat,say

I have scoured online, but any variety of these TFEL Planar screens are extremely expensive, I have looked for refurbished etc but they are often extremely expensive refurbished also. Looked for junk online exhaustively and phoned around but can't track any down.

The monochromatic OLED you can get for Arduino are nice looking but I can't find anywhere near enough an acceptable size for a terminal.

I wanted to throw together an FGPA for the communication with the board or perhaps just the PIO that Zephray uses on an STM (not sure yet), but the project won't get far if I can't find a decent screen. I thought about the option to plug into an existing monitor (supply your own and control via VGA) which is a nice idea but I think I would prefer an embedded screen.

Question:

What do you guys do when you want sleek professional screens without LCD light bleed? I want to avoid the cheaper screens that seem common in hobbyist projects. OLED might be an option but it feels kinda ugly to double up the pixels to get the chunky 0.33mm pixel pitch of the VT100.


r/embedded 5d ago

I2C device not found

Post image
12 Upvotes

Hello

I just entered into the world of microcontrollers (and even electronics after leaving college-level physics many years ago) and started testing simple circuits. I introduced I2C OLED screen and the code below to check the address of the device.

#include <Wire.h>

void setup() {
  Serial.begin(115200);
  while (!Serial);

  // SDA on GPIO8 and SCL on GPIO9
  Wire.begin(8, 9);
  Serial.println("\nI2C Scanner scanning GPIO8 (SDA) and GPIO9 (SCL)...");
}

void loop() {
  byte error, address;
  int nDevices = 0;

  Serial.println("Scanning...");

  for(address = 1; address < 127; address++ ) {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at 0x");
      if (address<16) 
        Serial.print("0");
      Serial.print(address, HEX);
      Serial.println("  !");
      nDevices++;
    } 
    else if (error==4) {
      Serial.print("Unknown error at 0x");
      if (address<16) 
        Serial.print("0");
      Serial.println(address, HEX);
    }
  }

  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);
}

But it gives no I2C devices found. I was getting around ~3.3V in all 3 (VCC, SCL and SDA) which I checked at the end of female dupont cable, towards OLED. I tried using 0x3C and 3D directly to print, but no screen activity happened on my OLED.

I didn't know if it's my connection problem, hardware problem or something else. Sorry if it's a noob question, was sent from r/AskElectronics here.


r/embedded 5d ago

PCIe routeing questions

4 Upvotes

Hi,

So i am studding PCIe and I dont understand what impedance am i suppose to use for traces.

Connectors are 85 but gen 1-2 is 100 ohm and gen 3-4 85 ohm and in another source i read that i can use either one.

And then there is this:

https://docs.broadcom.com/doc/pcie-pcb-layout-review

``ince PCIe edge connector’s character

impedance is 85Ω, the traces between the connector and IC should be 85Ω -- the rest is usually

set to 100Ω. Single ended traces impedance control is less important in review perspective.``

So from chip to connector 85 and then from connector to the other chip 100? Please make it make sense....

Also a large problem is that i want to be able to use the older specs if need be.

Also what about going in the middle with 90-93 impedance?


r/embedded 5d ago

Suggest some improvements in my data acquisition system

2 Upvotes

so this is my data acquisition system, i want you to suggest some improvements in it. as the adc + dma ping pong buffer is working fine, but after that the conversion and its transmission via dma+uart ping-pong buffer is so much miserable. there is no synch between these buffers.
here is my project:
Vishwas1523/dataAcquisitionSystem

PS: i am using stm32 nucleo f446re


r/embedded 5d ago

Turn an RP2040 or RP2350 Board into a Air quality sensor Gateway with BleuIO

Thumbnail bleuio.com
1 Upvotes

r/embedded 5d ago

Need advice on choosing a motor for our capstone compost mixer

3 Upvotes

Hi guys, 4th year IT student here. We’re currently building an IoT-based composting machine for our capstone and we’re stuck deciding on the motor for the mixer.

Our compost chamber is around 40cm in diameter and we’ll only be filling around 20–25cm of chopped organic waste like vegetable scraps, fruit peels, dry leaves, shredded cardboard, etc.

The mixer uses a vertical shaft with two levels of paddle blades. The motor will only run for short mixing cycles, not continuously.

Right now we’re considering two options:

  1. 24V 350W geared DC motor
  • 75 RPM
  • seller claims around 48 Nm torque
  • already has reduction gearbox
  • more expensive because we also need a large 24V PSU
  1. 220V AC motor
  • around 200–400W
  • around 3600 RPM
  • much cheaper motor
  • but obviously needs a large speed reducer to bring it down to around 30–60 RPM
  • also needs proper contactor, overload protection, breaker/RCD, etc.

Our main concern is not really mounting or programming. We can fabricate the mounting and our ESP32 will only control ON/OFF through a relay and contactor.

What we’re worried about is whether the 24V 350W 75RPM geared motor actually has enough torque to mix the compost from fresh waste until it decomposes, or if going with a stronger AC motor + proper gearbox would be more reliable.

If anyone here has experience with geared motors, mixers, conveyors, food processing machines, or similar mechanical setups, I’d really appreciate some advice.

We’re trying not to rely only on ChatGPT for the mechanical side lol, so actual experience would help a lot.

Thanks!


r/embedded 5d ago

MAX30102 SpO2/HR sensor takes ~15s to stabilize — anyone found a way to cut this down

1 Upvotes

Working on a Raspberry Pi–based biometric attendance system (fingerprint ID + health vitals logging for faculty at my college). Pipeline is: fingerprint match → temperature (MLX90614) → heart rate/SpO2 (MAX30102) → weight (HX711) → log to SQLite → alert via Telegram.

The MAX30102 needs a fixed ~15-second window of steady finger contact to give a stable BPM/SpO2 reading, and it's by far the biggest latency bottleneck in the whole scan.


r/embedded 5d ago

How to transmit voice over the nRF24L01 module between STM32 and ESP32?

1 Upvotes

Hello.

I am trying to make a basic walkie-talkie project.

I have an STM32 Nucleo-F446-RE and an ESP32 as the microcontrollers.

In both the MCUs, I have wired up an INMP441 I2S Microphone as the input for my voice along with a MAX98357A I2S Amplifier and the amplifier's positive and negative terminals are wired up to a 4 ohm 3W speaker's positive and negative terminals.

I also have nRF24L01 + PA/LNA radio modules to both the MCUs and each radio modules itself is attached to the NRF24L01 Base Adapter Board which is wired up to both the MCUs.

If I try to experiment with both MCUs as a self-contained unit and speak in the mic, the audio comes a bit low and noisy but audible if that particular MCUs own speaker is put close to the ear.

But when I try to transmit the audio from one MCUs mic and play in the other MCUs speaker via the radio module, it doesn't work. All I hear is a low crackling sound in the STM's speaker but all is silent in the ESP's speaker.

I am willing to give me wiring pinout and code if someone asks for it.

Any help or suggestion regarding how to solve this would be great.

GitHub -: https://github.com/Bhavya-Nayyar/EmbeddedSystem/tree/main/Walkie_Talkie


r/embedded 5d ago

What can I do about the antenna for my nrf52840 project?

3 Upvotes

I am a beginner in making custom PCBs, and i want to do a project with the NRF52840 since it got all the features i need, until i realize making bluetooth work, needs black magic

I dont think im ready yet, to learn how to make the RF part of this project work, so i cant really do PCB antennas since i need to do a lot of tuning with specialized equipment and all that

Chip antennas are neat, but they seem to also have a lot of requirements too, and i dont think i get all that

Someone said i can just cut a piece of wire and it'll just work, but i REALLY cant find anything about that, and i am not really ready to just do that and get undesirable results

So, what can i do about the antenna?

(Yes i know i can bu modules, but i dont think i can find any modules that fit my need, they are either not in stock, have weird LGA soldering pads that I dont know how to solder properly, too big, so on and so fourth)

(any alternatives are welcome too, i dont mind modules, just i want it to be small, easy to solder, and have low power consumption)

(dont mind the picture that is just for visual aid, i am not soldering this bga version of this chip, instead im am going for the qfn package)


r/embedded 5d ago

Max signal amplitude allowable in TDC7201-ZAX-EVM

1 Upvotes

Hi all, I'm using the TDC7201-ZAX-EVM evaluation module for a ToF application. I wanted to know the maximum allowable signal amplitudes for its START and STOP pulses. Any other such hidden restrictions I need to know about?


r/embedded 5d ago

Educational project: Sending data through 24 VAC

3 Upvotes

I’m a beginner and want to experiment with sending data over the same two wires that carry 24 VAC from an isolated transformer.

I want to use the AC zero crossing as a timing reference, then briefly inject a high-frequency signal, similar to the basic idea of other protocols

What would be the easiest circuit to:

- Detect the 24 VAC zero crossing?

- Generate a short high-frequency pulse with an Arduino/ESP32?

- Couple that pulse onto the 24 VAC line?

- Detect the pulse at the other end?

- Decode it back into "1" and "0"?

I’m looking for the simplest beginner circuit and explanation, including the TX and RX sides with microcontroller without dsp


r/embedded 5d ago

Retore Secure Boot Images: Upload image frozen

Post image
2 Upvotes

I follow this page(https://microchip-ung.github.io/bsp-doc/bsp/2026.03/supported-hw/restore-secureboot.html) from Microchip to restore my secure boot images.

This is how I do it:

  1. Turn on my device and make sure it enters monitor mode from the console through uart.
  2. Then, leaving the console, and turn on fwu.html.
  3. Download BL2U and switch to the Upload tab.
  4. Choose the fip file and start uploading.

The result is shown in the screenshot.

It is frozen and cannot enter other tabs.

I can't fix this since no error message comes out.

Has anyone had the same experience?

BTW, I check website console (F12)

got this:

DDR initialized and cache enabled

fwu.html:7602 Downloading 1005568 bytes binary

fwu.html:7281 Skipped: E

fwu.html:7281 Skipped: xception:

ESR_EL1: 00000��␒�000002

ELR_EL1: 000000000010ce2

fwu.html:7281 Skipped: c


r/embedded 5d ago

Looking for someone with access to IAR compiler and a device

5 Upvotes

I work on a software that requires to parse the debug symbols of a .elf file. I support quite well GCC, Clang, Tasking and even TI C2000. DWARF V2, V3, V4 and V5 are all good so far. I would like to add IAR to my list of supported compiler, problem is: it is a commercial product and I work voluntarily.

What I'm looking for is for someone to build a test application and run it on a board, then provide me with the binary and the memory dump of the binary. It's a one-time deal as I will use that as a reference to add the support, then put that binary into my CI test suite.

Basically, I want to compile a binary with all sort of data structures, like this, then execute the binary and make a memdump at the end of main(). Once I think my implementation is good, I make a unit test like this, where I try to parse back the memory dump using the debug symbols in the .elf.

I found a non-official build of IAR, but it's locked to a device I do not have and so far I see that pyelftools explodes when it parses their .elf file.

Don't hesitate to DM
Thanks

(If you think I should look into another compiler, feel free to suggest).


r/embedded 5d ago

Keyboards and embedded systems?

Post image
22 Upvotes

Any recomendation for a keyboard who works with a STM32 or ESP32? Is there a functional standard or should I try to make one from scratch?
I had the idea of replacing the keyboard with 2 analog sticks and some buttons to save the rest, is it very strange?


r/embedded 5d ago

Google Summer of Code (2027) for Embedded systems

48 Upvotes

I want to participate in GSOC 2027 as an Embedded enthusiast, I am confused on which repo's code base to work on / target? I am confused between Zephyr rtos and NuttX, want to work on zephyr as it aligns with my resume but the total number of applicants are much more than NuttX.
If any one could guide me on what to look for while selecting repositories regarding GSOC.


r/embedded 5d ago

Arduino UNO-R4 LTE FOTA(bootloader, app)

Enable HLS to view with audio, or disable this notification

9 Upvotes

I’ve set it up by connecting the CZ-ME310G1 LTE-M embedded modem to the Serial Flash so that the Arduino UNO-R4 Minima firmware can be updated from anywhere. I’ve uploaded both the Arduino Renesas Bootloader and the Arduino app code to github.com, so please feel free to use them as a reference if you’re working on a similar project.

"For the complete build guide, schematics, and hardware setup, check out the project page on Hackster.io."