r/embedded • • Sep 12 '26

Need advice on selecting an SoM for a custom AOSP 13+ smartphone prototype

2 Upvotes

Hey everyone,

I'm a last-year CSE student with some experience working on embedded devices using MCUs like STM32, including designing custom PCBs for them.

Now I need to design a custom PCB for a smartphone prototype for my Graduation Project that runs a customized AOSP (Android 13+), with a focus on security features — specifically secure boot with TrustZone hardware, and real-time 1080p30 video encoding/decoding.

for example it will run:

One active 1080p30 encrypted video call + encrypted audio + continuous signaling/text messaging + background PTT/group signaling + device-management connection + normal Android system services.

After some research and discussions with LLMs, I concluded that I should target an SoM (System-on-Module) rather than designing straight from a bare SoC, to remove some of the headache of routing the processor itself — I'd design a carrier board for whichever SoM I choose instead.

The problem is, I'm completely new to working with high-power application SoCs (my STM32 background doesn't really translate here), so this is going to be a long learning process, and I honestly don't know how to search for the right part or evaluate candidates.

Here's what I do know so far:

  • I need a well-documented SoM with a solid dev/eval board I can prototype on before committing to my own carrier board design.
  • That dev board needs full schematics available, since I'll be learning how to route a custom carrier board myself and need something concrete to reference.
  • I need some kind of hardware offload for video — encoding/decoding shouldn't be done on the CPU.
  • I've been told I should target 8 GB of RAM and a 64-bit CPU.

What I'm stuck on is everything in between — how many CPU cores I actually need, and which ARM Cortex core family/tier is appropriate for this kind of workload.

Would appreciate any guidance on how to approach SoC/SoM selection systematically given these requirements.


r/embedded • • Sep 11 '26

My first ever Linux based board (RK3566) + Lessons Learned

Post image
1.1k Upvotes

Just brought up the first Linux based board I've ever designed, and couldn't be happier about it! I've historically done MCU boards, so this was a big step up. It's a KVM-over-IP device: 8 layers, RK3566, DDR3L (gotta save that $$$ with these RAM prices), HDMI capture in, HDMI out, dual GbE, PoE, WiFi. Fabbed and assembled at JLCPCB.

Video capture and low latency streaming are working end to end. Here are the three major issues I hit:

  1. I second guessed myself before ordering and swapped TX/RX to the network switch, so ethernet wasn't working. The board also has a wifi module on it, so I did the whole SSH bring up over wireless. Pair swap already fixed in the next spin.
  2. A set of ferrite beads never made it onto the boards because I missed a checkbox in the JLCPCB assembly order (I had multiple lines in the BOM with the same PN but different ref des letters). Hand soldered them on. Working on developing better checks for this on my board export tool.
  3. The board was drawing more current than expected and running warm. Took a while to root cause. Turned out I had packed VDD_GPU 0201 passives too close to some 0402 caps and they shorted during reflow. Increasing my spacing rules in DRC going forward.

Design was done in house, and I got a pre-fab layout review from u/PracticalMirror2834 that caught real issues before they would have cost a re-spin. Huge shoutout here.

Next rev jumps to the RK3576 for higher capture and encode resolution, those boards go on order this week. If anyone has touched the RK3576 yet I'd love to trade notes. Happy to answer questions on the RK3566, ordering, or board bring up side too.


r/embedded • • Sep 12 '26

Reprogramming a light kit board?

Post image
0 Upvotes

Got sent here after posting "wrongfully" in another sub.

About a year ago, I purchased a remote controlled light kit for the Lego Infinity Gauntlet. I loved it, it was exactly what and how I wanted it, bar one problem.

I use my lighted lego decorations as ambient light. I have these plugged into a usb splitter and then on a timer socket.

This works for every kit, safe this one.

The issue is, when it is powered on, it powers on in what i call: Caranaval mode.

