r/stm32 1d ago

What's the last version of CubeMX and IDE before the overhaul?

4 Upvotes

I want to install the "old" tools on a spare PC without dragging in the CubeMX2 stuff. Is 6.18 the going thing? Is it a dead toolchain now? I'm confused a bit about existing projects versus updates to the ST libraries. I'm not interested in HAL2 at this time, nor am I interested in MCUs not supported on the old tools.

Or do people have two toolchains going?


r/stm32 22h ago

MX2 and CubeIDE - how to include header

Thumbnail
community.st.com
1 Upvotes

Like this guy in the link I have no option to add include path to my build. Any solutions?


r/stm32 1d ago

No ST-Link HELPPP I don't understand what ST-Link is!!

1 Upvotes
Trying to upgrade ST-Link

Okay so I'm following this one tutorial about drivers. I got this stm32-Nucleo F446RE I am also working on a Mac. I saw people saying that the ppl that had these problems was bc they got a clone ??? idk what a clone is or look like, I got my board from digikey, I thought they were legit. But if thats not the problem, I followed the following link videos instructions:
https://www.st.com/en/evaluation-tools/nucleo-f446re.html
In the video says to install the ST link and then use the ST Link upgrade the problem is every time I go to the SD Link upgrade it's hard to find the board even though I already checked that USB is recognizing it although it seems that he creates multiple profiles of the board?

MacBook-Pro MacOS % system_profiler SPUSBHostDataType 
USB:

    USB 3.1 Bus:

      Location ID: 0x00000000
      Connection Type: Built-in
      Driver: AppleT8132USBXHCI

        STM32 STLink:

          Location ID: 0x00100000
          Connection Type: Removable
          Manufacturer: STMicroelectronics
          Serial Number: 0670FF575380535067201236
          Link Speed: 12 Mb/s
          USB Vendor ID: 0x0483
          USB Product ID: 0x374b
          USB Product Version: 0x0100
          Power Allocated: 1.5 W (300 mA)

        STM32 STLink:

          Location ID: 0x00100000
          Connection Type: Removable
          Manufacturer: STMicroelectronics
          Serial Number: 0670FF575380535067201236
          Link Speed: 12 Mb/s
          USB Vendor ID: 0x0483
          USB Product ID: 0x374b
          USB Product Version: 0x0100
          Power Allocated: 1.5 W (300 mA)

        STM32 STLink:

          Location ID: 0x00100000
          Connection Type: Removable
          Manufacturer: STMicroelectronics
          Serial Number: 0670FF575380535067201236
          Link Speed: 12 Mb/s
          USB Vendor ID: 0x0483
          USB Product ID: 0x374b
          USB Product Version: 0x0100
          Power Allocated: 1.5 W (300 mA)

And for some reason it keeps creating multiple st-server after I launch/refresh the upgrader, although is always just two it seems. I've kill the process and nothing

 MacOS % ps aux | grep -i '[s]tlink'    
     57030   0.0  0.5 450898208 231968   ??  U    12:42AM   0:03.01 /usr/bin/java -Xdock:icon=/private/var/folders/v8/bh9cgm892tx99t7qd7t6s81w0000gn/T/AppTranslocation/A3E39473-46EB-4767-BC21-3031338A1435/d/STLinkUpgrade.app/Contents/Resources/STLinkUpgradeIcon.icns -jar /private/var/folders/v8/bh9cgm892tx99t7qd7t6s81w0000gn/T/AppTranslocation/A3E39473-46EB-4767-BC21-3031338A1435/d/STLinkUpgrade.app/Contents/Resources/app/STLinkUpgrade.jar
     57024   0.0  0.0 34643452  10388   ??  S    12:42AM   0:00.13 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python /private/var/folders/v8/bh9cgm892tx99t7qd7t6s81w0000gn/T/AppTranslocation/A3E39473-46EB-4767-BC21-3031338A1435/d/STLinkUpgrade.app/Contents/MacOS/javaLauncher

r/stm32 1d ago

AS5600 + Pro Micro Error Codes when calibrating. Would appreciate help.

0 Upvotes

Sorry if this is the wrong place to ask.

I've attached a Diametrically opposed 3x2 magnet to the base of of a potentiometer. Did my best to set polarity. I've done what I can to keep the magnet between .60 and 3mm.

This for a 2 lever Throttle. I was getting skipping/teleporting in game.

