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 = espvfsfatsdspimount("/sdcard", &host, &slotconfig, &mountconfig, &card);
if (ret != ESPOK) {
ESPLOGE(TAG, "Failed to mount filesystem (%s)", esperrtoname(ret));
return;
}
ESPLOGI(TAG, "SD card mounted successfully!");
sdmmccardprintinfo(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 (POWERONRESET),boot:0x13 (SPIFASTFLASHBOOT)
...
I (330) SDCARD: Mounting SD card at 100 kHz...
I (330) sdspitransaction: cmd=52, R1 response: command not supported
I (370) sdspitransaction: cmd=5, R1 response: command not supported
E (3370) sdmmccommon: sdmmcinitocr: sendopcond (1) returned 0x107
E (3370) vfsfatsdmmc: sdmmccardinit failed (0x107)
E (3370) SDCARD: 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
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 = espvfsfatsdspimount("/sdcard", &host, &slotconfig, &mountconfig, &card);
if (ret != ESPOK) {
ESPLOGE(TAG, "Failed to mount filesystem (%s)", esperrtoname(ret));
return;
}
ESPLOGI(TAG, "SD card mounted successfully!");
sdmmccardprintinfo(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 (POWERONRESET),boot:0x13 (SPIFASTFLASHBOOT)
...
I (330) SDCARD: Mounting SD card at 100 kHz...
I (330) sdspitransaction: cmd=52, R1 response: command not supported
I (370) sdspitransaction: cmd=5, R1 response: command not supported
E (3370) sdmmccommon: sdmmcinitocr: sendopcond (1) returned 0x107
E (3370) vfsfatsdmmc: sdmmccardinit failed (0x107)
E (3370) SDCARD: 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
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
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
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
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
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
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
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
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
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
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
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
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
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
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
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
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
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
My first bulk usb data stream on pico 2 using tinyusb
https://embeddedjourneys.com/blog/first-time-usb-data-stream-on-pico/
https://redd.it/1px9g4z
@r_embedded
https://embeddedjourneys.com/blog/first-time-usb-data-stream-on-pico/
https://redd.it/1px9g4z
@r_embedded
Embedded Journeys
First Time USB Data Streaming from the Raspberry Pico 2W Using TinyUSB
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
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
https://redd.it/1pxhd9f
@r_embedded
Need assistance
Hi I had been working on uart to bt bridge, what I am facing is that I had configure uart rx as interrupt I had getting a large chunks of data from the another device, what I had facing is that I am not getting whatever data I had received through rx .
below is my code
uint16 head = 0;
uint16 tail = 0;
volatile bool uart_rx_flg = 0;
//this is my uart config for interrupt
uartrxirqtriglevel(UART1, 1);
uartsetirqmask(UART1, UARTRXIRQMASK );
plicsetpriority(IRQ18UART1, IRQPRILEV3);
\attribute_ram_code_sec_
void uart1_irq_handler(void) {
while (uart_get_rxfifo_num(UART1) > 0) {
if( ( (head + 1) % AT_CMD_BUFFER ) != tail ) // Check for buffer overflow
{
at_cmd_buffer[head\] = uart_read_byte(UART1);
head = (head + 1) % AT_CMD_BUFFER;
}
}
uart_rx_flg = 1;
/*UART_RXBUF_IRQ_STATUS:When the number of rxfifo reaches the set threshold(uart_rx_irq_trig_level), an interrupt is generated, and the interrupt flag is automatically cleared; stated in docs*/
}
}
in main loop calling
void serial_rx_handler(void) {
if(!uartrxflg)return;
else
{
uint08 tmp_buffer[TMP_BUFFER_SIZE\];
uint16 len = 0;
while (tail != head && len < TMP_BUFFER_SIZE) {
tmp_buffer[len++\] = at_cmd_buffer[tail\];
tail = (tail + 1) % AT_CMD_BUFFER;
}
if(len > 0)
{
if (app_spp_handle > 0 )
{
btp_spp_sendData(app_spp_handle, nullptr, 0, tmp_buffer, len);
}
else if (g_connHandle != 0/* && idx > 0*/)
{
blc_gatt_pushHandleValueNotify(g_connHandle, SPP_SERVER_TO_CLIENT_DP_H, (void * ) tmp_buffer, len);
}
else
{
//for the parsing of at cmds
}
}
if(tail == head)uart_rx_flg = 0;
last_rx_tick = 0;
}
}let me know where I am getting wrong ,
Thx
https://redd.it/1pxnc07
@r_embedded
Hi I had been working on uart to bt bridge, what I am facing is that I had configure uart rx as interrupt I had getting a large chunks of data from the another device, what I had facing is that I am not getting whatever data I had received through rx .
below is my code
uint16 head = 0;
uint16 tail = 0;
volatile bool uart_rx_flg = 0;
//this is my uart config for interrupt
uartrxirqtriglevel(UART1, 1);
uartsetirqmask(UART1, UARTRXIRQMASK );
plicsetpriority(IRQ18UART1, IRQPRILEV3);
\attribute_ram_code_sec_
void uart1_irq_handler(void) {
while (uart_get_rxfifo_num(UART1) > 0) {
if( ( (head + 1) % AT_CMD_BUFFER ) != tail ) // Check for buffer overflow
{
at_cmd_buffer[head\] = uart_read_byte(UART1);
head = (head + 1) % AT_CMD_BUFFER;
}
}
uart_rx_flg = 1;
/*UART_RXBUF_IRQ_STATUS:When the number of rxfifo reaches the set threshold(uart_rx_irq_trig_level), an interrupt is generated, and the interrupt flag is automatically cleared; stated in docs*/
}
}
in main loop calling
void serial_rx_handler(void) {
if(!uartrxflg)return;
else
{
uint08 tmp_buffer[TMP_BUFFER_SIZE\];
uint16 len = 0;
while (tail != head && len < TMP_BUFFER_SIZE) {
tmp_buffer[len++\] = at_cmd_buffer[tail\];
tail = (tail + 1) % AT_CMD_BUFFER;
}
if(len > 0)
{
if (app_spp_handle > 0 )
{
btp_spp_sendData(app_spp_handle, nullptr, 0, tmp_buffer, len);
}
else if (g_connHandle != 0/* && idx > 0*/)
{
blc_gatt_pushHandleValueNotify(g_connHandle, SPP_SERVER_TO_CLIENT_DP_H, (void * ) tmp_buffer, len);
}
else
{
//for the parsing of at cmds
}
}
if(tail == head)uart_rx_flg = 0;
last_rx_tick = 0;
}
}let me know where I am getting wrong ,
Thx
https://redd.it/1pxnc07
@r_embedded
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
Planning the long game: A roadmap into Embedded Robotics for grad school and beyond?
I'm a second-year student majoring in Robotics/Mechatronics Engineering at a top tech university in Vietnam. Right now, my program is pretty heavy on the mechanical side, but I really want to get deeper into electronics and computer science. Down the line, I'm thinking about a Master's in Electrical Engineering (EE) or Mechatronics & IT, focusing on using AI in robotics and automation.
While looking into different paths, I got really interested in embedded systems and IoT for robotics. It seems like a great fit because it mixes hardware and software, and you still need to understand the mechanical side to make things work properly. I'd love to learn more and build a career in this direction.
The thing is, my uni only has a couple of basic electrical courses (mostly about components and equipment). There aren't many options to dive deeper into electronics or embedded programming here, so I'd really appreciate some advice from people in the field.
Could you give me some guidance on:
* What fundamental topics should I focus on learning on my own? (e.g., microcontrollers, digital/analog circuits, communication protocols, maybe RTOS?)
* What programming languages and tools are must-knows? (I've heard C/C++ is key, but what about Python, Linux, or PCB design tools?)
* Any good starter projects or resources to help me build a hands-on portfolio?
Also, it would be awesome if you could suggest some universities known for their strong programs in this area. I'm hoping to plan ahead, with the goal of pursuing a combined Master's/PhD while working on side projects before jumping into the industry.
Any tips, personal experiences, or resource recommendations would be a huge help. Thanks so much!
https://redd.it/1pxo2ru
@r_embedded
I'm a second-year student majoring in Robotics/Mechatronics Engineering at a top tech university in Vietnam. Right now, my program is pretty heavy on the mechanical side, but I really want to get deeper into electronics and computer science. Down the line, I'm thinking about a Master's in Electrical Engineering (EE) or Mechatronics & IT, focusing on using AI in robotics and automation.
While looking into different paths, I got really interested in embedded systems and IoT for robotics. It seems like a great fit because it mixes hardware and software, and you still need to understand the mechanical side to make things work properly. I'd love to learn more and build a career in this direction.
The thing is, my uni only has a couple of basic electrical courses (mostly about components and equipment). There aren't many options to dive deeper into electronics or embedded programming here, so I'd really appreciate some advice from people in the field.
Could you give me some guidance on:
* What fundamental topics should I focus on learning on my own? (e.g., microcontrollers, digital/analog circuits, communication protocols, maybe RTOS?)
* What programming languages and tools are must-knows? (I've heard C/C++ is key, but what about Python, Linux, or PCB design tools?)
* Any good starter projects or resources to help me build a hands-on portfolio?
Also, it would be awesome if you could suggest some universities known for their strong programs in this area. I'm hoping to plan ahead, with the goal of pursuing a combined Master's/PhD while working on side projects before jumping into the industry.
Any tips, personal experiences, or resource recommendations would be a huge help. Thanks so much!
https://redd.it/1pxo2ru
@r_embedded
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
Legality and Code Libraries?
I'm working on an STM32 project. I've also been trying to stay away from Arduino hardware and software for learning purposes, and due to the recent Qualcomm take over
Right now the project needs a small LCD display to display some text. I've seen a lot of info saying to use a pre-built library from GitHub. Problem is it's converted from an Arduino based library...
I'm confused on if I can use this code and what limitations there could be? Would changes in the Arduino TOS affect a library converted from their own, and an old GPL license, last updated 7 years ago? (The code in question) https://github.com/SayidHosseini/STM32LiquidCrystal
Legally, what should I worry about or consider here?
https://redd.it/1pxwb1d
@r_embedded
I'm working on an STM32 project. I've also been trying to stay away from Arduino hardware and software for learning purposes, and due to the recent Qualcomm take over
Right now the project needs a small LCD display to display some text. I've seen a lot of info saying to use a pre-built library from GitHub. Problem is it's converted from an Arduino based library...
I'm confused on if I can use this code and what limitations there could be? Would changes in the Arduino TOS affect a library converted from their own, and an old GPL license, last updated 7 years ago? (The code in question) https://github.com/SayidHosseini/STM32LiquidCrystal
Legally, what should I worry about or consider here?
https://redd.it/1pxwb1d
@r_embedded
GitHub
GitHub - SayidHosseini/STM32LiquidCrystal: Liquid Crystal Library for STM32
Liquid Crystal Library for STM32. Contribute to SayidHosseini/STM32LiquidCrystal development by creating an account on GitHub.
Sensor not working when ethernet is connected in STM32
Hey peeps, I am a fresher who got placed as an embedded engineer. I did my bachelors in Computer Science Engineering. So I am new to the embedded world. As a part of my training I and a friend is working in a project where we seem to be stuck because of ethernet/RJ45.
The project is about using a gesture sensor to detect gestures and map it to a certain action. So whenever that gesture is performed associated action will take place.
The issue: We were able to detect gestures and print what gesture was being detected, but to move forward we needed to use ethernet/LWIP. So in normal case, when I hold 1 finger it prints "count 1" and when its 2 fingers it prints "count 2" and so on. We keep polling to see if there is gesture and so as long as we show the gesture the output keeps getting printed. Now if we connect the ethernet cable to the board this stops working, like the output sometimes only prints the gesture that we are showing otherwise it prints the default value(which is shown when no gesture is detected).
Board I am using: STM32 nucleo F207ZG
Sensor l am using: Grove Smart IR Gesture Sensor V1.1 PAJ7660 (https://wiki.seeedstudio.com/grove_gesture_paj7660/)
Output is being shown in PUTTY.
Link to github: https://github.com/txr-academy/GestLink
https://redd.it/1pxxrtr
@r_embedded
Hey peeps, I am a fresher who got placed as an embedded engineer. I did my bachelors in Computer Science Engineering. So I am new to the embedded world. As a part of my training I and a friend is working in a project where we seem to be stuck because of ethernet/RJ45.
The project is about using a gesture sensor to detect gestures and map it to a certain action. So whenever that gesture is performed associated action will take place.
The issue: We were able to detect gestures and print what gesture was being detected, but to move forward we needed to use ethernet/LWIP. So in normal case, when I hold 1 finger it prints "count 1" and when its 2 fingers it prints "count 2" and so on. We keep polling to see if there is gesture and so as long as we show the gesture the output keeps getting printed. Now if we connect the ethernet cable to the board this stops working, like the output sometimes only prints the gesture that we are showing otherwise it prints the default value(which is shown when no gesture is detected).
Board I am using: STM32 nucleo F207ZG
Sensor l am using: Grove Smart IR Gesture Sensor V1.1 PAJ7660 (https://wiki.seeedstudio.com/grove_gesture_paj7660/)
Output is being shown in PUTTY.
Link to github: https://github.com/txr-academy/GestLink
https://redd.it/1pxxrtr
@r_embedded
Seeedstudio
Grove Smart IR Gesture Sensor (PAJ7660) | Seeed Studio Wiki
Getting started for the Grove Gesture sensor PAJ7660.
I built a developer kit for my recent AFR (air to fuel ratio) gauge project
https://preview.redd.it/9yv8mheorz9g1.jpg?width=1536&format=pjpg&auto=webp&s=768fcf32a2f58e8d621e3abad4bd07f4d603c9d2
Actually this is my first complex project where ım using a LCD its a 2 inch tft display with a ILI9225 driver and ım using the 16 bit mode to drive it and ı added some buttons buzzer and a pot for a adc simulation
https://redd.it/1pxz813
@r_embedded
https://preview.redd.it/9yv8mheorz9g1.jpg?width=1536&format=pjpg&auto=webp&s=768fcf32a2f58e8d621e3abad4bd07f4d603c9d2
Actually this is my first complex project where ım using a LCD its a 2 inch tft display with a ILI9225 driver and ım using the 16 bit mode to drive it and ı added some buttons buzzer and a pot for a adc simulation
https://redd.it/1pxz813
@r_embedded
Are breakout boards used in commercial/industrial products?
Are breakout boards used in commercial/industrial products?
Hello everyone. I had this simple question.
BME280 is a very small sensor itself and most often it comes with it's own breakout board.
I was wondering if people in industry use these breakout boards as they are? As soldering bme280 itself, the tiny silver cube, imo seems a difficult task.
https://redd.it/1py1spv
@r_embedded
Are breakout boards used in commercial/industrial products?
Hello everyone. I had this simple question.
BME280 is a very small sensor itself and most often it comes with it's own breakout board.
I was wondering if people in industry use these breakout boards as they are? As soldering bme280 itself, the tiny silver cube, imo seems a difficult task.
https://redd.it/1py1spv
@r_embedded
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
Where can I learn the business aspect of embedded systems?
I'm jobless but I think I know many things in embedded software.
Companies are rejecting me. Feeling like I have reached a dead end.
Which study could give me the knowledge by which I could understand business aspect of embedded systems?
https://redd.it/1py6330
@r_embedded
I'm jobless but I think I know many things in embedded software.
Companies are rejecting me. Feeling like I have reached a dead end.
Which study could give me the knowledge by which I could understand business aspect of embedded systems?
https://redd.it/1py6330
@r_embedded
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
Stm32L476RG
Hello all , does anyone have any .c and .h files for the liquid lcd display? Im on bare metal c right now ive done code myself but i just get blocks and not full text.
https://redd.it/1py8rn2
@r_embedded
Hello all , does anyone have any .c and .h files for the liquid lcd display? Im on bare metal c right now ive done code myself but i just get blocks and not full text.
https://redd.it/1py8rn2
@r_embedded
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community
STM32 FDCAN goes Error Passive when transmitting shared CAN IDs (same ID, different payload) — existing system works fine, how to coexist?
Hi everyone,
I’m integrating a new STM32H7-based ECU (FDCAN, Classic CAN mode) into an existing vehicle CAN bus.
There are 3 shared arbitration IDs (e.g. 0x7A1 / 0x7A2 / 0x7A3) that multiple ECUs already publish on this bus.
Each ECU sends different payloads on the same ID (HW/FW/version info).
This has been running in production across many vehicles for years.
When my ECU also starts transmitting these shared IDs, my node alone starts accumulating TX ACK errors, TEC rises, and it enters Error Passive (PSR_EP=1). Eventually transmission stalls.
Other ECUs continue operating normally.
Key observations:
RX works fine (REC stays \~0)
CEL stays 0 (no framing/stuff errors)
TEC rises steadily during shared-ID transmission
If I stop sending those shared IDs, my ECU is stable
Bench setup works better; vehicle bus triggers the issue
Other ECUs use a mix of Classic CAN + FDCAN and RTOS-based TX queues. I only use a normal, bare metal queueing approach
Questions:
1. Is this expected CAN behavior when multiple nodes transmit the same arbitration ID with different payloads?
2. Why would only my node go Error Passive while others remain stable?
3. Are there any workarounds for sharing common arbitration IDs
I understand this setup is not CAN-spec compliant, but I need to integrate with an existing architecture. I can modify TX timing and retry logic, but I cannot change the IDs or remove periodic transmission.
Thanks!
https://redd.it/1pycr7y
@r_embedded
Hi everyone,
I’m integrating a new STM32H7-based ECU (FDCAN, Classic CAN mode) into an existing vehicle CAN bus.
There are 3 shared arbitration IDs (e.g. 0x7A1 / 0x7A2 / 0x7A3) that multiple ECUs already publish on this bus.
Each ECU sends different payloads on the same ID (HW/FW/version info).
This has been running in production across many vehicles for years.
When my ECU also starts transmitting these shared IDs, my node alone starts accumulating TX ACK errors, TEC rises, and it enters Error Passive (PSR_EP=1). Eventually transmission stalls.
Other ECUs continue operating normally.
Key observations:
RX works fine (REC stays \~0)
CEL stays 0 (no framing/stuff errors)
TEC rises steadily during shared-ID transmission
If I stop sending those shared IDs, my ECU is stable
Bench setup works better; vehicle bus triggers the issue
Other ECUs use a mix of Classic CAN + FDCAN and RTOS-based TX queues. I only use a normal, bare metal queueing approach
Questions:
1. Is this expected CAN behavior when multiple nodes transmit the same arbitration ID with different payloads?
2. Why would only my node go Error Passive while others remain stable?
3. Are there any workarounds for sharing common arbitration IDs
I understand this setup is not CAN-spec compliant, but I need to integrate with an existing architecture. I can modify TX timing and retry logic, but I cannot change the IDs or remove periodic transmission.
Thanks!
https://redd.it/1pycr7y
@r_embedded
Reddit
From the embedded community on Reddit
Explore this post and more from the embedded community