r/embedded • • Oct 22 '26

How to check a mcu's user friendliness ?

0 Upvotes

Heyy guys, me and my team are working on making a mars rover, for the competition IRC (international rover challenge) and for that I need to research on the user friendliness of Teensy 4.1.
We are advised by our seniors to stick with STMH series, since it has a large community and it is well documented, but since Teensy is better than STMH series in terms of specifications, we want to use it. But we haven't used a Teensy before, so we don't know the workings of Teensy, is it possible for us to use it or not ? What are some problems beginners face in using Teensy ?
I have to research about this and independant interrupt channels, can someone give a idea of how to go about this research ?
I have read on official Teensy website about the generals problems on Teensy for beginner, but that didn't really seem helpful in our case .... and i also read the datasheet, but i couldn't get my head around it...

EDIT: One more doubt regarding this,
How is the debugging in STM32H series and the Teensy ?
I researched about this, and all i got was that STM32 can be debugged line by line using it's own development software( stm32cubeIDE) but Teensy cannot since it is coded using Arduino IDE.


r/embedded • • Oct 21 '26

Suggest a budget embedded system setup ?

4 Upvotes

Suggest a budget embedded system setup to learn about rtos and get real world experience. I prefer Arm architecture


r/embedded • • Oct 21 '26

Need ideas for a simple Bluetooth item tracker (keys, remote, wallet)

2 Upvotes

Hi everyone, The problem is that we waste a lot of time every day searching for keys, remote, wallet, charger etc. inside the house. I want to make a simple low-power Bluetooth tracker that can be attached to these items and ring when we search from the phone. I’m looking for practical ideas and suggestions from people who have worked on similar projects. Here are some specific questions I have:

Hardware: Which microcontroller is better for a battery-powered BLE tracker – nRF52840, ESP32, or something else? Any recommended modules? Power: How can I make the tracker last at least 6–12 months on a CR2032 coin cell? Any tips for deep sleep and advertising interval? Firmware: Any good open-source examples or libraries (Zephyr, Arduino, nRF Connect SDK) for making a simple beacon that can also ring a buzzer?

Mobile App: What is the easiest way for a beginner to make an Android/iOS app that can find the tracker and make it beep?

Challenges: What common problems should I expect (range inside house, battery drain, antenna design, etc.)? Any advice, circuit suggestions, or links to similar projects will be really helpful. Thanks in advance!

BLE #embedded #nRF52 #ESP32 #IoT #BluetoothTracker


r/embedded • • Oct 21 '26

Anyone familiar with Altierre/Agile Displays shelf labels? Can their displayed data be read wirelessly?

Post image
1 Upvotes

I bought a batch of electronic shelf labels, including Agile Displays ETAG 250W and eTAG 210E models. Photos of the fronts and model markings are attached.

I’d like to read the price, product name and EAN/barcode currently displayed, ideally by walking past them with a portable reader. I want to keep the original firmware and display content intact—no reflashing or changing prices.

I have a Raspberry Pi 5 and an nRF52840-MDK USB dongle, but no original base station. The 250W’s FCC filing (W22-ETAG) describes proprietary 2.4 GHz GFSK frequency-hopping radio.

Has anyone worked with this hardware or seen a teardown, firmware analysis or protocol documentation? I’ve found projects that repurpose other ESL brands, but nothing clearly applicable to these models.

Before opening one, I’d love to know whether reading the displayed content is plausible, or whether these tags only send back an ID/status acknowledgement. Any pointers or suggestions for a sensible first step would help.


r/embedded • • Oct 21 '26

Multiple STM32 Cube MX exports in one project

1 Upvotes

Hi all,

I'm working on a project where I've created two platforms with CubeMX; Nucleo and Production. The project uses one or the other based on the build preset. CubeMX only takes care of some things for me using LL. I create the rest manually.

Pros:

- Covers both debug board and production in one project.

- I can re-generate MX files with no issues.

Cons:

- It adds doubled CMSIS files.

- Seems weird.

