Embedded - Reddit – Telegram
Embedded - Reddit
17 subscribers
1.23K photos
108 videos
1 file
20K links
News and discussion for the Embedded world

Subreddit: https://www.reddit.com/r/embedded
Powered by : @r_channels & @reddit2telegram
Download Telegram
Looking for internship

Umm I am in pretty much bad shape rn

I want an internship for next sixth months
frm 1st jan to 30th june

Preferred location: Pune(India)

- ECE student (final year) B.tech


https://redd.it/1pwe3kp
@r_embedded
Help with my CRC error

So i have an problem. I just wasted my day on this. So i have this SD Card module. It has a few Resistors and Capacitors. And the known pins. MISO MOSI SCK CS. I connected them on my ESP32 WROOM 32D. I did it correctly and i tried to initialize it. I was getting a CRC error and what not. Most if the time it was CRC. I tried to change the pins and got to the other SPI. Didn’t change a thing. I also added 10K resistors between chip pin and SD Module. Didn’t help. I have no idea what i can do. After a dew hours of troubleshooting i shorted the SD module😆(Ill get a new one tomorrow) but i do not know what to do.

https://redd.it/1pwj4eh
@r_embedded
Using an ESP32 to observe Bitcoin network behavior (no API) — looking for feedback

I built a small setup using an ESP32 to observe Bitcoin network activity directly, without relying on public APIs.

The goal is not price prediction, but understanding network stability, congestion patterns, and “is now a good time to send a transaction?”.

This is still experimental and hardware-driven.

I’d really appreciate feedback from people who have worked with ESP32, embedded monitoring, or Bitcoin nodes.

Happy to explain how it works if there’s interest.

https://redd.it/1pwe1nl
@r_embedded
How to start Embedded Linux as beginner?

Hi everyone,

I’m a computer science student and I’ve recently secured a 12-month firmware engineering internship starting next year. From what I’ve been told, the role will likely involve embedded Linux, Qt for embedded GUIs, and working mainly on Ubuntu/Linux environments.

