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
Is there any way to correctly specify the baud rate for different UARTs in STM32CubeMX?I am currently using: STM32CubeMX V6.17.0 with STM32Cube_FW_H5_V1.6.0I wanted to set the baud rate to 9600 for LPUART1, UART4, and USART2.However, this isn't working; all three UARTs are outputting the same incorrect baud rate based on the calculated divider.Instead of 9600 baud, transmission occurs at 3075 baud (a factor of 3.12195121951219512195:1 too slow).The external 25 MHz HSE oscillator is used as the clock source (original from the Nucleo Board).PLL2Q is used as the clock source for each of the UARTs.I have already tried the following:Updating STM32CubeMX, Updating STM32Cube_FW_H5, Changing the UART clock from 250 MHz to 25 MHz and 5 MHz, Changing the baud rate from 9600 to 19200.When I initialize the UARTs at 19200, they all transmit at 6150 baud.The project was previously built using MX V6.16 and STM32Cube_FW_H5_V1.5.0/V1.5.1, but the problem persisted.Does anyone know how to correctly set
Hello guys,recently in my lab a new batch of STM32F401RET6U MCUs on Nucleo-64 boards is arrived (MB1136-F401RE-C04 SN K252502xxx). After I set these in the same hardware way of my old ones (i switch UART2 PINs PA2 (TX) and PA3 (RX) from the ST-LINK to the ST Morpho connectors desoldering SB13 and SB14 and soldering a 0Ohm on SB62 and SB63), and uploading a version of my firmware which today is still working properly on my old boards (MB1136-F401RE-C04 SN A204505xxx), it doesn’t run correctly for the new ones. The main problem i notice in debug mode is that UART1 and UART2 sometimes work correctly and sometimes not (confirming also my hardware modifications when the lines are ok), while SPI2 which I use to communicate with the ethernet chip W5500 on my carrier board never works (even drastically lowering its frequency, and with the old boards it works at 21MHz), I2C1 line always seems to work properly. Being more precise, in order to mount all Nucleo-64 boards on my carrier board I’m f
Hi all, I've a question.I created a new project and there I linked externally some user made modules with the command Import (Right click kn project name, then choose import, add the wanted modules and linked them into the project).I try to compile and everything was ok.Now my question: I need to exclude some files from compiling process, both in debug and release mode. I was able to exclude them by the command "Resource Configuration" but when I delete and import again the modules, and link them again to the project, I see that the compiling filters has been restored to default values meanwhile I need to keep the filters on everytime. There is a way to achieve this?
hi~! I made a IOT prototype with STM32U031K8T6, but I can't download firmware. The connection isn't working ad it should, can anyone tell me the issues with the attacked circuit ?? I've tried both j-link and st-link download tools. please reply from users who have used STM32U031.
I have an external loader with a starting address of 0xA0000000. I can perform read and write operations with this loader using CubeProgrammer. However, when I define the external loader via CubeIDE, it programs the address 0x080000000. Here is my flash.ld The external loader starts working when I start it with the external loader address 0x00000000, but I want to start with 0xA0000000. How can I fix it ?
Hello,I know there are already other threads on this topic, but none of the replies have convinced me.Perhaps someone can help me.My real problem is with the pedometer in the LSM6DSO.I am setting the following values in the registers:ODR = 52 HzLOW_POWER_MODEPEDO_CMD_REG -----> FP_REJECTION_EN = 1EMB_FUNC_EN_A -----> PEDO_EN = 1EMB_FUNC_EN_B -----> PEDO_ADV_EN = 1PEDO_DEB_STEPS_CONF = 0x0A (default value)PEDO_SC_DELTAT_H = 0 (default value)PEDO_SC_DELTAT_L = 0 (default value)I am not using the interrupt for the pedometer, I am polling the value in the register STEP_COUNTER_H | STEP_COUNTER_LSetting AD_DET_EN = 1 in PEDO_CMD_REG didn't make any difference for me.I have 2 question about the pedometer:1 - Do I need to configure anything else to improve the performance of the pedomter ? Is possible to improve it ?2 - What is the STEP_DET_INIT bit in the EMB_FUNC_INIT_A register used for? Should I use it at any point?Thanks,Adrian
We are currently working with the LIS2HH12TR accelerometer on our Smarttrak board, using an STM32U575VIT6Q as the main MCU, and are facing an issue with unstable sensor readings.Communication appears to be functioning correctly, we verified the I2C clock waveform and confirmed that the bus is operating at 100 kHz. The accelerometer responds properly, and we are able to read data successfully. However, the measured values are not stable.For example, the calculated angle values normally stay around 20–30 degrees, but occasionally they suddenly jump to 70–80 degrees without any actual movement. These abrupt spikes are causing instability in our application and affecting overall board operation.An additional challenge is that this behavior appears randomly and in 1 out of 5 devices, making it difficult for us to trace the exact source of the issue.We would appreciate any guidance on possible causes and recommended debugging steps. Specifically, we would like to understand:What could c
Hello everyone,I am currently working with an STM32G4 series MCU using multiple FDCAN peripherals and would like to hear about other developers' experiences regarding CAN communication reliability and synchronization.In projects where both FDCAN1 and FDCAN2 are active, have you encountered any challenges related to:Clock configuration and synchronization Bit timing calculations Bus load handling Message filtering across multiple instances Error recovery and bus-off situationsI'm particularly interested in best practices for configuring multiple FDCAN instances to ensure stable communication in automotive and industrial applications.Any recommendations, examples, or lessons learned from real-world deployments would be greatly appreciated.Thank you in advance for sharing your experience
Dear ST,Now as you mentioned in VL53L7CX_ULD the Firmware is uploaded through the I2C protocol to the VL53L7CX every initialization in (Hex form) from the Buffers.h file as also it includes the default configurations for the VL53L7CX While I'm testing it in the Autonomous Mode with parameters integration time = 2ms, ranging freq. = 4Hz and 4X4 Resolution, making also the host board (NUCLEO-F401RE) in sleep mode which means that, there is no communication data on the I2C Bus.I found the current peak as illustrated in the screenshot attached, the first peak represents the integration time which is typically 2ms as configuration.Now I need a detailed explanation about the wave regions illustrated after the first peak and how can I minimize or eliminate them.As also I need to know how to update this firmware and if it has a datasheet or source code.Thank you
Hello ST community,I’m an embedded software beginner working with the STM32MP257-DK board and OpenSTLinux (Yocto). I need help getting USART6 working on the external GPIO connector (PF13 = TX, PF14 = RX — CN5 pins). I have rebuilt device trees and copied DTBs to the board, but the USART6 device never appears in the running system (/dev/ttySTM6), and at one point my Ethernet/SSH stopped working after applying a DTB change.I will be blunt: I have spent many hours following suggestions, debugging, and fixing syntax errors in DTS files. I may be missing one critical detail about how ST maps peripherals on the DK board or about kernel bindings. I have documented exactly what I tried and the exact outputs — please read fully before replying. I am a beginner; please do not assume I know advanced DT or U-Boot internals.Environment / versionsBoard: STMicroelectronics STM32MP257F-DK (discovery/“DK” board)Host SDK: SDK-x86_64-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11Kernel source / s
hi team,I'm facing issue in enabling usart6 of the expansion connector of stm32mp257f-ev1, All i did was to enable the &usart6 via DT overlay, even tried disabling dmas, but no luck.I have attached the kernel log and also attached the RIFSC debug log FYRHoping for a quick reply, thanks in advance./dts-v1/; /plugin/; / { compatible = "st,stm32mp257f-ev1"; fragment@0 { target = <&usart6>; __overlay__ { status = "okay"; }; }; };$ stty -F /dev/ttySTM1 115200 E/TC:0 stm32_serc_handle_ilac:133 SERC exceptions [63:32]: 0x10 E/TC:0 stm32_serc_handle_ilac:139 SERC exception ID: 36 [ 39.106314] SError Interrupt on CPU0, code 0x00000000bf000002 -- SError [ 39.106336] CPU: 0 PID: 1618 Comm: stty Tainted: G O 6.6.78 #1 [ 39.106344] Hardware name: STMicroelectronics STM32MP257F-EV1 Evaluation Board (DT) [ 39.106348] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 39.106357] pc : stm32_usart_rx_dma_start_or_resume+0x80/0x234 [ 39.106375] lr : stm32_usart
Hello,I've been working with the new VS Code extensions for several weeks, and debugging feels quite unstable. I'm using a j-Link Plus. At random times, I suddenly can't debug anymore, everything seems to freeze, and in the Debug Console I see something like this:The number (6760 here) increases by hundreds per second and will never stop. Every time such a random debug freeze happens, I see this last line with the counting number box, always reading 4 bytes somewhere (different addresses), as if some read action hangs in an endless loop. Only way to get it working again is by closing the whole debug session and starting anew.Sometimes I can debug for an hour without this issue, sometimes I get this every few minutes. It's not related to some code position, happens in different debug configurations (flash / attach to running), happens in different projects, with different (or no) watched variables, on different PCBs, with different cables to the debug probe, with different clang op
Hello everyone,I am trying to built a communication through SPI between two stm32g474 mircontrollers in two seperate projects. One should act as a Master and the other as slave. The Master succesfully reads ADC values out and sends it. But unfortunately, the Slave does not Receive it. Here is my Code for Master:/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2026 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes -----------
I am working with an STM32G474 and trying to enable ITM/SWV trace using STM32CubeIDE and ST-LINK.ConfigurationMCU: STM32G474 STM32CubeMX Debug Mode: Trace Asynchronous SW (SYS → Debug) Default HAL initialization generated by CubeMXi have atteched the .ioc file .IssueAfter changing the debug configuration from Serial Wire to Trace Asynchronous SW, the application gets stuck inside:HAL_Delay(500);The program never returns from HAL_Delay().ObservationsSysTick_Handler() is present and contains:void SysTick_Handler(void){ HAL_IncTick();}However, when debugging, it appears that the HAL tick is not progressing, causing HAL_Delay() to wait indefinitely.I found several discussions mentioning:Moving the HAL time base from SysTick to TIM6/TIM7 Checking the TIM6 interrupt priority Ensuring the correct HAL_InitTick() implementation is usedQuestionsIs there any known issue or required configuration when enabling Trace Asynchronous SW (ITM/SWV) on STM32G474? Can enabling SWV trace affect the HAL t
@ ST engineers: This is a feature request for the firmware of the STLINK-V3MINIE and related debuggers/programmers: pipelined data transfers over the existing USB High-Speed link.In my pursuit to greatly improve the STLINK-V3MINIE's performance for large continuous reads from MCU memory, I discovered there is huge room for improvement: SWD's full potential (~2038 KB/s = 24M [cycles/s] * 4 [bytes/transfer] / (46 [cycles/transfer])) is not yet used at all. (Note that USB shouldn't be the bottleneck, judging from the maximum clock speed the STLINK-V3MINIE's STM32F723's USB IP can support.) I only achieve ~549 KB/s when using an STM32H7S3 MCU with ST's programming SW (v2.20.0) using STLINK-V3MINIE (FW V3J17M10):STM32_Programmer_CLI --connect port=SWD freq=24000 ap=1 mode=HOTPLUG -halt --read 0x24000000 0x60000 /tmp/dmp.binA simplified sequence diagram of the communication used here is shown:Read memory region; current situationI measured the SWD clock line with an oscilloscope to verify 24
I am using MEMS Studio (v2.3.1) with ST1VAFE3BX to train an MLC model using AFS (Automatic Filter & Feature Selection).My input data contains:- 3-axis accelerometer: A_X [mg], A_Y [mg], A_Z [mg]- vAFE channel: vAFE [LSB]The CSV header follows the format described in AN6208:A_X [mg], A_Y [mg], A_Z [mg], vAFE [LSB]However, when running AFS, I get the following error:"External sensor unit mismatch between provided external sensor name magnetometer and units LSB.Correct units are gauss or mgauss."This is confusing because:- No magnetometer data is used- Input type is set to accelerometer + vAFE- vAFE [LSB] is consistent with ST documentationI have already tested the following:1. Verified CSV format (no missing values, consistent headers across all files)2. Tested minimal dataset (only 2 CSV files)3. Tried different headers:- vAFE [LSB]- vAFE_X [LSB]- tab-separated format4. Tested accelerometer-only input (works)5. Tested vAFE-only input (fails)6. Cleared workspace and settings7. Did no
Hello, I am currently using the IIS2MDC in my design with the following configuration: As you can see, I am not using the INT/DRDY pin, so it is left unconnected. However, in idle mode, I am measuring an abnormal current consumption of around 400 µA. I noticed that this extra consumption disappears completely when the INT/DRDY pin is tied to GND via a pull-down resistor.The datasheet states that this pin is configured as a High-Z output by default. I do not understand how this floating setup could cause such a high leakage current. Furthermore, I could not find any specific hardware design recommendations in the datasheet regarding how to handle this pin when unused.I'd really appreciate it if someone could help me understand this behavior. What would be your recommended hardware setup when the INT/DRDY pin isn't used?Thank you in advance for your support.Best regards,
A minimal example of wake-on-motion detection and inertial data logging based on the LIS2DW12 3-axis accelerometer using the STM32WB5MMG as MCU host and Thomas Roell's excellent STM32WB Arduino core.
I test the LSM6DSOW I3C IBI interrupt, I set the accelerometer FIFO mode, and FIFO full, the interrupt is triggered, and I got payload from LSM6DSOW. What does this mean?i:0,read value:0x1i:1,read value:0x20i:2,read value:0x5i:3,read value:0x0i:4,read value:0x0i:5,read value:0x0i:6,read value:0x0i:7,read value:0x0i:8,read value:0x0
There doesn't seem to be any (easy) way to get a full list of all the different "Sensor Box" variants?In particular, is there one which has at least IP65 protection?
Hello, I am using the RTC wakeup from the power standby example provided in the STM32C5 repository. The example starts the RTC wake-up timer and places the device in standby mode. The device does go to standby, and it does wake up due to the RTC wakeup interrupt; however, the RTC initialization fails after wakeup. It is worth mentioning that the only way I can get rid of this error is to power cycle the board.The failure happens in HAL_RTC_WAKEUP_SetConfig due to RTC_WaitSyncrhroWUTW() returning an error due to RTC_CR_WUTE being set.static hal_status_t RTC_WaitSynchro_WUTW(void) { uint32_t tickstart; if (LL_RTC_IsActiveFlag_INIT() == 0U) { if (LL_RTC_WAKEUP_IsEnabled() == 1U) { return HAL_ERROR; // Code returns this error } tickstart = HAL_GetTick(); while (LL_RTC_IsActiveFlag_WUTW() == 0U) { if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) { if (LL_RTC_IsActiveFlag_WUTW() == 0U) { return HAL_ERROR; } } } } return HAL_OK; }To make the examp
Hello, I am trying to make the lpuart1+dma_linked_list transferring data in stop1 mode.My setup is like this: SPI1 + GPDMA: // SPI clocked from HSI Start transfer Enter STOP SCK continues toggling DMA continues Transfer completes DMA irq wakes from stopLPUART1 + GPDMA: // LPUART clocked from LSE Start transfer Enter STOP TX line freezes DMA stops progressing Exit STOP TX resumes Both peripherals are using dma in linked list mode in a similar manner.My understanding is that since both peripherals are “autonomous” they should work in a similar way. I have no problem with the SPI1 working during stop1 mode but the LPUART seems to behave differently.This is my LPUART1 init code: void bsp_lpuart_init(void){ bsp_lpuart1_reset_hard(); LL_LPUART_SetPrescaler(LPUART1, LL_LPUART_PRESCALER_DIV1); // Disable before configuration LL_LPUART_Disable(LPUART1); while (LL_LPUART_IsEnabled(LPUART1)); LPUART1->BRR = 3495; //419430 LL_LPUAR
Dear community, I have reviewed the following sections in the reference manual:86.5.1 Censorship86.5.2 Debug Interface AccessThese sections describe the mechanisms for disabling the debug port.After organizing and analyzing the relevant content, my current understanding is as follows: We first generate a hex file to configure the device lifecycle to the In-Field stage. In this state, the debug port will be disabled when the Lock3[DBL] bit is in the locked state.However, I have noticed the following warning in the documentation. Could you please provide the standard operating procedures (SOPs) for both enabling and disabling the debug port?It would be greatly appreciated if reference code or timing diagrams could be attached. Thank you in advance for your support.Best regards
For STM VB1940 what is the minimum exposure/integration time that can be set in global shutter mode.
Hello,I am using MEMS Studio (latest version) with the LSM6DSV320X to configure the Machine Learning Core with 2 decision trees.Steps I follow:Open MLC tool, set workspace via BrowseImport mlc_settings.json — data patterns load correctlyARFF Generation tab — add features, click Generate ARFF File — generates features.arff successfullyDecision Tree Generation tab — set 2 trees, assign labels to each treeClick Generate Decision TreeError:Unable to open features_DT0.arffI notice two problems happening:MEMS Studio generates features.arff but then looks for features_DT0.arff when generating 2 trees. With 1 tree it works fine.When the error occurs, the file features_DT0.arff (which I manually copied/created) gets deleted from the workspace folder.After the error, mlc_settings.json gets reset — the dectrees[].filename fields are cleared back to empty strings, and sensor settings revert to defaults.What works:1 decision tree generates successfully every timeWhat fails:2 decision trees — always
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.