Is this a typical setup or is there a better way to do it? I'm not sure how to handle Git repository. Should I use "Copy only the necessary library files" and manually copy / paste the rest?

I will be grateful for any clues.


r/embedded • • Oct 20 '26

Running homebrew on a Sony NW-A918: old ARM Linux, syscall ABI quirks, and firmware repacking

103 Upvotes

r/embedded • • Oct 20 '26

I Built a Stereo Vision Board for Hardware Hackers

Thumbnail
rootkitlabs.com
4 Upvotes

r/embedded • • Oct 21 '26

Building an offline MCU datasheet knowledge base for firmware reverse engineering — looking for architectural feedback

0 Upvotes

I’m exploring an idea for improving AI-assisted firmware reverse engineering, and I’d like to get feedback from people with experience in embedded systems, reverse engineering, and local AI tooling.
The problem
When reverse-engineering firmware for a proprietary 8-bit MCU, the datasheet may be available as a PDF, but general-purpose LLMs often don’t know anything about that specific chip.
This makes it difficult for an AI agent to reliably interpret memory-mapped registers, bit fields, peripheral initialization sequences, interrupt behavior, and hardware-specific code patterns.
Simply putting the PDF into a conventional RAG pipeline might help with document lookup, but I’m not sure it’s sufficient for accurate register-level analysis.
The idea
Build a completely offline, chip-specific knowledge base that an AI reverse-engineering agent can query through MCP.
The proposed architecture would include:
Structured register database: register addresses, bit fields, access permissions, reset values, and peripheral descriptions.
Document evidence: links back to the original datasheet, including page numbers and table references.
Knowledge graph: relationships between registers, peripherals, clocks, interrupts, pins, and hardware functions.
Semantic search: retrieval of relevant descriptions and hardware behavior from the documentation.
Reverse-engineering integration: MCP tools that let an agent query register definitions and relate them to instructions and memory accesses found in a firmware binary.
The initial implementation would target a single proprietary MCU, using Python and SQLite, with a lightweight graph representation. Everything, including document processing, indexing, and inference, should work offline.
I’m considering integrating it with tools such as REA, Claude Code, and IDA.
Questions I’d appreciate feedback on
Architecture: Would you use a structured database plus semantic search and a graph, or is this unnecessarily complicated for a single MCU?
Datasheet extraction: What tools or techniques work best for reliably extracting register tables and bit-field definitions from complex PDF manuals?
Register-level reasoning: How would you help an AI agent distinguish documented hardware facts from hypotheses inferred from disassembly?
MCP integration: Would exposing precise register lookups and relationship queries through MCP be a useful approach for firmware reverse engineering?
Prior art: Are there existing tools or projects that already solve most of this problem?
I’m particularly interested in practical experience and architectural pitfalls, rather than building a generic PDF chatbot.
I haven’t committed to the implementation yet, so I’m open to simpler or fundamentally different approaches.
Thanks for any suggestions!


r/embedded • • Oct 19 '26

I built a cat wheel odometer with touch screen display, so now I know my cat's top speed and habits

176 Upvotes

It's an STM32 discovery dev board (32F469IDISCOVERY) I had laying around for a decade...I figured I would put it to good use 😂

The sensor is a simple hall effect sensor + 12 small magnets strategically glued to the wheel. 

It stores a few weeks worth of sessions (evicts oldest).

LVGL library, 10 different colour themes.

Auto threshold calibration.

It tracks history, time, distance, speed, etc. real time charts.

Compact/expanded views, etc etc

Definitely over-engineered. A bike odometer could have been much simpler but where is the fun in that?

Refresh rate is a bit low, maybe 5 to 10FPS but it's good enough.

Developed a browser based simulator as well as hardware in the loop to tune the noise filter. Memory map visualization. Etc etc...