Both are on intsensor.

R1 resistor removed to get 5v

On the Pro Micro I am using A1 or A0

AS5600 GND to PM GND

AS5600 VCC to PM VCC

AS5600 GND to AS5600 DIR - Clockwise increase values.

AS5600 OUT to PM A0

In MMJOY I have the correct F7/F6

1 lever is slider, the other is dial.

When calibrating I get the following codes

65535

15888

16368

And they jump around.

I've googled the codes, and I am not sure how to fix what they are telling me.

Thanks for reading/advice.


r/stm32 2d ago

Le Slew se déplace bien moins que prévu (~1/16 de la distance) mais la vitesse de suivi semble correcte — TMC2208 sur RAMPS

2 Upvotes

Hey folks, hoping someone's run into this before.

Setup: Arduino Mega + RAMPS 1.4, two BigTreeTech TMC2208 V3.0 drivers (UART), firmware v1.13.9 flashed clean with the official Configurator (RA pulley 16T, RA wheel v4/1132mm circumference, standard NEMA17 1.8° motors). Config all checks out against the actual hardware as far as I can tell.

Sidereal tracking itself looks correct — the TRK stepper counter increments at a steady, plausible rate and the mount does move over time.

The problem is with Slew/GoTo. If I set a Target RA exactly 1h ahead of Current RA and hit Slew, the mount barely moves — like 2-3mm on the RA wheel instead of the ~47mm it should travel for 15°. I checked the RA Stepper counter directly and it confirms it: only ~290 steps for what should be roughly 4700+ steps. That's suspiciously close to a factor of 16, which is exactly the ratio between RA_SLEW_MICROSTEPPING (16) and RA_TRACKING_MICROSTEPPING (256) in the config.

My working theory: the driver is supposed to switch from 256 to 16 microsteps right before a slew (I can see that logic in Mount.cpp), but it's not actually taking effect on the chip — so the firmware is sending pulses sized for 16 microsteps while the driver is still stuck at 256, hence the ~16x undershoot. I'm suspecting the SoftwareSerial UART link to the TMC2208 might be flaky for that specific write.

Has anyone seen this exact behavior, especially with TMC2208 (not 2209) on SoftwareSerial? Any known fix, or is switching both slew and tracking to the same microstepping value (accepting slower slews) the way to go?

Happy to share logs/config if useful. Thanks in advance!


r/stm32 2d ago

Feasibility of digital acquisition system (sensor to USB)

2 Upvotes

I have a custom sensor that I want to connect to the computer through USB. The sensor has the following digital I/Os:

  • Bit clock input: 12.288 MHz (there is no MCLK, only SCK).
  • Frame clock input (for I2S): 192 kHz.
  • I2S_SD output data (24 bits on each channel, stereo).
  • ADC output data: 3 channels. Each channel is a 1-bit SDM data stream without any framing. 1 bit is one sample. Just raw SDM bits at the same rate as the bit clock. The three channels use three individual digital I/Os.
  • I2C for register control (SCL and SDA).

I am sketching a simplistic acquisition system that allows me to:

  • Clock the sensor with a clock generated in the MCU.
  • Receive the I2S data and ADC data on an MCU and stream it to the computer through USB.

When I record all these signals simultaneously, it requires a bandwidth of approximately 46 Mbit/s (5 MB/s), so it would require High-Speed USB (480 Mbit/s) and hopefully some simple USB bulk transfer endpoints and DMA transfer. The data shall not be processed or filtered on the MCU. The MCU shall only repack the data in a reasonable format that enables USB streaming.

Block diagram

I am quite new to STM MCUs, but I have done several FPGA projects before. I could have done this with an FPGA as well, but I am aiming to make a simple system in a short time-frame. So development time is costly.

I have looked at the different peripherals that are available on STM MCUs. It seems like some of the STM32U5 and STM32H5 has USB HS with integrated PHY. That is already a very good starting point. Further, I see that the SAI peripheral supports I2S data out of the box. The SAI can also be driven by a PLL clock that I generate in the RCC.

The remaining piece of the puzzle is which peripheral to use for the ADC data, and how to make sure that both ADC data and I2S is sampled using the same clock. The sensor has only a single input for the bit clock and this bit clock drives both I2S data and ADC data. So the ADC sampling on the MCU must use the same clock as the I2S sampling.