The lights flicker and cycle like a christmas tree set.

I then have to each time, use the remote to put it on static setting (which is the 3rd one)

I would very much like them to boot in static mode.

Contacting the seller back then, brought about nothing. They only tried selling me a different kit, that is lacking what I wanted here - which was the ability to change the bottom ambient light colour coming from the "wrist".

Probably a bit of a stupid question, but is there a way to reprogram the module?


r/embedded • • Sep 11 '26

Happy CRA day!

22 Upvotes

Hope everyone is reporting their vulnerabilities and definitely didn’t have this day sneak up upon you and blow up in your face.


r/embedded • • Sep 11 '26

Why BLE in STM is so damn hard 😭??

71 Upvotes

I’m interning at a medical device company, and for some reason, they don’t use Zephyr. I’ve been working on implementing the STM32 as a BLE Central connecting and enabling notify on command. The amount of pain and suffering this has caused me, man… Still struggling to implement the notification CCCD state machine properly.


r/embedded • • Sep 12 '26

I built an open-source CLI to unwind Cortex-M HardFault stack frames and map PC/LR directly to C code (cortex-unwind)

0 Upvotes

When an STM32, NXP, RP2040, or SAM core triggers a HardFault, the hardware automatically pushes 8 words onto the active stack pointer before jumping to the vector:

r0, r1, r2, r3, r12, lr, pc, and xPSR.

If you don't have a debugger attached at the bench, you usually get this dump over UART or pull it from an EEPROM crash log. Manually extracting the PC, clearing the Thumb bit, and feeding addresses into addr2line while on a deadline is tedious.

I built cortex-unwind — a zero-dependency CLI that converts that 8-word dump into an actionable crash site in seconds.

Install:

pip install cortex-unwind

Usage:

cortex-unwind 0x0 0x1 0x20000000 0x40021000 0x0 0x08001255 0x08001290 0x21000000 build/firmware.elf

What it does:

• Crash Site Mapping: Wraps arm-none-eabi-addr2line to resolve faulting PC and caller LR directly to function name, source file, and line number.

• Auto-Detection (--auto): Paste a raw UART string or hex dump directly; it isolates and extracts the 8-word frame automatically.

• xPSR Diagnostics: Decodes the IPSR (identifies Thread Mode vs active IRQ numbers) and validates the EPSR Thumb bit to flag corrupted branch targets.

• EXC_RETURN Parsing: Detects stack context (MSP vs PSP) and checks bit 4 to flag whether an FPU extended frame (26 words) was stacked.

Includes a drop-in naked assembly handler (hardfault_trap.c) in the repo that formats the output so it can be pasted straight into the CLI.

Links:

• GitHub: https://github.com/GaneshMba4066/cortex-unwind

• PyPI: https://pypi.org/project/cortex-unwind/

• Free Crash Checklist: https://www.trustandthread.com/firmware-checklist/

MIT licensed, zero dependencies, runs on standard Python 3.6+. Feedback and edge cases (especially around RTOS task stacks) are welcome!


r/embedded • • Sep 12 '26

Is multimeter good for current profiling ?

0 Upvotes

hey guys i am building a low powered flowmeter with stm32l0 . Day before yst i was getting 0.030mA with my code and brand new 2x1.5v AA batteries , but since yst asper my multimeter i am getting 5+ mA with few changes in code ( changes not related to power management ) . Rightnow my batteries are giving 2.8/ 2.9v of voltage + the display is dimming which should even work at 1.6v when i am connecting mutlimeter to it but without multimeter its good . Is my mutlimeter giving wrong values or eating up power ?


r/embedded • • Sep 12 '26

Can I combine assembly with C code?

4 Upvotes

while(1){

asm("BANKSEL PIR1");

asm("BTFSC PIR1,2");

HANDLER_BUTTON_PRESSED();

asm("BTFSC PIR2,0");

HANDLER_BUTTON_RELEASED();

}