I’m a total beginner when it comes to embedded Linux. I have programming experience (C/C++, Java, some C#), but I’ve never worked close to hardware or built a Linux system for embedded devices before.

I want to start preparing properly and avoid learning things in the wrong order.

I’d really appreciate guidance on:

• What foundational Linux skills I should learn first

• Whether I should start with desktop Linux (Ubuntu) or jump straight into embedded concepts

• Recommended learning path for embedded Linux (bootloaders, kernel, rootfs, device tree, etc.)

• When/how to introduce Qt for embedded Linux

• Any starter projects that make sense for a beginner

• Recommended hardware (e.g. Raspberry Pi, BeagleBone, or something else)

• Books, courses, or YouTube channels that are actually worth the time

My goal is to be productive from day one of the internship and build a solid long-term foundation in firmware/embedded systems.

Thanks in advance any advice from people working in embedded or firmware roles would be hugely appreciated 🙏

https://redd.it/1pwm5vi
@r_embedded
Need microcontroller recommendation

I’m building a compact, low-cost embedded system and need recommendations for a suitable microcontroller.

Requirements:

Must control 4 servo motors (PWM output)
Interfaces with:
IMU (gyroscope/accelerometer) via I²C or SPI
FSR (force-sensitive resistor) via ADC
Small form factor and low power preferred
Very little latency (IMPORTANT)
Budget-friendly (ideally under \~$25 for the MCU or dev board)
Possible room to expand to tinyML or small AI models to calculate servo movements

Additional context:

AI models will be lightweight (quantized / TinyML-scale), focused on motion or sensor-based control logic
Open to Arduino, MicroPython, or C/C++ ecosystems

What microcontroller(s) would you recommend, and why? If relevant, please mention limitations or trade-offs.

Thank you!

https://redd.it/1pwm3w0
@r_embedded
Can a basic project go a long way for resume?

I just received a ton of breadboards, components, wires, and the like. I been wanting to dive into embedded systems for a while now. I do graphics development in c++ making game engines and what not, so I am familiar with low level programming. Today I have been wiring up simple gates and just playing around with the breadboard.

Tomorrow, I plan on hooking up my STM Nucleo-F756ZG and just making a simple project. I am thinking something like a little state machine that has an idle, active, and error state that lights different leds or makes a single one blink differently or something. I'm gonna go all out documenting it, because I tend to document all my projects very well (to my standards at least).

Anyways, I guess I will get to the point. I applied to a very entry level software engineer role that had a strong focus on C but listed other languages like C++, Java, JavaScript, Python, SQL, HTML/CSS, and a couple others. The job is for the defense industry, so I am assuming they would highly prefer C or C++ knowledge (which I have). Like I said, on my resume I currently have a couple games and a fairly large engine project I am actively working on (that is in a usable state). So, would adding this small project I plan on doing be a solid "hey, I'm actively wanting to learn embedded" project? I assume so, but I am not sure if it is too simple or not.

Regardless, I have been having loads of fun building little circuits so far the last two days. It is getting kind of late tonight, so not going to crack into the STM board tonight, but definitely going to dive in tomorrow.

Edit: Oh also, side note, all of my projects I have done are in C++11 - C++23, so this will be my first one in C as well, which could be another bonus. Even though technically the project would be simple enough that C and C++ would pretty much be one in the same if that makes sense.

https://redd.it/1pwovkc
@r_embedded
I got tired of 60 second rebuild cycles on ESP32-P4 so I built this

https://preview.redd.it/3woai2njop9g1.jpg?width=5632&format=pjpg&auto=webp&s=61b0e4d742339b475a22774c8287aee82d6e637d

So this has been bugging me for months. I'm doing a lot of work with the ESP32-P4 (the new RISC-V one), mostly ML stuff and DSP algorithms, and the iteration cycle was killing me.

You know the drill - change one line, wait 45 seconds for idf.py build, flash, monitor, test, realize you forgot something, repeat. I was spending more time waiting than actually coding.

Anyway, I ended up building what I'm calling P4-JIT. Basically it lets you compile C/C++ code on your PC and deploy it to the ESP32 in like 2-3 seconds without touching the firmware. No rebuilding, no flashing, just compile and go.

The way it works is kinda interesting - there's a small firmware that stays on the device (flash it once and forget about it). Then on the host side, you write your algorithm in C or even assembly, the toolchain compiles it to RISC-V, allocates memory on the device, uploads the binary over USB, syncs the cache, and calls it. From Python.

I've been using it for testing quantized neural networks and it's been honestly game-changing. Like I can iterate on an INT8 conv kernel in the time it used to take just to link.

The really useful part for me was testing the ESP32-P4's custom SIMD instructions (the PIE extensions). You can't simulate those in QEMU or Spike because they're not standard RISC-V, so you HAVE to test on real hardware. With P4-JIT I can tweak the assembly, redeploy in 2 seconds, and see results immediately.

Made a video showing the full workflow: https://youtu.be/s5sUW7lRV1E

Repo: https://github.com/BoumedineBillal/esp32-p4-jit

Not trying to spam or anything, just thought some of you might find it useful if you're doing similar work. Happy to answer questions about how it works.

Oh and it's MIT licensed so do whatever you want with it.

https://redd.it/1pwt8lk
@r_embedded
Some for-loops are broken (Run only once) STM32-F103C6T6 - CubeIDE

Hi everyone! I've been learning how to use STM32 MCUs recently, and it's been going smoothly until now. I have some nested for loops, and the outer loops only run the code inside once, as opposed to looping. I'm super confused as to why this is happening, given that some other loops with the same syntax seem to work perfectly fine.

I've tried while loops in the same place, yet the same problem is encountered. It might help to know that the variables initialised by the broken for loops (and before the broken while loop) did not show up in the debugger, while the working loops had their variables appear.

I've tried to format the code as neatly as I can while retaining the whole program (as I suspect it could have something to do with some of the registers being manipulated?) I've commented all points of interest along with labels for which loops are working and which are broken. (Note, the debugger had some weird moments as I've noted in the comments. If you have any ideas about how to fix that, I'd love to hear!)

Here is the link to the program (Scroll to the only while(1) for the fun part!)

https://pastebin.com/K4TMW4KW

Merry (Late) Christmas and happy New Year!

Thank you!

https://redd.it/1pwtup4
@r_embedded
eMMC voltages question

Hi, noob question but I am trying to design my first board with eMMC as the boot memory for an SoC. The designs I saw on the internet used mostly 3.3V for both of the power supply rails for the eMMC and also for the logic. In my case for reasons my SoC IO bank will run on 1.8V, and I just wanted to confirm, whether VCC=3.3V and VCCQ=1.8V would work on startup.

Feel free to roast me for using gpt but it kept saying that this requires some negotiation commands ("voltage switch", "CMD11" ??) for this voltage configuration to work. This is kind of the reason for my concern.

I looked on the eMMC JEDEC specs and nowhere does it mention anything about this, apart from the fact that HS200 and HS400 only work with VCCQ=1.8V. I think this is just hallucinations? https://dn710206.ca.archive.org/0/items/SD-specs/JESD84-B51.pdf



So my assumption is that gpt is hallucinating and that an eMMC 5.0 or 5.1 chip will work by default (on startup with no prior communication) with VCC=3.3V, VCCQ=1.8V, logic signals=1.8V, provided the IC datasheet says it supports this configuration of supply voltages.

Can someone tell me if this assumption is correct?



https://redd.it/1pwumxp
@r_embedded
SD Card module not responding over SPI on ESP32 - Need Help

Hi everyone,

I’m trying to use an SD card module with my ESP32 over SPI, but I keep getting errors when mounting the filesystem. My setup:

ESP32 pins:

MISO → 19

MOSI → 23

SCK → 18

CS → 15

3.3 V → VCC

GND → GND

The SD card module is a cheap one I got from China. There are 10 KΩ resistors in series on MISO, MOSI, CS, and SCK on the module.

SD card: 16 GB, FAT32

Here’s the code I’m using:

#include <stdio.h>
#include "espsystem.h"
#include "esplog.h"
#include "esperr.h"

#include "driver/spicommon.h"
#include "driver/spimaster.h"

#include "sdmmccmd.h"
#include "espvfsfat.h"

#define PINNUMMISO 19
#define PINNUMMOSI 23
#define PINNUMCLK 18
#define PINNUMCS 15

static const char TAG = "SD_CARD";

void app_main(void)
{
esp_err_t ret;

// Use SPI host
sdmmc_host_t host = SDSPI_HOST_DEFAULT();
host.slot = SPI2_HOST; // HSPI
host.max_freq_khz = 100; // start super slow

// SPI bus configuration
spi_bus_config_t bus_cfg = {
.mosi_io_num = PIN_NUM_MOSI,
.miso_io_num = PIN_NUM_MISO,
.sclk_io_num = PIN_NUM_CLK,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = 8192,
};

ret = spi_bus_initialize(host.slot, &bus_cfg, SPI_DMA_CH_AUTO);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Failed to initialize SPI bus");
return;
}

// SD SPI device configuration
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
slot_config.gpio_cs = PIN_NUM_CS;
slot_config.host_id = host.slot;

// FAT filesystem mount configuration
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
.format_if_mount_failed = false,
.max_files = 5,
.allocation_unit_size = 4096
};

