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
How to get IAR for ARM

I am trying to get an IAR license for my lab. I've submitted requests a few times through their form but haven't heard back yet. I also contacted my county's sales person but no luck. What should I try?

https://redd.it/1pyjas6
@r_embedded
What are the common challenges in debugging embedded systems with real-time constraints?

Debugging embedded systems can be particularly challenging, especially when real-time constraints are involved. In my experience, issues like race conditions, timing problems, and resource contention can make finding the root cause of a problem difficult. I'm curious to know what specific techniques or tools other developers use to tackle these challenges. Do you rely on hardware debuggers, software tracing, or perhaps even simulation tools? How do you ensure that your debugging process does not interfere with the system's real-time performance? Additionally, if you've faced unique issues while debugging, sharing those experiences could provide valuable insights to others in the community. Let's discuss the best practices and tools that can help streamline the debugging process in embedded systems with strict timing requirements.

https://redd.it/1pykjw4
@r_embedded
Looking for multi-output isolated flyback converter reference design (12–48V, up to 3A)

Hi everyone,

I’m looking for a **multi-output isolated flyback converter reference design**. bcoz, i do not have enough time to develop new flyback and transformer.

**Requirements:**

* Input: some 300 to 380Vdc. (open to common industrial ranges)
* Outputs: **multiple isolated outputs**
* Output voltage range: **12V to 48V**
* All outputs must be **greater than 12V**
* At least **one output: >12V @ ≥3A.**
* Other outputs: **>12V @ ≥2A**
* Each output must be **isolated from the others**

If you know of any **TI / ST / Infineon / Power Integrations or other** reference designs, app notes, or evaluation boards that match (or are close), please share.

Any guidance on controller ICs suitable for this power level would also be appreciated.

Thanks in advance!

https://redd.it/1pyk4he
@r_embedded
Embedded Swift, look inside:
https://redd.it/1pyoieq
@r_embedded
Project Concept: Solar-powered "Audio Mesh" to monitor the Amazon Rainforest. I need a reality check on the Power Budget.

Hi everyone,

I am based in Belém, Brazil (Amazon region), and I am designing a scalable hardware solution to detect illegal deforestation and poaching in real-time.

The Problem: Satellite imagery is reactive (too slow). We need ground-level bioacoustic monitoring. The Idea: Air-drop thousands of low-cost, solar-powered IoT sensors into the canopy. They use Edge AI to detect chainsaws/gunshots and send alerts via Satellite (Starlink Direct-to-Cell or LoRaWAN).

The Challenge: The environment is brutal (100% humidity, heat, rain). I am struggling with the power architecture for a "deploy-and-forget" device that lasts 5+ years.

My questions for this community:

1. MCU: I'm considering the ESP32-S3 for AI capabilities, but I'm worried about deep-sleep power consumption. Would an STM32 be a safer bet for extreme efficiency?
2. Power: LiFePO4 vs. Supercapacitors? Given the canopy shade, solar harvesting will be tricky. Are supercaps viable for short bursts of satellite transmission?
3. Protection: For the Amazon humidity, is standard conformal coating enough, or do I need full resin potting (which kills thermal management)?

I am looking for brutal technical feedback. If anyone has experience with remote sensors in tropical environments, I’d love to hear from you.

Thanks from the Amazon!

https://redd.it/1pynppt
@r_embedded
e2 studio load times are insane

So, I just got into MCUs that aren't called arduino, and I came across STM32 and Renesas. I downloaded e2 studio and CubeIDE to see which is better, and well both are ok I really didnt go too deep into the development because they are both eclipse anyways, so the most immediate differences I found were that the clocks, pin configs, interrupts etc are always in the same location at your fingertips in the e2 studio but not in the CubeIDE which needs extra steps like finding the ioc file (didnt generate when I created the project [version 2.0.0\]). Then there is the load times

STM CubeIDE loads in 1 minute

e2 studio took 10min damn!!!!!!

what gives? any suggestions to decrease the load time?

https://redd.it/1pyqxv8
@r_embedded
write lib for sx1278

Hi everyone,
I’m trying to initialize the SX1278 LoRa module directly from the datasheet, but I’m having trouble figuring out which registers I actually need to set and in what order. The datasheet lists a lot of registers and parameters, but it doesn’t explicitly say which ones are required for basic initialization.

Can someone point me to the specific sections/pages in the official datasheet that explain how to set up the module for LoRa mode, frequency, spreading factor, bandwidth, preamble, and TX/RX mode? I want to understand this directly from the documentation rather than relying on example code.

https://redd.it/1pyqs3p
@r_embedded
Troubles with entering the bootloader of the CH32V203

Hi everyone,

I have just recently seriously started my journey into embedded electronics. Part of my project requires making a fully functioning development board based on the CH32V203(C8T6) SoC. I've designed a PCB, gotten it manufactured, and soldered the components. Fortunately, it worked and I could see the chip appear on my `lsusb` list. I've spent ages trying to write code onto it (I ended up making my own C program for that).

