r/stm32 Jan 27 '21

Posting is now public

15 Upvotes

Feel free to post your stm32 questions, creations, and ramblings


r/stm32 52m ago

Simulink STM32 help.

Upvotes

Hello everyone. I’m trying to build a project that involves 6 PIDs to drive motors of a rover, I’m not much of a programmer so I went with the simulink coder. My boards is nucleo H753ZI and my idea is to have it do the pid loops, the set points of which are to be sent through the ethernet port on the board. So far I’ve hit dead end on the ethernet, I tried settings from the matlab site, yt videos but can’t get it to ping. I put a simple model with sine connected to led pin to verify that the model is working and it works. Has anyone done something with ethernet on the same board in simulink? Where and how can I start the troubleshooting? Also would be great if anyone can share ioc settings, but only if it is for the same board.


r/stm32 22h ago

Help in programming a STM32 G0 series board without ST-Link.

Post image
27 Upvotes

I am trying to program a stm32 G0B1 series board. Most tutorial are using an ST Link to do so but is there a way to do it without one. Here is the picture of board I am using


r/stm32 9h ago

Programming the STM32F103C8T6 without ST-Link V2

Thumbnail gallery
1 Upvotes

r/stm32 9h ago

Programming the STM32F103C8T6 without ST-Link V2

Thumbnail
gallery
1 Upvotes

***

**Subject:** Inquiry about programming STM32F103C8T6 (Blue Pill) using STM32F401RCT6 (Black Pill)

Hello,

I would like to inquire about the possibility of programming the **STM32F103C8T6 (Blue Pill)** board using the **STM32F401RCT6 (Black Pill)** board as an SWD programmer.

**Details:**

- Board to be programmed: **STM32F103C8T6 (Blue Pill)** - STM32F103C8T6 MCU

- Programmer board: **STM32F401RCT6 (Black Pill)** - STM32F401RCT6 MCU

**Questions:**

  1. Can the **STM32F401RCT6 (Black Pill)** be used as an SWD programmer to program the **STM32F103C8T6 (Blue Pill)** via SWD interface (SWCLK, SWDIO, NRST, GND, 3.3V)?

  2. **If anyone has tried this before, please share your experience** (Did it work? Any issues? How to avoid them?)

Thank you in advance.

***

***

**الموضوع:** استفسار عن برمجة STM32F103C8T6 (Blue Pill) باستخدام STM32F401RCT6 (Black Pill)

مرحبًا،

أود الاستفسار عن إمكانية برمجة لوحة **STM32F103C8T6 (Blue Pill)** باستخدام لوحة **STM32F401RCT6 (Black Pill)** كمبرمج SWD.

**التفاصيل:**

- اللوحة المراد برمجتها: **STM32F103C8T6 (Blue Pill)** - معالج STM32F103C8T6

- اللوحة المبرمجة: **STM32F401RCT6 (Black Pill)** - معالج STM32F401RCT6

**السؤال:**

  1. هل يمكن استخدام **STM32F401RCT6 (Black Pill)** كـ SWD programmer لبرمجة **STM32F103C8T6 (Blue Pill)** عبر واجهة SWD (SWCLK, SWDIO, NRST, GND, 3.3V)؟

  2. **لو فيه حد جرّب ده قبل كده، ياريت يشاركني تجربته** (هل شغل فعلاً؟ فيه مشاكل؟ إزاي تجنبها؟)

شكرًا مقدمًا.

***


r/stm32 1d ago

Nucleo F401RE Help!!

Thumbnail
gallery
23 Upvotes

I have a Nucleo and a LCD panel, I was trying to make a digital watch I only see these numbers and letters. I don't know what to do. If any of you can help this will make me very happy, thanks in advice.


r/stm32 2d ago

Fixing ST's Bugs - CMSIS-DSP from Arm Source | STM32 Tutorial #100

Thumbnail
youtube.com
3 Upvotes

r/stm32 2d ago

How do you test firmware against external peripherals and failure conditions?

1 Upvotes

I’m trying to understand how embedded teams test firmware that depends on external peripherals such as I²C, SPI, or UART devices.

In particular, how do you test cases like:

* peripheral disconnects / NACKs
* invalid or unexpected data
* timing-related behavior
* interrupts
* initialization failures
* other hardware edge cases

Do you normally use real peripherals, software mocks, another MCU pretending to be the peripheral, custom HIL hardware, or commercial tools?