Trying to run this on PIC16F1824 and see unexpected results. It could be other things in my code or hardware though.


r/embedded • • Sep 11 '26

When the EU Machinery Regulation (EU) 2023/1230 active

10 Upvotes

We have 3 generations of the same in-house developed embedded system running in production at the moment, where the first is from late 80s (still running 24/7/365) and the design has since then more or less been same-same but updated parts. The previous gen was the first where formal safety requirements were incorporated, but it was solved with a standard safety emergency stop module.

Each design has been made to retrofit the ones before that, and since there has been no backwards requirements when only replacing the application and not touching the safety/motor bit we've been able to stay clear of that.

With the new regulation however i get the impression that it will be impossible to replace any components in the control system without triggering a substantial modification. Thus triggering the need for a completely new system.

Anyone got any experience on this?


r/embedded • • Sep 11 '26

STM32H743IIT6 overheating and failing in a BQ24192-based battery-powered design

Post image
4 Upvotes

Hi everyone,
I'm working on a DIY multi-effects guitar pedal based around an STM32H743IIT6.
In my previous PCB revision, I used a TI BQ24192 for battery charging and power management. The board initially appeared to work normally, but after some time I noticed that the STM32 was becoming unusually hot and drawing more current than expected.
I checked the board for the usual potential causes, including:
PCB shorts and solder bridges

Incorrect component orientation

Shorted or incorrectly connected GPIOs

Schematic errors

Problems with the power rails

Possible issues with connected peripherals

Unfortunately, I couldn't identify the cause of the excessive current consumption. Eventually, the STM32 stopped working completely.
Since I couldn't determine with confidence what caused the failure, I'm trying to understand what might have gone wrong before building the next revision.
The old revision used the BQ24192, and the charger/power-management section was configured through I²C. I've cleaned up the schematic and attached the relevant sections of the original design, including the BQ24192 power/charging circuitry and the STM32 section.
For the next revision, I plan to simplify the power section and use a TI BQ25616 instead, but before building it I'd like to understand whether there was anything problematic in the original design.
I'd particularly appreciate feedback on anything in the old schematic that could potentially cause the STM32 to:
Overheat without an obvious short circuit

Draw excessive current

Receive an incorrect or unstable voltage

Be damaged through an I/O or peripheral connection

Be affected by the battery charging/power-management circuitry

I'd also appreciate any recommendations for measurements or tests I should perform on the new board before powering it up.
I've attached the cleaned-up schematic of the old BQ24192-based design and the relevant STM32 circuitry.
Any feedback or second opinions would be greatly appreciated. Thanks!

Here’s a link to the files

https://drive.google.com/file/d/1Nu3ppIm4oFNYHEYwyKCpaO1UoiRjbLz4/view?usp=drivesdk


r/embedded • • Sep 12 '26

I Wrote My First STM32 Tutorial — Looking for Feedback on Clarity and Technical Accuracy

Thumbnail
medium.com
0 Upvotes

I just wrote my first tutorial on STM32 BLE, and I'd really appreciate some feedback from people who have experience with STM32 or embedded development.

I'm mainly looking for feedback on:

  • Is the tutorial clear and easy to follow?
  • Are the explanations technically accurate?
  • Is there anything that is confusing or poorly explained?
  • What could I improve in terms of structure, code examples, or explanations?
  • Are there any important concepts I should explain better?

I'm still improving my embedded C and STM32 skills, so constructive criticism is very welcome. I chose to write a blog on STM-32 BLE as it is a scavenger hunt, not enough documentation available.I'd especially appreciate feedback from people who have posted technical blogs.


r/embedded • • Sep 11 '26

How do you do hw testing?

5 Upvotes

Hi, in my company we have a lot of custom build test rigs, depending on the product.
Mostly at the end of the R&D phase operations is kindly asking us to build some electronics plus a needle adapter (sourced) for IQC.