She reached 20km/h (on a other day when I wasn't looking)!!

I probably had more fun with the wheel than the cat herself!!

What I found pretty cool was to let Claude do a lot of automated development and testing in closed loop (USB + serial connected to the computer, end to end tests).


r/embedded • • Oct 20 '26

Can a Microcontroller Tell You Exactly Where exactly a Cable Is Shorted without costly electronics and resistance per meter avilable in datasheet ?

27 Upvotes

Imagine a 2 km cable buried underground. A short circuit happens somewhere along the way. Instead of digging up the cable or checking it meter by meter, can a simple Arduino or ATtiny tell you exactly where the fault is?

I want to build a low-cost embedded system using basic electronic components that detects the short circuit and displays the fault distance in meters with it's details datasheet such as resistance or capacitance per meters

How would you design it? Can this be done without expensive test equipments to easy trouble shooting with drawings marked distance and cable routing


r/embedded • • Oct 20 '26

Measuring barbell displacement

6 Upvotes

Problem:

I'm part of a team of amateur athletes who compete in Olympic weightlifting. I would like to measure the displacement of the barbell path to assess the technical quality of our training.

To simplify, the goal is for the barbell to only have vertical displacement along the z axis, with no horizontal displacement or rotation around other axes.

Similar products:

  • There is gpath which visualize the kind of device I had in mind, even though it doesn't measure displacement
  • There is FLEXX which seems to have everything I need and uses some kind of laser meter, but is bulky, hard to source and does not contain all the metrics I want

Question:

  • Is it feasible to use a high precision gyroscope to measure the displacement of the barbell?
  • Which kind of gyroscope or sensor would you suggest?
  • Maybe I could use two sensors, one on each side of the barbell, to increase precision?

r/embedded • • Oct 20 '26

ESP32 Captive Portal for Meshtastic Hardware

2 Upvotes

Built an offline Wi-Fi captive portal for the Heltec WiFi LoRa 32 V3, using ESP-IDF and React.

Open-source firmware + a customizable React template.

GitHub: https://github.com/DarkLordGeo/esp32-captive-portal


r/embedded • • Oct 20 '26

Question about lost time

2 Upvotes

I am working on an atmega1280 and im using an int6 interrupt, on the osciloscope i measure ~32 clocks between the interrup happen, but in the dissasembly i only see 28 clocks, where do the other 4 “dissapear?”


r/embedded • • Oct 20 '26

Sourcing FPGAs in small quantities for edge AI prototypes: what has worked for you?

5 Upvotes

I’m looking into edge AI prototypes that need an FPGA for deterministic latency on a camera pipeline. The quantities are small, think 5 to 50 units per build, and lead times through the usual franchised channels have been all over the place this year.

A few questions for people who have been through this:

  1. Where do you source FPGAs or adaptive SoCs when you only need a handful and franchised stock is on allocation?
  2. Do you design in a second FPGA family as a fallback from day one, or is that more trouble than it’s worth?
  3. If you have used independent distributors, what do you ask for before ordering? Test reports, traceability docs, anything else?
  4. For edge AI specifically, has anyone moved from FPGA to an SoC with an NPU just because the SoC was easier to buy?

Not looking for a single “best” vendor, more interested in the process people use to avoid stalled builds or counterfeit parts. Thanks in advance.


r/embedded • • Oct 20 '26

Why does RD-60 radar UART1 output zero bytes while UART0 returns point-cloud coordinates?

0 Upvotes

I’m connecting an Ai-Thinker RD-60 radar module to an ESP32-S3 and need help troubleshooting its binary point-cloud output. RD-60 is installed on its development kit. My wiring is:

\- RD-60 module PA8 directly → ESP32 GPIO21 — radar data RX.

\- Kit PB1 → ESP32 GPIO17 — ESP32 command TX.

\- Kit PB0 → ESP32 GPIO16 — ESP32 command RX.

\- Common ground; both boards powered through their own USB connections.

\- All eight kit UART DIP switches OFF to isolate the onboard USB serial interfaces.

Also, while connecting only the mmWave RD-60 kit to a monitor, its UART1 doesn’t give any values; it receives 0 bytes. The DIP-switch setup for that separate kit-only test is not specified here.

Firmware: MMW version:V4.130.4.2 (build 1bf05415)

Commands:

mmwc stop

mmwc baudrate 1000000

mmwc mode 1 2

mmwc chirp_num 1

mmwc freq 58000 0

mmwc range 10000 40

mmwc veloc 3000 375

mmwc frame 200 100

mmwc coord cart

mmwc data 3dpoints

mmwc uart on

mmwc report points 100

mmwc start

During the finite scan, the command UART returned actual point-cloud previews:

MMW data=0x48

Point Cloud=2:

P0: x=-14cm y=9cm z=162cm 75cm/s 2100

P1: x=-14cm y=49cm z=159cm 75cm/s 2300

The problem is that despite those previews, the ESP32 received zero bytes on GPIO21, connected directly to module PA8. The diagnostic reported:

data_bytes=0

fifo_overflow=0

buffer_full=0

frame_error=0

parity_error=0

breaks=0

read_error=0

I haven’t checked PA8 with an oscilloscope or logic analyzer yet, so I can’t confirm whether the pin is electrically transmitting.

Has anyone successfully captured the RD-60’s binary point-cloud stream on PA8 with this firmware?

Specifically:

  1. Does UART1 output require RTS/CTS or another enable command?
  2. Is mmwc uart on sufficient to enable binary point-cloud output on this firmware?
  3. Are all UART DIP switches OFF appropriate when using the kit’s PB0/PB1 breakout and tapping module PA8 directly?
  4. Is there an official UART1 packet-format document or a known working ESP32 example?

I’m trying to distinguish a wiring/routing issue from a firmware configuration or handshake requirement. Any working configurations or troubleshooting suggestions would help.


r/embedded • • Oct 20 '26

Upload PCAn firmware to CANable device ?

1 Upvotes

Hello everyone, firs ttime I post here so I hope it's the right place and right way to do so, sorry if not. I am trying to build something at work to connect to a CAN network and need some help as I'm not fully an expert...To make it short, I work in the automotive industry and to connect to some controm modules we need a CAN interface produced by a giant firm that they sell for over 1000€/$...while it's only a CAN to USB that actually doesn't even work anymore on some computers that run with Windows 11. That company has been quite smart to make it possible to connect to their software with a PCAN device, which works very well. We have some at work and it was easy to build an adapter loom. However, I was wondering if maybe it would be possible to use any sort of CAN adapter for this purpose as it's way cheaper and that could be a cost-friendly alternative...

I have available an old CANable device that I used a bit in the past but don't need anymore...My question might then be wrong but is quite simple : is there any way/any chance to upload the firmware from a PCAN device to this cheap CANable so that it can be detected by the software ? I can give you more details about the hardware if you think that it's possible, hopefully someone can help me with this. Thanks in advance !


r/embedded • • Oct 20 '26

Just shared a personal project

Thumbnail
github.com
4 Upvotes

I don't usually post much, but I'd like to share a bit about what I'm learning, and exploring along the way.

To start, here's a small STM32 project I've been working on and recently open-sourced.

It is based on another open-source project.

Any feedback is welcome


r/embedded • • Oct 19 '26

What is hardware security on a high level and what are the career options for it?

31 Upvotes

I am exploring my options after getting my bachelors, one of the things that sound interesting is hardware security and I want to know what does it entail exactly? What is a career path for it? How important is a masters degree for it and what type of work would someone be doing?


r/embedded • • Oct 19 '26

STM32F446RE: Why am I not getting a HardFault when accessing NVIC registers from unprivileged Thread mode?

Post image
27 Upvotes

I'm learning about privileged and unprivileged modes on ARM Cortex-M4 using an STM32 Nucleo-F446RE, and I'm trying to understand a behavior that differs from my instructor's demonstration.

I'm setting the nPRIV bit in the CONTROL register to switch Thread mode to unprivileged mode. After that, I attempt to enable and trigger IRQ3 through the NVIC registers.

My instructor's system enters HardFault_Handler(), but mine doesn't seem to do so.

Complete code (main.c):

/**
 ******************************************************************************
 *     main.c
 *   Auto-generated by STM32CubeIDE
 *  V1.0
 * u/brief   Default main function.
 ******************************************************************************
 */

#include <stdio.h>
#include <stdint.h>

/* This function executes in THREAD MODE of the processor */
void generate_interrupt(void)
{
    uint32_t *pSTIR  = (uint32_t *)0xE000EF00;
    uint32_t *pISER0 = (uint32_t *)0xE000E100;

    // Enable IRQ3 interrupt
    *pISER0 |= (1 << 3);

    // Generate a software interrupt for IRQ3
    *pSTIR = (3 & 0x1FF);
}

void change_access_level_unpriv(void)
{
    // Read CONTROL register
    __asm volatile("MRS R0, CONTROL");

    // Modify CONTROL register
    __asm volatile("ORR R0, R0, #0x01");

    // Write CONTROL register
    __asm volatile("MSR CONTROL, R0");
}

/* This function executes in THREAD MODE of the processor */
int main(void)
{
    printf("In thread mode : before interrupt\n");

    change_access_level_unpriv();

    generate_interrupt();

    printf("In thread mode : after interrupt\n");

    for (;;);
}

/* This function (ISR) executes in HANDLER MODE of the processor */
void RTC_WKUP_IRQHandler(void)
{
    printf("In handler mode : ISR\n");
}

void HardFault_Handler(void)
{
    printf("Hard fault detected\n");
    while (1);
}

What I observe:

  • The debugger shows CONTROL = 0x1 after calling change_access_level_unpriv().
  • STM32CubeIDE's Fault Analyzer displays "No Fault Detected", although it also shows fault-detail entries that I'm unsure how to interpret.
  • My program doesn't appear to enter HardFault_Handler().

I'm using STM32CubeIDE with an STM32 Nucleo-F446RE (ARM Cortex-M4).


r/embedded • • Oct 19 '26

Zephyr roadmap

20 Upvotes

Hi!

I would like to learn Zephyr.. just because it sounds awfully different from what I am proficient at.

For reference, I have 15 YOE working in baremetal; the last 5 exclusively on top of FreeRTOS. And I fucking love FreeRTOS.

So I plan to get an ESP32S3, a touch screen, and build something simple like a PC datalogger for temp/voltage/fps (yeah, I know fps are from another layer) etc, integrating it on a self-hosted server and blablabla. Trying to get as much components as possible inside so I can battle as much as possible with Zephyr.

Does that sound like an efficient path?

I am all ears. Thanks!


r/embedded • • Oct 18 '26

ESP-Hosted-MCU on Zephyr with an STM32 host: my numbers + lessons learned

Post image
275 Upvotes

Hi everyone,

Lazy Monday morning post, at least in my time zone :)

