Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
Hello Community, I am working on an STM32N657X0H3Q project and have successfully configured both USBX and X-CUBE-FREERTOS (v1.4.0) within the same Application runtime context using CubeMX. My goal is to implement a USB CDC Composite device. Since USBX traditionally relies on Azure RTOS (ThreadX) for its RTOS primitives, I am seeking the recommended best practice for running USBX on a FreeRTOS-based system. Should I configure USBX in standalone mode? If running USBX in Standalone mode, what is the best way to handle thread safety when accessing the USB CDC interface from multiple FreeRTOS tasks? Are there any known issues using the USBX Composite Builder when the underlying kernel is FreeRTOS instead of ThreadX?
Subject: STM32H503 – ADC trigger shifting from OFF midpoint at duty > 50% in center-aligned complementary PWMHi all,I am working on a DC-DC converter using the STM32H503RBT6. I have configured TIM1 to generate:Two complementary PWM pairs180° phase shift between the two PWM channelsCenter-aligned mode 1Additionally, I am generating:Two ADC trigger events (using TRGO/TRGO2)These triggers are also intended to be 180° phase-shiftedTrigger frequency is the same as the PWM frequency:direct_hit: RequirementFor both PWM phases, the ADC trigger should occur:At the midpoint of the OFF time of the high-side (top) switchThis is required for accurate current sensing.:gear: Current ImplementationTimer: TIM1 in center-aligned modeComplementary PWM enabledInterleaving achieved using PWM mode 1 and PWM mode 2Two trigger sources:One near CNT = 0One near CNT = ARRADC is triggered using TIM1 TRGO and TRGO2:exclamation_mark: ProblemFor duty cycle up to 50%, both triggers correctly occur at the midpoint
Hi, I am working on STM32MP257F-EV1 Evaluation Board. I want to use shared memory (like DDR) between M33 and A35 cores. M33 should write data samples collected form peripherals in shared memory array and A35 should read this memory array to process it further. How to achieve this?
Working on STEVAL-SPIN3201 board and need help in expected low-speed torque performance using Field-Oriented Control (FOC).System Configuration:Motor Driver Board: STEVAL-SPIN3201Motor: 3-phase BLDC (Rated torque=0.25Nm)Position Feedback: Hall sensorsObserved BehaviorDuring testing, I observed that the motor struggles to start at lower commanded speeds when a load is applied.Load: 0.05Nm1000–1500 rpm: Motor struggles to start.2000 rpm: Motor starts reliably.Load: 0.1 Nm1000 rpm: Motor does not start.1500–2000 rpm: Motor struggles to start.3000 rpm: Motor starts reliably. Whether this behavior is expected and advise on any key parameters (e.g., startup current, Hall alignment, or rev-up settings) that should be optimized?Is there any startup current limitation in STEVAL-SPIN3201 firmware?FOC should provide high torque at low speeds, including during startup. However, the current behavior suggests that the available starting tor
Hello,I am currently developing a presence detection system using the STHS34PF80 sensor. My goal is to detect a person at a distance of approximately 2.5 meters.I am experiencing an issue regarding stationary subjects. While the sensor successfully detects a person entering the Field of View (FoV) at 2.5m, the TPRESENCE signal (read from TPRESENCE_L and TPRESENCE_H) gradually decreases over time if the person remains completely still. Eventually, the value falls below the threshold, and the sensor no longer reports "Presence."Please refer to the attached graph below.
Hi, You know, there are some strict requirements about MCU used in optical module or production, which include1. Size and package2. Internal resource3. IO amount, especially ADC and DAC with >= 12bit resolution which be used to monitor signal and control4. Power efficiencyCould you please recommend latest ST MCU which are used widely in ultra high-speed optical module such as OSFP and NPO? or, share me roadmap about ST MCU series used in optical production? Thanks in advance!Best regards!Jason
I have this Riverdi board with a STM32H757XIH6 microcontroller. I have been using it consistently and loading touchgfx programs on it. Today I was trying to use the 40 pin header and program one of the gpio pins on it to act as a gpio output. I put an led on a ground and the PA4 pin, which was the pin I was using on the 40 pin header, to verify the toggling code was working. Nothing happened and so I tried to load a basic program onto the board using stmcubeMX and selecting the STM32H757XIH6 microcontroller. I selected the PA4 pin on the .ioc file and generated the code. However, when trying to run the program I get this error, . Not sure if it was that program or touching the multi meter to certain pins that cause a hard fault or something. I would not think a multi meter could do anything like that, but I'm trying to figure out why all of a sudden I am unable to upload a program to the board when I have been consistently. 
Software Versions: - STM32CubeMX: 6.15.0 - MCU: STM32G474QET6 - Firmware Package: STM32G4xx HAL Library V1.6.1 Bug Description: CubeMX 6.15.0 generates incorrect HRTIM deadtime prescaler macro definitions. These macros do NOT match the register bit definitions described in the STM32G4 reference manual (RM0440). This is a code generation bug in CubeMX, not a HAL library issue. Old Correct Macros (Previous Version): #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL8 (0x00000000U) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL4 (HRTIM_DTR_DTPRSC_0) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL2 (HRTIM_DTR_DTPRSC_1) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV1 (HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV2 (HRTIM_DTR_DTPRSC_2) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV4 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_0) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV8 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV16 (HRT
..
Hi. I have a request. Is it possible to compile STM32CubeProg for arm linux?Right now it is possible to compile firmware for stm32 on arm linux using the stm32duino toolchain from ST.However, the STM32CubeProg is only available on intel linux. This means we can compile firmware on an arm system such as Raspberry Pi 4, but there is no official tool to upload the firmware.Note I'm not asking for the whole STM32Cube IDE - just the STM32CubeProg cli would be sufficient.
Hello, I have managed to use stm32flash to flash custom binary to the STM32 through the raspberry pi.This involves moving BOOT0 to 0V, pressing reset and running the command.I can also include -R to software reset the STM32 after this is finished.I then decided to try using a GPIO from the PI to change BOOT0 from 3.3v to 0V and this also works but I still have to manually press the reset button on the bluepillI have read the following but finding it a little hard to understandGPIO sequence: - entry sequence: GPIO_3=low, GPIO_2=low, GPIO_2=high - exit sequence: GPIO_3=high, GPIO_2=low, GPIO_2=high stm32flash -R -i -3,-2,2:3,-2,2 /dev/ttyS0Are these GPIO pins from the Pi or from the STM32?How do I connect this?I thought about applying 0V to the reset pin on the STM32 but I see a capacitor is used and this is further confusing.The reason I need this is for firmware updates to the STM32 and flashing new sketches through the Pi without the need for user input or manual pressing of the reset
STM32CubeProgrammer has a C++ API which allow to create program compiled using qt creator. Is it possible to compile for linux os and run in rasperry os which is debian based?
We want to use the Sensor TileBox pro to measure temp pressure and acceleration in structures. We have been using some of your boards the MKI versions and they will run at a maximum of 1400 time steps per second when configured for about 2000. I have the tilebox pro exporting on the USB and picking it up with a new C# program. See below. It is reading at 18 cycles per second, I need to adjust the freq output, I thought I had a higher rate. it is really easy to use, but I have the Android Program setting 75 from pressure and temp and 480 for acceleration and getting 18 time steps per second. Is this your board's limitation on exporting via the USB cable. Where am I supposed to post this?
I am using STM32H7R7L8H with MX25L12833F external memory. I created a project with has bootloader, application and external memory loader.Before starting this project I opened another to test if I can read/write/erase MX25L12833F. By using XSPI in Quad mode I could do all the operations. Below I shared the configuration: XSPI1: EXTMEM_LOADER: EXTMEM_MANAGER: With this configuration I built the project and it generated external loader. In STM32CubeProgrammer I can read MX25L12833F memory, it can do mass erase too but it can't do sector erase. I created an application hex which is located at 0x90000000 and tried to write this file to external memory by using generated loader. Here is the result: 00:51:51 : Opening and parsing file: Appli.hex 00:51:51 : Memory Programming ... 00:51:51 : File : Appli.hex 00:51:51 : Size : 8.54 KB 00:51:51 : Address &n
Hi everyone,I am working on a custom PCB designed , but I’ve run into a hardware design constraint and would appreciate some architectural advice on the best way forward.The Setup:Main MCU: STM32L476 (Programming via STM32CubeIDE / HAL)Coprocessor/WiFi: ESP32-WROOM (Intended to handle AWS IoT connections)The Constraint: The PCB designer connected the STM32 and ESP32 exclusively via an I2C bus. There are no physical UART traces connecting the two chips.The Original Goal: The initial plan was to use the STM32 to write firmware directly to the ESP32 over UART, or to use a UART software bridge, and then use UART for passing sensor data to the ESP32 for AWS publishing.The Dilemma: Because the ESP32 ROM bootloader requires UART0 (TX0/RX0) for flashing, I realize a software bridge from the STM32 over I2C to flash the ESP32 is physically impossible.My Questions for the Community:The Initial Flash: Aside from tack-soldering temporary wires to the ESP32's TX0/RX0 pins to perform the initial flas
Hello,I am planning to use STM32H562RGT6 in my product to communicate and update my firmware via CAN FD.To plan that, I am using STM32CubeMX 6.17.0, the datasheet and the AN2606 (Rev 70).And I would like to use only one CAN FD to communicate and to update my firmware in this MCU. But it is impossible to do this in STM32CubeMX. I have only access to FDCAN1. And there are no FDCAN2 on the pins.So, is it a problem in STM32CubeMX ? Or should we use FDCAN1 to do firmware updates via FDCAN for this MCU ?PS: it is the same problem with the MCU STM32H562VGT6 (and maybe other similar MCUs)
Title edited to flag that it's a clone ST-LinkI’m trying to flash an STM32G431CB on a B-G431B-ESC1 ESC board for a reaction wheel-based attitude control system. So there’s three ESCs each. For every one, I soldered 4 wires to the J4 SWD pads (SWDIO, SWCLK, 3V3, GND) and connected them to an ST-LINK V2. Just to clarify on my end, the wire colors don’t really follow any convention, so the red wire isn’t 3V~ I followed the schematic image where the actual pinout left to right is SWDIO, SWCLK, 3V, GND, which matches the correct J4 order. STM32CubeProgrammer is not detecting the chip. The error reads: UR connection mode is defined with the SWrst reset mode; but I am getting a target voltage at 3.25V (power is fine), but SWDIO/SWCLK don’t seem to be communicating. All target fields show dashes.I’ve confirmed that the wiring order matches ST-LINK V2 pinout, tried different connection speeds in CubeProgrammer, change the stlink v2 pinout, even changed my ESC (!) and I have the same i
Is it possible to program a STM32G071 from a raspberry pi running Raspbian OS? Is there a USB to serial driver for this?
I don't see ARM 32/64 bit in the system requirements of STM32CubeProg. Is it possible to get this running on like a raspberry pi 4? I am interested in CLI onlyor do you have other suggestions on how i could do a flash of stm32 chip (STM32G070CB)
Per the title really - I've just tried to install the Linux version on a raspberry pi running Raspbian / Debian 11.7 'Bullseye' and, well, NOTHING happens.If I click 'SetupSTM32CubeProgrammer-2.16.0.linux' nothing happens at all, if I select "execute in terminal" I get a brief flash of a terminal window, a mystery file of 0 bytes is created (named with a single unicode character and 'P').If I run it from the terminal I get:$ ./SetupSTM32CubeProgrammer-2.16.0.linux-bash: ./SetupSTM32CubeProgrammer-2.16.0.linux: cannot execute binary file: Exec format error Also why is a tool for programming microcontrollers a 286Mb download for which we must give ST our blood type and inside leg measurement just to be allowed to download it? :flushed_face:
I'm trying to use a Soracom SIM to experiment with the ST87M01 on the plan01s. Its not clear how to set the APN using the ST87M01. I tried AT+CGDCONT=1,"IPV4V6","soracom.io", but kept getting an +CME ERROR: 4.Any advice?
I have followed the datasheets and tried to calculate my reference voltage. I am supplying steady 3V on Vref+ pin but I wanted to confirm this because I have some troubles with the ADC precision.So I read the internal voltage both on my card and on a nucelo-C092rc. This is my results: My board:Vref+ = 3.0 * 1659 / 1805 = 2.755Nucelo board:Vref+ = 3.0 * 1665 / 1641 = 3.043However I am quite certain that the nucelo boards are using 3.3 V as reference and my board are using 3 V as reference.So if I swap the 3.0 V from the datasheet into 3.3 V I get the following:My board:Vref+ = 3.3 * 1659 / 1805 = 3.033Nucelo board:Vref+ = 3.3 * 1665 / 1641 = 3.348Which match more my expectations, can someone confirm or deny this typo?I add my adc init function:u16 uiDelay = 0; ADC_CFGR2.CKMODE = 0x0; // Clock mode set to ADCCLK ADC_CCR.PRESC = 0x2; // ADC prescaler set to 48MHz / 4 = 12MHz ADC_CFGR1.RES = 0x0; // Set 12 bit resolution ADC_SMPR = 0x07; // Sampling time set to 1,5 ADC clock cyc
Hi,I would like to use a Raspberry Pi to program the STM32F722RET6 micro controller via the RPI UART. My Problem is, that the Cube Programmer is not made for ARM architecture, so it cant run on the Pi.I cant find a solution for this, apart from emulating a x86 environment on the PI which I would like to avoid.Is there any simpler version of the Programmer which could run on a Raspberry PI?Thank you for your help.
Hi there, I want to flash a HEX file using a Raspberry PI. So I followed the steps described here.But if I run this line:$> ./SetupSTM32CubeProgrammer-2.13.0.linuxI get the message:bash: ./SetupSTM32CubeProgrammer-2.13.0.linux: cannot execute binary file: Exec format errorHas someone an idea why this is not working?Im running Raspbian GNU/Linux 11 (bullseye)
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.