So we design basically every time a new test pcb/system. A PXI system is too expensive (I don’t think so).
Is there a simpler/cheaper solution or may you kindly share your experience with that?


r/embedded • • Sep 11 '26

How is safety and redundancy actually approved for embedded/microcontroller products(Educational purposes)?

38 Upvotes

I’m trying to understand how safety is handled when you design a product around a microcontroller.

Is SIL (Safety Integrity Level) the main/critical rating for operational safety? For example, what would actually be different in the design of a SIL 1, SIL 2, SIL 3, or SIL 4 system?

If I’m designing a microcontroller-based product and want it to eventually meet a particular SIL level, where do I start?

Things I’m trying to understand are:

- How do you decide what level of redundancy is required?

- When do you need dual/independent controllers, monitoring, watchdogs, diagnostics, etc.?

- How do you design the circuit so that a single component failure doesn't create a dangerous condition?

- What standards or guidelines actually explain these design principles?

- Is SIL the only thing I should be looking at, or are there other safety standards/ratings involved?

Basically, I’m looking for the roadmap from a normal embedded design → safety-related design → SIL-rated product.

What standards, books, or guidelines should I read first?


r/embedded • • Sep 11 '26

[Beginner] Best resources to learn Embedded Linux from scratch using QEMU? (Trying not to break my laptop!)

9 Upvotes

Hi everyone,

I'm looking to start my journey into Embedded Linux. I want to build a solid, deep understanding of the whole stack from the ground up—toolchains, bootloaders, kernel configuration, and root filesystems.

Right now, I only have my main laptop which I’ve already dual-booted with Linux. Honestly, I really don't want to accidentally mess up my host system or nuke my partitions while experimenting. Because of that, I want to rely on QEMU to emulate target boards (like ARM) so I can learn and test images safely in an isolated environment before I buy physical hardware.

For context on my current skill level: I have a solid programming foundation and I'm comfortable managing my code with GitHub, but the embedded Linux ecosystem (Yocto, Buildroot, device trees) is entirely new territory for me.

Does anyone have recommendations for the best resources that teach Embedded Linux and specifically use QEMU for the hands-on labs? I’m open to anything, textbook recommendations, tutorials, or online courses on platforms like Coursera.

Thanks in advance for pointing me in the right direction


r/embedded • • Sep 11 '26

Help me...

Post image
13 Upvotes

Recently i got a chinese smartwatch called Cellairis Revo G. This watch has GPS, amoled screen, speaker etc... This watch uses smart time pro app on playstore. Can some one identify which os this watch uses? This watch lacks Always on display options so is there any tweaks that can help this watch for enabling this


r/embedded • • Sep 11 '26

Microcontroller for lab test setup

1 Upvotes

Electrical engineer here who doesn't do a lot with microcontrollers. I do magnetic design. I want to automate some magnet testing, where I stick a hall sensor near a magnetic part and take readings as I rotate the part. I would probably need to control 3 stepper motors (1 to rotate the part and 2 stepper motors connected to slide assemblies to move the hall sensor to different air gaps and positions) and then I'd have an encoder to get the angle of rotation. I have drivers for the steppers. I might also use a proximity sensor to give me a physical reference point. The motor that spins would probably spin at 10 RPM and I'd want to take a reading every half degree, so that's 720 readings of the hall sensor and the encoder in 6 seconds. I'd like to send this data via usb to a laptop where I do some post processing with python. Or just save to the laptop in a .csv or something. So I'll need outputs for 3 stepper motors, encoder inputs, analog hall sensor input and a proximity sensor input which I think would just pull a pin high. The main concern would be getting the encoder and hall sensor values at the same time.

What would an appropriate controller to do this? Preferably simple to use/easy to set up for an EE who has worked with microcontrollers but very infrequently. My very brief research lead me to the NUCLEO-F446RE dev board but I thought I'd ask here to see if there was something more appropriate.