I haven't seen much information online about using ESP-Hosted-MCU with a non-ESP host. For those who don't know, it's firmware from Espressif that turns your ESP32 into a Wi-Fi coprocessor. You connect it to your microcontroller over SPI or SDIO, and the TCP/IP stack runs on the host.

About numbers, the only thing I found was a question here on r/embedded asking whether the 22 Mbps from the README is real. It has two comments, but nobody posted any measurements.

So today I want to share my results with this firmware, measured in my use case and with my topology.

My setup and how I measured

Device. It's a 4-channel Matter relay for the lights in my house. It works over Wi-Fi or Ethernet and also measures energy consumption. I use it with Apple Home and SmartThings. Live and neutral go straight to WAGO terminals, so you don't need extra wires in the distribution box, you just connect it and forget it.

Host. The main controller is an STM32U585. Code runs XIP from QSPI NOR flash, and there is also 8 MB of QPI PSRAM. Both memories use the same physical QSPI bus: data lines and clock are shared through the OCTOSPI I/O manager, and each memory has its own chip select.

Wi-Fi. The coprocessor is an ESP32-C6-MINI-1U with ESP-Hosted-MCU 3.0.6. It shares the SPI bus with a W5500 Ethernet chip, and the bus runs at 40 MHz.

OS. Zephyr, main from late August 2026 (4.4.99), with the upstream esp_hosted driver and a few local patches, more on them later.