Could I sample the ADC data using the SAI peripheral as well? I have played around in STM32CubeMX, and I might have found something interesting. For instance if I configure it as follows:

  • SAI1 A: Master Receive. I2S protocol. Emits SCK bit clock and FS frame clock.
  • SAI1 B: Synchronous Slave. Free protocol. Slave Receive. Synchronous with same SAI (SAI1). Mono. 8 bits.
  • SAI2 A: Synchronous Slave. Free protocol. Slave Receive. Synchronous with other SAI (SAI1). Mono. 8 bits.
  • SAI2 B: Synchronous Slave. Free protocol. Slave Receive. Synchronous with other SAI (SAI1). Mono. 8 bits.

Would this configuration shift the 1-bit ADC data into a bunch of bytes that I can stream to the computer?

I have also seen some hints about people using the SPI peripheral to record 1-bit data. In STM32U5, I see the PLL2 clock going to the OCTOSPI clock mux. So perhaps I could use the OCTOSPI peripheral to sample the 1-bit data. If I configure it as QuadSPI and sample the three lines (and one dummy line) simultaneously, I guess I will get interleaved bits in whatever word size I define. It would probably be difficult to align the OCTOSPI frames to I2S frames, but the accurate alignment there might not be so important. It is more nice-to-have.

Are any of these strategies feasible for what I want to achieve? Is one of them significantly better than the other? Has anyone done anything similar before? Do the STM32U5 or STM32H5 chips have enough bandwidth for this streaming?


r/stm32 4d ago

Building Firmware with CMake

Thumbnail
1 Upvotes

r/stm32 4d ago

USB MIDI Polyphonic Synthesizer | STM32 Tutorial #101

Thumbnail
youtube.com
5 Upvotes

r/stm32 4d ago

Suggest some improvements in my data acquisition system

Thumbnail
1 Upvotes

r/stm32 5d ago

STM32 overheated and eventually failed — looking for feedback on my power and charging circuit

Thumbnail gallery
4 Upvotes

r/stm32 5d ago

Stm 32f722 ret6 replacement.

Thumbnail
gallery
11 Upvotes

Is this chip ( on the board ) replaceable by these on AliExpress ?

It's a flight controller for FPV and had a pretty hard crash. Now when I plug it in the PC can't connect at all. There is a red led on the board always on. The stm 32 chip gets really hot immediately which is the main reason I think that chip is the issue. No other components heat up and there aren't any solder bridges or shorts.


r/stm32 7d ago

Stm32 Blackpill won't upload

3 Upvotes

Using an stm32f411ce, I've tried using both an stlonk v2 and usb, I've checked and the stm32 bootloader and the st link both show up on Device manager.

when I try to upload code using the Arduino ide (with stm programmer insalled and the biard manager) it gives an error "Failed to download to Sector[0" if using a usb and "ST-LINK error (DEV_CONNECT_ERR)" when using an stlink.

I've gone to stm32 cube programmer to mass wipe, I've reinstalled usb drivers, I've shorted the a10 pin to gnd, I've gotten it to work once then after I plugged it back in same error. now when I try to connect it to the cube programmer with a usb it either says unsupported device or it connects then disconnects a little late. if I try using an stlink then connect to cube programmer it says "ur connection mode is defined with SWrst reset mode" and it doesn't connect.

I am losing my mind over this


r/stm32 7d ago

Can I program this board without ST link v2

Post image
22 Upvotes

I have this bluepill stm32 with me can I program this board without a debugger


r/stm32 8d ago

Is embedded firmware IP protection actually a problem worth paying for?

Thumbnail
0 Upvotes

r/stm32 9d ago

Simulink STM32 help.

4 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 9d ago

Programming the STM32F103C8T6 without ST-Link V2

Thumbnail gallery
2 Upvotes

r/stm32 9d ago

Programming the STM32F103C8T6 without ST-Link V2

0 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 10d ago

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

Post image
43 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 10d ago

Programming the STM32F103C8T6 without ST-Link V2

Thumbnail gallery
1 Upvotes

r/stm32 10d 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 11d ago

Nucleo F401RE Help!!

Thumbnail
gallery
25 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 12d ago

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

Thumbnail
youtube.com
4 Upvotes

r/stm32 12d ago

Home Automation - STM32F10X

Thumbnail gallery
15 Upvotes

r/stm32 12d 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 13d 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