It worked - I wrote a blinky and even drove an 8-bit LED array with cool patterns. Then, I went to sleep and woke up. The chip no longer wanted to appear as a USB device on my PC.

Here is some interesting behaviour I noticed:
I hold BOOT0 and press RESET. The chip resets, good. Then, as soon as, and only *after*, I let go of BOOT0, the LED program starts instead of the bootloader. Even while BOOT0 is held, no appearance of it as a USB device.

I investigated and though that maybe it was the external crystal at fault (I wired it up wrong) so I re-soldered it diagonally. Nope.

I even spent a day soldering another board (of the same design) and that works! Still, I would like my first board to work as well in case this issue arises on the second one as well.

I couldn't have fried it while soldering as it broke overnight. Maybe I pushed too much current? But why do the LEDs work then and not the bootloader?


Unfortunately, I do not have the WCH-Link to debug over SWIO and I don't have a seller close by. What do I do?


Thank you!

https://redd.it/1pyv5da
@r_embedded
BinForge – Post-Build ESP32 Firmware Tool & Framework for Injecting Data
https://redd.it/1pyu9fx
@r_embedded
What to learn Zyphr Rtos or Embedded linux driver development?

I am fairly new to embedded systems, though I have experience with STM32 and FreeRTOS. Whenever I search for embedded development roles on job portals, I frequently see Zephyr RTOS mentioned. Other job profiles specify Embedded Linux driver development. Does embedded driver development align with the profile of an embedded developer? Furthermore, should I focus on learning Embedded Linux development or Zephyr RTOS first?

https://redd.it/1pyx17c
@r_embedded
Wokwi based design for Rohee Desktop gadget robot with ESP32-C3

This is the link for online based design.
https://wokwi.com/projects/450256201969103873

https://redd.it/1pyxu7a
@r_embedded
How to get smooth velocity reading from incremental angle sensor?

Hi,

I am using my teensy4.0 and the MT6835 magnetic encoder to measure the incremental angle (65536 CPR) of a rotating motor shaft.

Context: I want to build an rotary inverted pendulum and therefore have to measure the angle of a motor shaft and a pendulum shaft and also the angular velocity respectively.
I don’t expect big velocities but rather how accelerations because of fast direction changes . The will be no state of constant rotation. So I need very accurate velocity data.

I configured two pins on my teensy4.0 to detect incoming encoder pulses and trigger an interrupt. Basically what i want to do is to measure the time between each encoder pulse by using a timer on my teensy. By doing so I get a value which is inversely proportional to the shaft rotation speed.

I am also using another method where I count the encoder pulses within a fixed time interval and then derive the shaft speed from it.

Combining these two methods to change between high speed and low speed works kind of good.

But sometimes there are some spikes in my velocity reading and sometimes the reading does not really work.

Does anyone know of there is a library for reading encoder pulses and simultaneously measure the time between each encoder pulse ?

Does anyone know if there is a better way to do it ? Or do you have good tips for me?

I can send my code, if needed:) thank you !!

https://redd.it/1pz21eh
@r_embedded
Interview coding languages

Are intern interviews typically done in C or C++. This past cycle I had interviews in both and each time I asked what language to focus on both interviewers said it depends on the company. I’ve been practicing some leetcode in C++ but was wondering if that’s the wrong decision since c++ gives access to new data structure not in C.

https://redd.it/1pz39r2
@r_embedded
ESP32 SD Card Module Not Mounting Card

I am trying to get a MicroSD card adapter to work with my ESP32 DevKit-V1, but I can't happen to get it working. I've gotten the same module to work with an Arduino Uno on 5V, but I cannot get it to work with my ESP32. Code is below, but here are my troubleshooting steps.

I'm using a cheap HW-125 SD card adapter with my ESP32 DevKit-V1 with the following pinout:

* CS - D5
* SCK - D18
* MOSI - D23
* MISO - D19
* VCC - 3.3V
* GND - GND

Troubleshooting steps I've tried

* I tried a second HW-125 to ensure I didn't burn the first one
* Re-formatted the 8GB SD card to FAT32 using official SD formatter tool
* Tried connecting VCC to a 5V source instead of the 3.3V (with a common ground)
* Tried changing the GPIO pins
* Tried changing the card speed in the code from 4MHz to 7.5 MHz to 0.4 MHz
* Ensure my card appears when plugged into a computer

Only other think I can think of is running all wires through a level shifter to 5V. I'm completely lost and appreciate any help.

In addition to this code, I've also tried the example code in the Arduino IDE library.

#include "FS.h"
#include "SD.h"
#include "SPI.h"


#define SD_CS 5 // This is the correct CS pin for VSPI on DevKit-V1


// Create an SPI class instance on the VSPI bus (default for your board)
SPIClass spi = SPIClass(VSPI);


void setup() {
  Serial.begin(115200);
  delay(2000);
  Serial.println("=== Testing with Default VSPI Pins ===");


  // Initialize SPI bus. Use -1 for the hardware SS pin.
  // SCK=18, MISO=19, MOSI=23, SS=-1 (not used)
  spi.begin(18, 19, 23, -1);


  // Initialize SD card with the defined CS pin
  if(!SD.begin(SD_CS, spi, 7500000)) {
    Serial.println("Card Mount Failed");
    return;
  }
  Serial.println("SUCCESS: Card initialized.");
 
  // Optional: List root directory to confirm communication
  listDir(SD, "/", 0);
}