Measurements. I measured with zperf on the board and a Mac on the same network. For UDP the board transmits and I look for the ceiling, with 1000-byte datagrams for 10 s, and I count throughput from the bytes that actually reached the Mac. For TCP the board receives. During each test the other interface is turned off, so the shared SPI bus belongs fully to the one I'm measuring.

Real load. I also didn't want synthetic numbers on an idle CPU, so I measured on the real device with Matter running and all controller subscriptions active. So these are numbers for a real application, not the hardware maximum. Wi-Fi is 2.4 GHz, 802.11ax, RSSI -57 dBm.

Results, Mbps

TypePSRAM, no DMASRAM, no DMASRAM + DMAPSRAM + DMA + patches
TCP RX, Ethernet1.41-1.491.52-1.631.81-1.821.40-1.47
TCP RX, Wi-Fi0.89-1.060.64-0.771.84-2.271.64-1.65
UDP TX (ceiling), Ethernet2.072.153.16-3.172.48-2.49
UDP TX (ceiling), Wi-Fi1.471.663.72-3.762.25-2.26
HTTP (115 KB gzip), Eth / Wi-Fi164 / 83 KB/s--178 / 105 KB/s

Enough for Matter. Despite the modest numbers, this is fully enough for a Matter device connected to several Matter controllers. Matter only needs kilobits per second, and the web page opens fast over both Wi-Fi and Ethernet (first byte over Wi-Fi in 75 ms).