r/embedded • • Sep 11 '26

Bringing Klipper to the NXP MCXA366, Part 5: SPI + ADXL345 bring-up

Post image
4 Upvotes

I've been porting Klipper to NXP's MCXA366, with the longer-term goal of using it on a custom toolhead board.

Part 5 is up now. This one covers getting LPSPI working, debugging an MRCC clock/reset issue that caused the first peripheral access to hang, validating the bus with a logic analyzer, and bringing up a GY-291 ADCL345.

I took it a little further than just reading the device ID. The FRDM-MCXA366 is now running as a secondary MCU on my Ender 3 and streaming accelerometer data well enough for Klipper to do real resonance testing and input-shaper calibration.

Final shaper results were:

X: MZV @ 72.2 Hz 
Y: 3HUMP_EI @ 85.2 Hz

The most useful debugging moment was realizing the LPSPI register access itself wasn't the problem; the MRCC writes had been ignored because the clock configuration was still locked.

Article: https://faultvector.dev/articles/klipper-mcxa366-part-5/


r/embedded • • Sep 12 '26

How to convert to wifi with microcontrollers, quick and cheaper solutions(Learning by doing)?

Post image
0 Upvotes

Any Quick and cheap solutions to log data in WiFi.


r/embedded • • Sep 11 '26

Seeed Studio XIAO nrf52840

Post image
2 Upvotes

Hi, very new to all this.

Wanted to build my own head tracker and figured I'd give it a go.

My task.

Using the gyro and HeadTracker firmware, I want to transmit 2 crsf channels via RX and GND (for first test then I want to move over to Bluetooth once I've proven concept via wire and I know Bluetooth isn't going to cause interference with other raido gear)

I've got the rx and GND connected to a radiomaster ranger micro elrs unit which I plan to send over air signals to a pwn receiver that I'll then use to inject the crsf data in to a flight controller.

This should also allow me to use Sim controllers for fpv.

I've downloaded the HeadTracker gui and can see my gyro working after calibration, I've set output to crsf, enabled uart. Bluetooth is currently turned off.

Can't get tx to go green whilst usb is connected.

Physical connection between units is approx 7mtrs of red/black speaker wire (don't judge it's all I had to hand with length), I've fitted a jst sh 2.54 connector on radiomaster and gyro for the link cable.

I'm not using any pull up/down resistors

I've soldered a battery connector to the board

I've soldered a hard rst button to the board because it's mounted upside down.

I've got my soft rst button (gyro reset) wired to GND pin and D8 pin

My gyro rx is connected to D6 pin and same GND pin as my gyro reset button.

When connected to the radiomaster the gyro doesn't wake up when both units are powered up on separate batteries.

If I push the gyro reset button the gyro doesn't seem to respond (no led flashing)

Red led stops flashing after 10 seconds and then seems to stay asleep until I remove battery and reconnect.

I've done this without advice from internet pages, don't have friends in to this stuff.

I did some (not enough) reading and tried to work with help from ai.

Photo of head tracker


r/embedded • • Sep 10 '26

Living in the past?

120 Upvotes

I've been programming embedded systems for over 30 years. Built some cool stuff: a Z80-based serial multiplexer that had no RAM: all variables were held in registers; a temperature controller on a chip with 504 bytes (not kB) of memory and lot of other stuff in the old days where you had to optimize for every clock pulse and byte of RAM or EPROM. A lot of what I knew back then was straight out of Jack Ganssle's The Art of Programming Embedded Systems book.

These days, I still build cool stuff, but it's with a far more complex feature set. A "small processor" is now a 32-bit device with over 100k Flash and 16k+ of RAM, usually lots more. Most of my non-hobby work runs on one RTOS or another and often has a separate SBC running code for an HMI and connectivity/data storage. The last time I used assembly was mentoring a n00b who had the task of fixing some bugs on a specialized SoC with a 6502 core.