sdmmc_card_t
card;

ESPLOGI(TAG, "Mounting SD card at 100 kHz...");
ret = esp
vfsfatsdspimount("/sdcard", &host, &slotconfig, &mountconfig, &card);

if (ret != ESP
OK) {
ESPLOGE(TAG, "Failed to mount filesystem (%s)", esperrtoname(ret));
return;
}

ESPLOGI(TAG, "SD card mounted successfully!");
sdmmc
cardprintinfo(stdout, card);

ESPLOGI(TAG, "You can now increase host.maxfreqkhz gradually (e.g., 8MHz, 16MHz, 20MHz) and test again.");
}





And here’s the log I get:

rst:0x1 (POWERON
RESET),boot:0x13 (SPIFASTFLASHBOOT)
...
I (330) SD
CARD: Mounting SD card at 100 kHz...
I (330) sdspitransaction: cmd=52, R1 response: command not supported
I (370) sdspi
transaction: cmd=5, R1 response: command not supported
E (3370) sdmmccommon: sdmmcinitocr: sendopcond (1) returned 0x107
E (3370) vfs
fatsdmmc: sdmmccardinit failed (0x107)
E (3370) SD
CARD: Failed to mount filesystem (ESPERRTIMEOUT)


I’ve tried powering the module with 3.3 V and verified the wiring. The SD card is inserted and Formated to FAT32.

https://redd.it/1pww1uk
@r_embedded
i want make one like this i need help this is mini camera Supports sd card i want know what prices i need to do one like this I see them being sold a lot on websites, but I want to make them myself.
https://redd.it/1pwta5q
@r_embedded
Learn Embedded Systems With Hands-On Tinkering Lab

If anyone here wants to seriously get into Embedded Systems, UNLOX just launched a beginner-friendly program that takes you from basics to advanced — and the best part is the Tinkering Lab access. You actually get to work with real microcontrollers, sensors, protocols, and hardware instead of only watching tutorials.

The course covers Embedded C, STM32/ESP32, UART/SPI/I2C, RTOS basics, debugging, firmware, and real project building. It’s super practical and perfect for students who want hands-on learning plus guidance. DM me for more guidance



https://redd.it/1pwzl52
@r_embedded
How do you program an interface for a memory?

Hi noob here I'm trying to make a simple interface for an old parallel sram and I really don't get on how I should time the signal for the Write enable pin with the data pins and the address pins.i put on write enable before the rest of the pins a cycle of clock later losing time I feel like I am missing something