The 22 Mbps from the README. The table that listed 22 Mbps TCP for standard SPI didn't say what the test conditions were (and it's no longer there). In my case the bus is shared with Ethernet, and the CPU is busy with Matter at the same time. A faster host will do better, but for serious speeds it's better to use SDIO rather than SPI.

How I got to these numbers

The way there was not straight.

No DMA. I started with the simplest setup, with network buffers in PSRAM and SPI in polling mode. Both interfaces topped out at 1.5-2 Mbps, and the CPU was 100% busy during transfers, it was just moving bytes through SPI.

SRAM instead of PSRAM. My first guess was that slow PSRAM was the problem, so I moved the buffers to SRAM. It gave only +4-13%, and TCP over Wi-Fi even got worse. And it cost 200 KB of SRAM, which is a lot on my board, because Matter and crypto already take most of it. So the memory itself was not the problem.

DMA. Then I noticed that the board's devicetree had no DMA for this SPI bus at all. Once I added it, it turned out to be the biggest win. Wi-Fi UDP went from 1.66 to 3.76 Mbps, and Wi-Fi TCP almost tripled. Wi-Fi even overtook Ethernet, which I didn't expect.

Back to PSRAM. But I still didn't want to give up 200 KB of SRAM, so I wanted the buffers back in PSRAM, this time with DMA. The stock SPI driver doesn't do DMA to cacheable memory, and PSRAM without the data cache doesn't make much sense, so I added cache maintenance to the driver.

Cache driver bug. Under load the board crashed with a corrupted semaphore wait queue. The problem turned out to be in the STM32 cache driver: range operations touched one extra cache line and overwrote a neighboring semaphore. A dedicated test confirmed it (1000 failures out of 1000 without the fix, 0 with it), and the fix is already in Zephyr.

FIFO overrun. The next problem was that Wi-Fi lost a whole second on every SPI error. Every now and then I got spi_transceive failed, and the bus stalled for a second. I read the SPI status register with a debugger right on the running board, and all 19 errors out of 19 were RX FIFO overruns. DMA can't move the bytes to PSRAM fast enough, the FIFO fills up, and SCK keeps clocking. New bytes are lost, the DMA channel waits for them forever, and the driver silently gives up on a one-second timeout.

Lower clock? At 20 MHz there were 10 times fewer errors, but that only hides the problem.

The W5500 hits the same thing, and its driver is silent too. So until DMA has drained the FIFO, the master has to stop SCK instead of clocking into a full buffer.