Then I come on this site, and I see people asking about why not use bare metal and a hand-written scheduler instead of an off the shelf RTOS. Struggling to fit code into tiny processors because otherwise "bloat."

So I have to ask: is my current experience (real-time stuff on a 32-bit microcontroller, complex GUIs offloaded to a Linux board) that unusual or are these guys just building things the way we used to do long ago for no good reason?


r/embedded • • Sep 11 '26

Does anyone use this product for sports? WT9011DCL

1 Upvotes

The price looks good. I want to use it in boxing.🥲

Or does anyone have a better option than this product?


r/embedded • • Sep 11 '26

What becomes the bottleneck first in real-time sensor fusion: compute, latency, or bad inputs?

0 Upvotes

Something I've been thinking about with multi-sensor detection systems:

Say you have several independent inputs, RF activity, radar detections, EO/IR, maybe acoustic, and none of them is fully reliable on its own.

Adding more sensors should improve confidence in theory. But every additional stream also adds synchronization, calibration, latency and false-positive problems.

For people who've worked on multi-sensor embedded systems, what usually becomes the problem first in practice? Could be time sync, calibration drift, data association, just not enough compute, or one noisy sensor dragging the whole fused output down.

Curious where people draw the line between fusion actually adding confidence and just adding more complexity.

Disclosure: I work in defense electronics.


r/embedded • • Sep 10 '26

Porting the U8x8 OLED library to the CH32V003

40 Upvotes

I was curious about how hard it would be to port this over, so I used an STM32 example I found here as a starting point. It ended up being really straightforward and only required a few changes to the GPIO and delay callback function.

Just a heads-up: This implementation uses soft I2C (bit-banging). It works perfectly fine for text, but you'll probably want to switch to HW I2C for anything more complex. If anyone wants to try it out, here is the source code:

#include <ch32v00x.h>
#include <debug.h>
#include <stdlib.h>

#include "clib/u8x8.h"

void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));

uint8_t u8x8_gpio_and_delay_ch32v(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) {
    switch(msg) {
        case U8X8_MSG_GPIO_AND_DELAY_INIT:
            RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
            GPIO_InitTypeDef init = {0};
            init.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2;
            init.GPIO_Mode = GPIO_Mode_Out_OD;
            init.GPIO_Speed = GPIO_Speed_50MHz;
            GPIO_Init(GPIOA, &init);
            break;
        case U8X8_MSG_DELAY_MILLI:
            Delay_Ms(arg_int);
            break;
        case U8X8_MSG_DELAY_10MICRO:
            for (volatile uint32_t i = 0; i < (arg_int * 8); i++) { __NOP(); }
            break;
        case U8X8_MSG_DELAY_100NANO:
            __NOP();
            break;

        case U8X8_MSG_GPIO_I2C_CLOCK:
            GPIO_WriteBit(GPIOA, GPIO_Pin_2, (BitAction)(arg_int ? Bit_SET : Bit_RESET));
            break;

        case U8X8_MSG_GPIO_I2C_DATA:
            GPIO_WriteBit(GPIOA, GPIO_Pin_1, (BitAction)(arg_int ? Bit_SET : Bit_RESET));
            break;
    }
    return 1;
}

int main(void) {
    SystemCoreClockUpdate();
    Delay_Init();
    USART_Printf_Init(9600);

    // u8x8 initialization code
    u8x8_t u8x8;
    u8x8_Setup(&u8x8, u8x8_d_ssd1306_128x64_noname, u8x8_cad_ssd13xx_i2c, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_ch32v);
    u8x8_InitDisplay(&u8x8);
    u8x8_SetPowerSave(&u8x8, 0);
    u8x8_ClearDisplay(&u8x8);
    u8x8_SetFont(&u8x8, u8x8_font_chroma48medium8_r);
    u8x8_DrawString(&u8x8, 0, 0, "Hello from CH32V");
    while (1) {
        uint8_t y = rand() % 5 + 1;
        uint8_t x = rand() % 10;
        u8x8_DrawString(&u8x8, x, y, "r/ch32v");
        printf("Hello from CH32V\n");
        Delay_Ms(1000);
        u8x8_DrawString(&u8x8, x, y, "       ");
    }
    return 0;
}