https://redd.it/1px0zlr
@r_embedded
qron0b: a sleek & low-power binary wristwatch
https://redd.it/1px22je
@r_embedded
ESP32 beginner what should I buy to get started?

Hey everyone,

I want to get started with the ESP32 and embedded programming, but I’m a bit unsure what hardware is actually worth buying at the beginning.

What kind of basic accessories would you recommend right away? (breadboard, sensors, etc.)

I’d like to start with simple projects first and then slowly work my way up.

I’d appreciate hearing about your experiences thanks! 🙌

https://redd.it/1px5ttr
@r_embedded
Clean architecture in rtos

I'm working on a RTOS robot and I've some doubts on the best architecture. I initially use the clean architecture pattern like this:

>firmware/
├── src/
│ ├── domain/ # Entités et règles métier
│ │ ├── entities/ # Ex: RobotState
│ │ ├── repositories/ # Interfaces (ex: RobotRepository)
│ │ └── usecases/ # Cas d'utilisation (ex: SafetyUseCase)
│ ├── application/ # Logique applicative et tâches RTOS
│ │ ├── tasks/ # Tâches RTOS (ex: SafetyTask, SensorTask)
│ │ ├── services/ # Services applicatifs
│ │ └── dto/ # Data Transfer Objects
│ ├── infrastructure/ # Implémentations concrètes
│ │ ├── drivers/ # Pilotes matériels (ex: ADC, CAN)
│ │ ├── protocols/ # Protocoles temps réel (ex: CANopen)
│ │ ├── communication/ # Communication inter-tâches (queues RTOS)
│ │ └── shared_resources/ # Ressources partagées (queues, sémaphores)
│ └── interfaces/ # Interfaces pour le middleware
│ ├── grpc/ # Service gRPC léger
│ └── ros2/ # Bridge ROS 2 (optionnel)
├── include/ # Fichiers d'en-tête communs
├── config/ # Configuration RTOS (ex: FreeRTOSConfig.h)
└── tests/ # Tests spécifiques RTOS
├── unit/ # Tests unitaires
├── integration/ # Tests d'intégration
└── fuzz/ firmware/
├── src/
│ ├── domain/ # Entités et règles métier
│ │ ├── entities/ # Ex: RobotState
│ │ ├── repositories/ # Interfaces (ex: RobotRepository)
│ │ └── usecases/ # Cas d'utilisation (ex: SafetyUseCase)
│ ├── application/ # Logique applicative et tâches RTOS
│ │ ├── tasks/ # Tâches RTOS (ex: SafetyTask, SensorTask)
│ │ ├── services/ # Services applicatifs
│ │ └── dto/ # Data Transfer Objects
│ ├── infrastructure/ # Implémentations concrètes
│ │ ├── drivers/ # Pilotes matériels (ex: ADC, CAN)
│ │ ├── protocols/ # Protocoles temps réel (ex: CANopen)
│ │ ├── communication/ # Communication inter-tâches (queues RTOS)
│ │ └── shared_resources/ # Ressources partagées (queues, sémaphores)
│ └── interfaces/ # Interfaces pour le middleware
│ ├── grpc/ # Service gRPC léger
│ └── ros2/ # Bridge ROS 2 (optionnel)
├── include/ # Fichiers d'en-tête communs
├── config/ # Configuration RTOS (ex: FreeRTOSConfig.h)
└── tests/ # Tests spécifiques RTOS
├── unit/ # Tests unitaires
├── integration/ # Tests d'intégration
└── fuzz/


But I'm not sure it's the best architecture.

Any thoughts ?

https://redd.it/1px72xf
@r_embedded
Advice for writing lib for modules

Hi so im starting to write library for modules is there any suggestion for me im so confused with the doc i just now that i show read protocol page and register page



https://redd.it/1px4mgk
@r_embedded
STM32L432KC CubeMX configuration

Hi all,

I’m fairly new to STM32 and would like to design and manufacture a custom board to play & test with both software & hardware functionality. I started by configuring the MCU in CubeMX.

I don’t have a specific application, but I’d like to start with a relatively simple, low pinout STM32 chip and be able to test most of its features (ADC, DAC, I2C, etc.).

Could you please review the pinout and let me know if anything needs to be changed or if something is missing?

All the free pins (except Power,BOOT,NRESET) will be used as GPIOs (LED, button etc..)

https://preview.redd.it/vgfnejflmt9g1.png?width=846&format=png&auto=webp&s=277c59ee6d0e62181cd176579ee03e8ce09d3fb0




Thank you.

https://redd.it/1pxa70u
@r_embedded
ESP32 Servo Control with Level Shifter and Breadboard Power Supply
https://redd.it/1pxhd9f
@r_embedded