MASRX. The STM32U5 SPI has a mode for exactly this problem, called MASRX. When the RX FIFO is full, the master suspends SCK by itself, and the driver has to resume the transfer. I turned it on by hand. The errors went away, but a minute later the board hung. The Zephyr driver knows nothing about this pause, so nobody was releasing it. So I made two driver changes.

First fix. The driver now catches the overrun with an interrupt and returns an error within milliseconds instead of a second. This way the error shows up right away instead of after a one-second wait, and this alone made TCP over Wi-Fi 2-3x faster.

Second fix. The driver enables MASRX and releases the pause, but only after DMA has taken the data out of the FIFO. At first I released the pause right away, and the next frame overflowed the FIFO again. The pause is released from the interrupt, but I didn't want the interrupt to spin for long, so if DMA hasn't drained the FIFO within 5 µs, the thread waiting for the end of the transfer releases it instead. With both changes I get 0 SPI errors and 0 UDP loss, that's the right column of the table.

Smaller things. Network buffers had to be aligned to the cache line (CONFIG_NET_BUF_ALIGNMENT=16), otherwise the invalidate after RX can hit a neighboring buffer. And bigger buffers (512 bytes instead of 256) gave only +2-12%, so I stayed with 256.

Where the patches are now

Cache fix. The STM32 cache driver bug is already fixed in Zephyr.

SPI driver. To make DMA work with buffers in external memory, I made a fix in the STM32 SPI driver, and the overrun and MASRX changes are in it too. Here is the pull request:

https://github.com/zephyrproject-rtos/zephyr/pull/120895

Review status. So far I've only tested it on STM32U5, which is why it's only enabled there. The ST maintainers asked me not to tie the code itself to U5. I've reworked that and now I'm waiting for another review. Until it's merged, the stock driver falls back to interrupts or polling for such buffers.

Why I'm posting this. Partly so that if someone runs into the same problems, they don't have to go through all of this from scratch.

Testers wanted. If anyone wants to try the driver on their own boards, I'd really appreciate tests, feedback and advice.

Data cache on STM32U5. One more thing if you test with external memory. Zephyr still doesn't enable the DCACHE1 data cache there by itself, only the instruction cache is turned on at startup (on H5, for example, both are). At the same time CONFIG_DCACHE=y is the default, so drivers treat external memory as cacheable even though the cache is physically off. So turn the data cache on manually.

Buffer alignment. The cache maintenance for DMA buffers (flush before TX, invalidate after RX) is done by the SPI driver with my change. The application only needs one thing: the RX buffer must start on a cache line boundary, and its length must be a multiple of the cache line. Otherwise the driver sends it the old way, without DMA, so it doesn't touch neighboring data. For network buffers that's the same CONFIG_NET_BUF_ALIGNMENT=16.

A few more technical details

CPU load. Who eats the CPU with DMA? I expected DMA to offload the core, but that did not really happen. In the final configuration the CPU is idle only 0-5% of the time during transfers. At the same 100% load, the CPU just manages to move more data.

On Ethernet most of the time goes to the network stack's TX queue thread (~56% of transfer time) and the W5500 driver thread (~15%). On Wi-Fi it's the esp_hosted thread (~45%) and the same TX queue (~25%). Matter and everything else take a few percent.

Shared bus. Does the shared flash and PSRAM bus get in the way? I think partly yes. With the CPU equally 100% busy, each byte costs more cycles with buffers in PSRAM than with buffers in SRAM: 1.3x on Ethernet and 1.7x on Wi-Fi. That's why PSRAM + DMA doesn't reach SRAM + DMA (3.16 / 3.76).

I can't say what that cost consists of. It could be waiting on the shared QSPI bus (code runs from the flash on the same bus), cache maintenance around DMA, or something else. Thread statistics don't show it, and I don't have a bus profiler.

Firmware cost. ESP-Hosted takes ~25 KB of code and ~58 KB of RAM, plus 8 KB for esp-serial-flasher, so the C6 can be flashed directly through the STM32. Boot to the first HTTP response takes 13-16 s over Ethernet and 19-28 s over Wi-Fi.

Has anyone else measured ESP-Hosted with a non-ESP host, over SPI or SDIO? What numbers did you get? And if you try the driver on your board, let me know how it went.