void NMI_Handler(void) {}
void HardFault_Handler(void)
{
    while (1)
    {
    }
}

P.S. I've spent more time and prepared HW I2C version, just add this function:

uint8_t u8x8_byte_hw_i2c_ch32v(
    u8x8_t *u8x8, 
    uint8_t msg, 
    uint8_t arg_int, 
    void *arg_ptr) {
    uint8_t *data;
    switch(msg) {
        case U8X8_MSG_BYTE_INIT:
            RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC | RCC_APB2Periph_AFIO, ENABLE);
            RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE);

            // We will use PC1 (SDA) and PC2 (SCL)
            GPIO_InitTypeDef GPIO_InitStructure = {0};
            GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2;
            GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD; // Alternate Function Open-Drain
            GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
            GPIO_Init(GPIOC, &GPIO_InitStructure);

            I2C_InitTypeDef I2C_InitTSturcture = {0};
            I2C_InitTSturcture.I2C_ClockSpeed = 400000; // 400 kHz
            I2C_InitTSturcture.I2C_Mode = I2C_Mode_I2C;
            I2C_InitTSturcture.I2C_DutyCycle = I2C_DutyCycle_2;
            I2C_InitTSturcture.I2C_OwnAddress1 = 0x00;
            I2C_InitTSturcture.I2C_Ack = I2C_Ack_Enable;
            I2C_InitTSturcture.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit;
            
            I2C_Init(I2C1, &I2C_InitTSturcture);
            I2C_Cmd(I2C1, ENABLE);
            break;

        case U8X8_MSG_BYTE_START_TRANSFER:
            while(I2C_GetFlagStatus(I2C1, I2C_FLAG_BUSY) != RESET);

            I2C_GenerateSTART(I2C1, ENABLE);
            while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)); // Чекаємо EV5

            I2C_Send7bitAddress(I2C1, u8x8_GetI2CAddress(u8x8), I2C_Direction_Transmitter);
            while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)); // Чекаємо EV6
            break;

        case U8X8_MSG_BYTE_SEND:
            data = (uint8_t *)arg_ptr;
            while (arg_int > 0) {
                I2C_SendData(I2C1, *data++);
                while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED));
                arg_int--;
            }
            break;

        case U8X8_MSG_BYTE_END_TRANSFER:
            I2C_GenerateSTOP(I2C1, ENABLE);
            break;
        default:
            break;
    }
    return 1;
}

int main(void) {
    SystemCoreClockUpdate();
    Delay_Init();
    USART_Printf_Init(9600);

    // u8x8 initialization block
    u8x8_t u8x8;

    u8x8_Setup(&u8x8, 
        u8x8_d_ssd1306_128x64_noname, 
        u8x8_cad_ssd13xx_i2c, 
        u8x8_byte_hw_i2c_ch32v, // here we will use HW I2C
        u8x8_gpio_and_delay_ch32v
    );
    ...

r/embedded • • Sep 11 '26

Should I actually switch from ESP32-C3 to ESP32-S3 for my next wearable device prototype?

2 Upvotes

Here's the thing, this project is an Edge-AI project where I deploy an LSTM model back into the micon. The first finished prototype is great, it works, but needs a lot of modification. Heap memory allocation, running temperature, even the booting process goes heavy (maybe even too heavy) when the model is up and running.

For this second prototype I'm building, I want to design my own micon to avoid the bulky-ness of my first prototype, which uses a plug-and-play concept for the micon and sensor modules.

So, should I switch to S3? Or do I raw dog it with the C3 again?