I’m especially interested in what becomes difficult or annoying to automate in real projects, and whether your team has ended up building custom hardware or scripts to solve it.

Would be interested to hear what people are actually doing in production environments.


r/stm32 2d ago

Home Automation - STM32F10X

Thumbnail gallery
12 Upvotes

r/stm32 3d ago

[[STM32 / Cortex-M] Intern looking for recommended books/resources to learn writing bare-metal startup code and linker scripts from scratch (in C)

Thumbnail
2 Upvotes

r/stm32 4d ago

Sensorless (HFI+SMO) FOC from scratch on STM32

Enable HLS to view with audio, or disable this notification

59 Upvotes

r/stm32 5d ago

I made a STM32 HAL driver for MPU6050

9 Upvotes

Includes support for hardware interrupts and custom config options for the sensor. Code is in fashion of similar drivers already on github but with additional support. It has been tested but I am very new to this so Im sure there are things I missed. Criticism welcome.

Repo:

https://github.com/mihalamot/STM32-MPU6050-HAL-Driver

I am 21yo CS student with a recently found passion for embedded/low level programming. Job market is not the best right now so I am trying to distinguish myself with hobby projects like this one. It would help me a lot if anyone could take the time to check this out and potentially star it. If someone actually used my code I know that it would help my employment chances.

Thanks


r/stm32 5d ago

Import to altium designer from stm32cubeMX

Post image
3 Upvotes

I placed the names of the pins in stm32cubeMX (the picture is taken from the Internet) and now I want to transfer them to the altium designer in the form of NetLabel. Now I'm doing it manually. Soon I will write my script for automatic transfer. But before that, I wanted to ask you how you do it now?


r/stm32 5d ago

I need help with connecting a sensor to my nucleo board

0 Upvotes

I am having a huge skill issue with my stm32, i can not manage to read an output from my VL53L0X distance sensor. Any help would be appreciated, really; i tried using simple librarys from github but i couldn't make it work. I tried the st's official library but that one was way too complicated for me so i couldn't make it work either. I am using i2c protocol.

GitHub - Squieler/VL53L0X---STM32-HAL: VL53L0X - STM32 HAL Library · GitHub

this is the one i used. I arranged some code for my nucleo-g474 but as i said i couldn't even see anything in the terminal.


r/stm32 6d ago

STM32WBA65 TSC

2 Upvotes
I am using the STM32WBA65 TSC with four groups, each equipped with one sampling capacitor. The sampling capacitors are 39nF, and the pad size is 10mm x 10mm. Within the same group, three values ​​differ from each other at 800, 900, and 1000, and there is one channel showing a maximum difference of up to 2000 compared to other groups. Is it normal for there to be such a large difference?

The wiring width of the touch sensor is 0.12mm, and the spacing between wires is approximately 0.3mm.

I would appreciate your help.

r/stm32 7d ago

Openflops STM32F105RBT6 can't flash a firmware

3 Upvotes

So I've built an Openflops board and I bought STM32F105RBT6 from Aliexpress (might be a counterfeit chip) soldering it and all components, all pins checked and everything seems to be okey but no matter what I do I can't flash it:

tried usb ttl serial method and it just timeouts as if nothing is detected (BOOT0 connected to 3.3v obviously)

tried via st-link and still chip is not detected as if it is dead.

I don't have much experience with stm32 so consider me a noob

checked pins and all the necessary ones receive voltage but nothing seems to work

There doesn't seem to be any soldering issue so the only thing I have left to assume is that chip is fake or I am doing something wrong


r/stm32 8d ago

Is internal SRAM mirrored across the SRAM region?

2 Upvotes

For a STM32F3 with 64 KiB of SRAM, will accessing addresses 0x2001FFFC, 0x2002FFFC, 0x2003FFFC, etc., access the SRAM at 0x2000FFFC, or will a fault be generated?

That is to say, will these two pieces of code have the same result, with version 1 being 1 cycle faster than version 2? Or will version 1 generate a fault?

_UserIRQHandler1:
  MOV.W R12,#0x20400000
  LDR.W PC,[R12,#-0x04]  // jump to the pointer @ 0x2000FFFC (0x203FFFFC)?

_UserIRQHandler2:
  MOVW R12,#:lower16:0x20010000
  MOVT R12,#:upper16:0x20010000
  LDR.W PC,[R12,#-0x04]  // jump to the pointer @ 0x2000FFFC

r/stm32 7d ago

Should I document my STM32 learning journey on LinkedIn?

0 Upvotes

I recently bought an STM32 Nucleo-F446RE and I’m starting to seriously learn embedded systems/firmware.

I’ve noticed that UI/UX designers and some software developers often share their learning process through well-designed LinkedIn posts — almost like mini case studies. I was wondering if something similar would work for embedded/firmware engineering.

I’m thinking of documenting my journey from the very beginning rather than only posting when I have an impressive project.

For example:

- What is an MCU and how does STM32 work?

- Getting started with STM32CubeIDE

- GPIO and register-level programming

- Understanding the STM32 clock system

- Timers, interrupts, PWM

- UART, SPI, I2C

- Debugging and reading registers

- Small experiments and what I learned from each one

- Eventually building more complete embedded projects

I could make each post visually clean — showing the circuit/setup, code snippets, block diagrams, oscilloscope/logic-analyzer output when available, and a short explanation of what I learned.

My goal isn't to pretend to be an expert, but to build a public portfolio that shows my progression toward becoming an embedded/firmware engineer.

For people working in embedded systems:

Is this a good strategy?

What kind of STM32/embedded content would actually be worth posting on LinkedIn?

And if you were starting from zero again, what would you post first and how would you structure the journey as you progressed?

Any advice on what recruiters or experienced engineers actually find useful would be really appreciated.


r/stm32 9d ago

Ok, how is an stm oscilloscope for a hobby project ?

16 Upvotes

I realised im doing nothing but waste all my free time by scrolling or something stupid. so i have decided to learn stm32 properly. for that, i want to build an oscilloscope, which can measure atleast till 1MHz ? 100kHz ? (idk whats possible with 2msps) with a g474 nucleo. wht all should i look into ? good resources ?

how do go about programming it in linux, from cli and vim ?

is python with matplotlib good enough for gui or should i go with c ?


r/stm32 9d ago

Streamline CAN Bus (part 2) | STM32 Tutorial #99

Thumbnail
youtube.com
3 Upvotes

r/stm32 9d ago

made a traffic control system 😛

Thumbnail github.com
1 Upvotes

r/stm32 10d ago

Senior citizen kinda lost and don’t know which STM chip to use for starters

2 Upvotes

I'm an old dude who used to be an electronics engineer 35 years ago. I only know about analog electronics, but now I decided to finally figure out microcontrollers. I have plenty of time for this task. Well at least until I'm alive. In order to learn things I came up with a task for myself. An electronic device project. I always learn stuff this way.

But I'm kinda lost because of huge range of options.

So here it is. I am a moonshiner (and an alcoholic of course) so I couldn't think of anything better than to make a thermal controller for my distillation setup. So I am asking this community for help - please tell me where to start?

So I think about project of a device that must compare the temperature from two digital temperature sensors and based on their readings clicks 8 relays states open/closed. In addition, it must have LCD with temperature readings and some kind of settings menu to well... set some settings via 4-5 buttons for temperature threshold values which will trigger relays closed or opened. All of this must be recorded in some memory and stored there even after a power outage. I don't need networking features or anything else. That kind of device. Sounds simple but like everything in the world I know it's not.

Here are specific questions:

- There are lots of MCUs. And I don't know which one is suitable for this task? Or how to choose one which will be OK for such device.

- Is there any methodology or even a tool to help choosing particular chip based on typical applications?

Thanks everybody!

Upd #1: In the r/embedded Everybody suggests me ESP32 kits. Thank you all! I've checked them. It seems they all almost complete devices with their own pcbs and stuff. But I can and want to go old school hard mode - pick a chip, trace my own pcb and so on.

Upd #2: I've decided to go with STM32 but... I've been buried in ST documentation and completely lost it. So many chips... Can I really use STM32C0 for my project with graphic menu screen, power independed storage or not? Will it be enough? Or should I go with STM32U575/585? Or STM32H503? Damn... I don't even understand how to choose MCU for my task and keep it cost effective.


r/stm32 11d ago

Arduino IDE refuses to let me upload to my stm32 bluepill

Thumbnail
gallery
1 Upvotes

I have the programmer set to Winusb using zadig but it still won’t upload. Any ideas?


r/stm32 11d ago

TMC2209 driver for STM32 — looking for feedback

Thumbnail
2 Upvotes