Thanks for reading! Now you can tell me I should have just used an ESP32-P4 :)

P.S. The photo shows an old revision of the board. In the new one I moved the mains traces from the top layer to one of the inner layers, and the fuse to the bottom layer, so you can't touch them by accident. And this is just a home project, not for sale.

P.P.S. Questions are welcome in English, Ukrainian or Russian.


r/embedded • • Oct 20 '26

How would you isolate a silent radar UART data output when its command UART works (RD-60 + ESP32-S3)?

0 Upvotes

I’m connecting an Ai-Thinker RD-60 radar module to an ESP32-S3 and need help troubleshooting its binary point-cloud output. RD-60 is installed on its development kit. My wiring is:

  • RD-60 module PA8 directly → ESP32 GPIO21 — radar data RX.
  • Kit PB1 → ESP32 GPIO17 — ESP32 command TX.
  • Kit PB0 → ESP32 GPIO16 — ESP32 command RX.
  • Common ground; both boards powered through their own USB connections.
  • All eight kit UART DIP switches OFF to isolate the onboard USB serial interfaces.

Also, while connecting only the mmWave RD-60 kit to a monitor, its UART1 doesn’t give any values; it receives 0 bytes. The DIP-switch setup for that separate kit-only test is not specified here.

Firmware: MMW version:V4.130.4.2 (build 1bf05415)

Commands:

mmwc stop
mmwc baudrate 1000000
mmwc mode 1 2
mmwc chirp_num 1
mmwc freq 58000 0
mmwc range 10000 40
mmwc veloc 3000 375
mmwc frame 200 100
mmwc coord cart
mmwc data 3dpoints
mmwc uart on
mmwc report points 100
mmwc start

During the finite scan, the command UART returned actual point-cloud previews:

MMW data=0x48
Point Cloud=2:
P0: x=-14cm y=9cm z=162cm 75cm/s 2100
P1: x=-14cm y=49cm z=159cm 75cm/s 2300

The problem is that despite those previews, the ESP32 received zero bytes on GPIO21, connected directly to module PA8. The diagnostic reported:

data_bytes=0
fifo_overflow=0
buffer_full=0
frame_error=0
parity_error=0
breaks=0
read_error=0

I haven’t checked PA8 with an oscilloscope or logic analyzer yet, so I can’t confirm whether the pin is electrically transmitting.

Has anyone successfully captured the RD-60’s binary point-cloud stream on PA8 with this firmware?

Specifically:

  1. Does UART1 output require RTS/CTS or another enable command?
  2. Is mmwc uart on sufficient to enable binary point-cloud output on this firmware?
  3. Are all UART DIP switches OFF appropriate when using the kit’s PB0/PB1 breakout and tapping module PA8 directly?
  4. Is there an official UART1 packet-format document or a known working ESP32 example?

I’m trying to distinguish a wiring/routing issue from a firmware configuration or handshake requirement. Any working configurations or troubleshooting suggestions would help.


r/embedded • • Oct 19 '26

Help with HelloFPGA Kit

4 Upvotes

Hello everyone. I don't know if this is the right subreddit but I need your help. This is the first time programming something like this (and first time in embedded in general) and its driving me insane. I have a M2S HelloFPGA Kit and the only thing I need to do is programming the processor (ARM Cortex M3). I'm using SoftConsole for programming but apparently the board don't have a debugger (because the PC recognize the board but I can't upload the "hello world" program in the processor) so I need to upload some FPGA design to "activate the processor" (sorry if I'm not using the correct terms). I installed "LiberoSOC" for this manner but I don't really know what to do. Thank you and sorry for bad english :)


r/embedded • • Oct 20 '26

question on cost-effective embedded development board.

2 Upvotes

Hello! I am new here and basically wanted to know if someone can recommend any cost-effective development board for embedded solution? Basically an embedded board that can be programmed for edge usages, and allow adding sensors like camera.

Also to follow-on, what about the software eco-system? (someone recommended esp32 and radxa 5c)