void loop() {
  // Nothing here
}


// Helper function to list directory contents (optional)
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
    Serial.printf("Listing directory: %s\n", dirname);
    File root = fs.open(dirname);
    if(!root){
        Serial.println("Failed to open directory");
        return;
    }
    if(!root.isDirectory()){
        Serial.println("Not a directory");
        return;
    }
    File file = root.openNextFile();
    while(file){
        if(file.isDirectory()){
            Serial.print("  DIR : ");
            Serial.println(file.name());
            if(levels){
                listDir(fs, file.name(), levels -1);
            }
        } else {
            Serial.print("  FILE: ");
            Serial.print(file.name());
            Serial.print("  SIZE: ");
            Serial.println(file.size());
        }
        file = root.openNextFile();
    }
}

https://redd.it/1pz6nc0
@r_embedded
Emulating EEPROM on STM32 when using Simulink hardware support

https://preview.redd.it/fny5c8sj29ag1.png?width=2878&format=png&auto=webp&s=37544cfc8318ba2948fa3d36f8d9cd6e9e96b538

To make vehicle control unit (VCU) development more accessible to people who are not embedded programmers, we decided to use Simulink STM32 hardware support.

One limitation of Simulink is that you don’t have much control over low-level memory operations. Because of that, I had to write custom C functions and import them as Simulink blocks to emulate EEPROM using the last sector of the STM32 flash memory.

This implementation is used to latch error flags and store them persistently:

* Each error is written to the next available bit
* The flash sector is only erased when it becomes full, minimizing erase cycles
* Errors remain stored across power cycles until the memory is cleared

If anyone is facing a similar issue with Simulink + STM32 and needs non-volatile storage, I’ve put a working example on my [GitHub](https://github.com/Sdeslo/EEPROM-emulation-for-STM32).

Feedback and improvements are welcome!

https://redd.it/1pz5px4
@r_embedded
Chording keyboard project like MicroWriter of 80s

I am researching on MCUs alot in order to make meself a chording keyboard. I want to work using C and make a copy of microwriter MW4 and make it able to edit on the windows.
I need help on getting started for this project. From firmware to Hw and driver for this... I really need help and i am unable to find on the internet so please mention sources if possible too

https://redd.it/1pz8la3
@r_embedded
Issue reading data using CAN communication

I am student ,building E go karts in university along with my team , we need to keep a display to see operating voltage ,temperature of mosfet and motor ,soc ,speed of the vehicle in display ,which will be mounted below steering for driver. so the issue here is neither of them worked in CAN communication , so we are a bit clueless where to start.
my motor controller has an dedicated 4 pin can jsd port (5v,gnd,can_high,can_lo) and also has usb port as well and my battery also has can wires coming out of the casing(just 2 wires not marked).

As far as i searched online first ,am i supposed to read dbc file from controller and battery seperately in my laptop ? , then write code acc to display them in a display . Now to read data in laptop which software i should use Pcan or canalyser or vesc ?( my controller vendor suggested pcan, but i hv no idea of that and i use to vesc to tune my motor),now what hardware i might require to read from my controller and battery , like can to usb modules?, or can transeiver or something else . Even with wiring part i just now that can bus should be truncated with 120 ohm, is there anything i should know?
so can u guys share your thoughts, ideas and knowledge on this

https://redd.it/1pza99r
@r_embedded
STM32F042 USB-C Module — Schematic Review Before PCB Layout (2-Layer)
https://redd.it/1pzeyvx
@r_embedded
STM32U5 OctoSPI Quad Mode (IO4–IO7) + W25Q128 works, but XIP memory-mapped mode doesn’t

I’m using STM32U5 OctoSPI with Winbond W25Q128 QSPI NOR.

Setup:
OctoSPI in Quad mode
IO0–IO3 remapped to IO4–IO7
Indirect mode works fine:
JEDEC ID read OK
Read / write / erase OK

Problem:
Memory-mapped mode (XIP) doesn’t work
Invalid data / faults when trying to execute or read via mapped address

Looking for:
How to properly configure memory-mapped mode on STM32U5?

Any tutorials, app notes, or example projects
Any known gotchas when using Quad mode on IO4–IO7 for XIP.

Is XIP officially supported in this configuration, and are there any special settings (dummy cycles, opcode, cache/MPU config, etc.) I should be aware of?

Thanks!

https://redd.it/1pzj852
@r_embedded
where/how do you get small quantities of chips for new projects without shipping being the majority cost?

just that, any little project I look at doing now, I start to go , why bother, when amazon has the entire thing built for much cheaper. and the chips for a custom board, well then that's a different more expensive path.

I miss the cheap digikey days, with samples..or even free shipping aliexpress. I'm not one to plan for bulk orders

https://redd.it/1pzn375
@r_embedded