Get ready for the STM32 Summit 2026 | Online, November 3
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
BOARD: STM32H743IITXACTICLE FOLLOWED: https://community.st.com/t5/stm32-mcus/how-to-implement-a-usb-device-composite-in-stm32h5/ta-p/708078Hello everyone,I was trying to use USB CDC+MSC in composite mode. After following the article mentioned above, i was able to build the project. But after running i was able to only get MSC (as shown in pc) and getting the CDC port with windows error 10.Few things i have changed, in usbd_desc.c updated these lines 0xEF, /* bDeviceClass */ 0x02, /* bDeviceSubClass */ 0x01, /* bDeviceProtocol */ Also i have updated CDC_IN_EP, CDC_OUT_EP, CDC_CMD_EP so it should not match MSC_EPIN_ADDR and MSC_EPOUT_ADDR #ifndef CDC_IN_EP #define CDC_IN_EP 0x82U /* EP1 for data IN */ #endif /* CDC_IN_EP */ #ifndef CDC_OUT_EP #define CDC_OUT_EP 0x02U /* EP1 for data OUT */ #endif /* CDC_OUT_EP */ #ifndef CDC_CMD_EP #define CDC_CMD_EP 0x83U /* EP2 for CDC commands */ #endif /* CDC_CMD_EP */ #ifndef MSC_EPIN_ADDR #define MSC_EP
On the STM32C542RC, this is my current FLASH layout:-- OEMiRoT flash layout:-- Bootloader : 0x08000000 .. +0x10000-- Keys : +0x10000 (0x2000)-- NV counters : +0x12000 (0x2000)-- Primary app slot : 0x8014000 size=0x16000-- App code (post-hdr) : 0x8014400 size=0x15c00-- Secondary app slot : 0x802a000 size=0x16000-- OEMiRoT option bytes to program:-- HDP1_END = 0x9 WRPSGn1 = 0xfe00Everything is working well (update of user application, boot, etc...) (MCUBOOT_USE_HASH_REF is not defined).But I have an issue:I want to use the external User Data Flash at the address FLASH_EXT_USER_BASE 0x08400000UL, requiring the option byte EDATA_EN = 0. When I read from that address in the User Application, I only read zeroes (RAZ) -- simple as `*(const int *)FLASH_EXT_USER_BASE == 0`, so this feels like the cause is some sort of HDP. By the way, the writes do work (at least when the MCU is reset, as STM32CubeProgramm
I was trying to configure ethernet on my android phone via using usb cdc ncm on stm32 nucleo U5A5 and i was unable to see the ethernet option in the network settings of the phone.It was completely greyed out. I tried the same on ios and i was able to connect via ethernet. What am i supposed to do to resolve this ?im using ncm of tiny usb for this connectivity.
When enabling USB_OTG_FS peripheral in Device_Only mode for STM32H743VIT6, CubeMX generates usb_otg.c with incorrect HAL macros:Generated (wrong) Should be (H7-native) GPIO_AF10_OTG1_FS GPIO_AF10_OTG2_FS __HAL_RCC_USB_OTG_FS_CLK_ENABLE __HAL_RCC_USB2_OTG_FS_CLK_ENABLE __HAL_RCC_USB_OTG_FS_CLK_DISABLE __HAL_RCC_USB2_OTG_FS_CLK_DISABLE Root cause: On STM32H7, the FS USB peripheral is USB2_OTG_FS, not USB1_OTG_FS. The H7 HAL defines GPIO_AF10_OTG2_FS for the FS port and GPIO_AF10_OTG1_HS for the HS port. CubeMX, however, generates F4/F7-style macro names (e.g. GPIO_AF10_OTG1_FS) which are only valid for MCUs with a single USB OTG peripheral. Moreover, GPIO_AF10_OTG1_FS is conditionally defined in stm32h7xx_hal_gpio_ex.h only when USB2_OTG_FS is not defined. Since STM32H743 does define USB2_OTG_FS, the macro is absent at compile time. The legacy compatibility aliases in stm32_hal_legacy.h could resolve this, but CubeMX does not include that header in the generated code.No
Hi, I wrote a flash bootloader for STM32G070 using IAR ide.It gets via modbus RTU the command/data to manage the FSM that does the update procedure.Because the master during erasing/programming needs a real time update on overall progression, the .intvec table, the main, the modbus stack and the updaing FSM are all relocated in RAM.With firmware in RAM and a management of FLASH delete/program via IT the firmware can handle modbus during flash programming.The .intvec relocation is done programmtically, copying it from FLASH (0x08000000) to RAM (0x20000000) (0xB8 bytes): I did via explicit firmware because I’m not able to do it via .icfAlso relocated in RAM stm32g0xx_hal_flash*.o via “initialize by copy” in .icf.VTOR set to 0x20000000main entry point and other self-made function as well as modbus stack’s marked as __ramfunc.Great, you say, if everyhing works why this topic? The truth is: to do all above I did a workaround because a problem came when I linked HAL_FLASH_IRQHandler.Wit
Can we flash same hex file in STM32xxxxVJT6 and STM32xxxxVJT3.
Hi, I have been trying to implement the L6983 in my design for about 4 month now and still don’t get the desired output. After checking the Fsw pin, it seems I don’t get any clock output, do you have any idea what would be the cause of this issue ? Here is m design.The 0Ohm strips are only for a backup power supply. The Fsw output is flat on GND at the oscilloscope.The SW output before the inductor is at my supply voltage of 28V with small disconnects resulting in a flat 28V after the inductor.The input is 28V and it should output 5.2VThe switching method should be 500kHz without ditheringVs is delivered by a L6981 power supply + L39200 LDO at 3V3. This issue is present on several iterations of this design even though we made sure to reference the ST eDesign Suite for our choices.
Part Number: STM32F427VIT6Environment: Custom PCB (not an eval/dev board), native SDIO/SDMMC1 peripheral, 4-bit bus, FatFs (ChaN's ff.c) on top of ST's HAL (stm32f4xx_hal_sd.c). STM32CubeIDE 2.2.0, GNU Arm Embedded toolchain 14.3.rel1 (arm-none-eabi-gcc), STM32CubeProgrammer for flashing/SWD debug, bare-metal HAL (no RTOS). SDIO clock tested from 400kHz up to ~24MHz; same result throughout.Schematics / hardware note: This is a custom PCB, so a board-level cause can't be fully excluded, a scope check on the 3.3V rail during a write burst is still pending, and I'm happy to attach the relevant SDMMC1/power schematic on request. That said, a pure PCB signal-integrity/trace defect looks unlikely specifically: DAT0-3 are bidirectional and reads over those same physical traces are 100% reliable, every write's CRC check passes cleanly, the failure is fully deterministic rather than marginal/intermittent, and it's unchanged across the full 400kHz-24MHz clock range tested, none of that fits a ti
I’ve trawled through several CRC-related threads without finding an explanation of this: How to properly set up bit reversal.Normally, I use CRC-16 XMODEM, which uses the 0x1021 polynomial and no bit reversal. This works perfectly fine when I use this code:void xmodemCalcCRC (uint8_t Data, uint16_t *CRCVal){ CRC->POL = 0x1021; // CRC polynomial CRC->INIT = *CRCVal; // Previous CRC result CRC->CR = CRC_CR_POLYSIZE_0; // 16-bit polynomial *(__IO uint8_t*)(&CRC->DR) = Data; // Feed an 8-bit value into the algorithm *CRCVal = CRC->DR; // Read the result}The reason I set the polynomial, the initial value and configuration every time is to accommodate different CRC methods in the same application.Now, in a current project (using an STM32L433 microcontroller) I need to use CRC-16 Kermit as well. According to crccalc.com, Kermit CRC uses bit reversal on input and output. This is where my trouble begins: When bit revers
Dear ST Team,I am following the STM32 wiki guide:https://wiki.st.com/stm32mcu/wiki/Security:How_to_start_with_STM32CubeMX_STiRoT_Boot_path_on_STM32H57While working through the steps, I encountered an issue with STM32CubeMX.The Boot Path and Debug Authentication configuration pages are blank and do not display the expected options shown in the tutorial. Because of this, I am unable to continue.STM32CubeMX Version: 6.18.1 Could you please advise how to resolve this issue?Thank you for your support.Best regardsRJ
I would like to move the project from:C:\ST\STM32Cube_FW_WB_V1.24.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_HeartRateFreeRTOSto:C:\Projects\Myprojectso that I can make modifications at will and not worry about corrupting the original code. At the same time, I want all the libraries, etc. to fall under the same directory as the new code will eventually be submitted to version control.How can I do this?Note: All my other projects under the C:\Projects directory were started with CubeMX and all seem to do as I want.
This is a feature request.In HAL2, we can configure an STM32CubeMX2 project to use User Data pointers (pointers managed only by the application, not the HAL2 library). E.g. setting USE_HAL_UART_USER_DATA to 1 will add the field `const void *p_user_data;` to hal_uart_handle_t.This pointer can be added to other handles: timers, SPI, I2C, FLASH, …I would the pointer to be a pointer-to-mutable, or in other words to remove the “const” from p_user_data. If this is not possible/wanted by ST, please let me know why it was designed like this. I am personally using this pointer to keep track of the amount of successful read/write and errors for UART communication, so it points to a custom-defined structure that is non-const.
In STM32CubeMX2 1.1.1, for the STM32C542RC MCU, enable the IWDG.In “Applicative services”, enable “Start function generation”. In the subfolder “Calculator”, you have the possibility to change the “Time unit”. Set it to “Seconds”. The only change is the unit used in comments, e.g.: /* Start the Independent Watchdog (IWDG) with the following parameters: - Maximum time before watchdog reset : 132 seconds - Minimum time before refresh (window) : 0 seconds - Early Wakeup Interrupt (EWI) time : 0 seconds*/hal_status_t mx_iwdg_start(void){ return HAL_IWDG_Start(&hIWDG, 0UL, 132UL, 0UL);}The arguments given to HAL_IWDG_Start() are not updated by this unit change. So the configuration of the time unit in this window is useless and does not touch any part of actual code. This is a problem and should be fixed.For the unit change to effectively take effect, it is currently done in “Project settings” → “HAL common definitions” → “HAL IWDG” → “Use HAL IWDG time unit”. We can now sel
EnvironmentSTM32CubeProgrammer: 2.23.0 (latest version at the time of writing) The same issue was also present in the previous release and is still reproducible after updating to 2.23.0, which is why I am reporting it now. Platform: macOS Tahoe 26.5.1 Architecture: Apple Silicon (M4 Pro, arm64) System proxy: Enabled Proxy software: Clash Verge Rev (running continuously in the background) TUN mode: Enabled The proxy itself works normally for all other applications.Issue DescriptionI noticed that simply leaving STM32CubeProgrammer running causes the file ~/.STM32CubeProgrammer/Updater_Gui_Log.txt to grow continuously at a very high rate. The file increases by hundreds of megabytes within minutes and can easily reach multiple gigabytes if STM32CubeProgrammer is left open. In my case, I have already experienced the log file completely filling my macOS system disk overnight, which caused abnormal system behavior due to the disk running out of free space.Log OutputThe updater repeatedly writ
I have inherited a legacy H bridge motor control hardware and firmware based on L99H01 (I think L99H02 might be drop in replacement). I’m a firmware developer - not a hardware designer, and I’m new to motor control, so I’m familiarizing myself with the hardware and firmware, and I’m having a “how can this have ever worked” moment.The TS/ACT_OFF pin is not connected (floating). The value 0xC4 is written to REG3 by the firmware.EXT_TS-bit = high (thermal sensor interface), and EXTTH[5:0] is set to 000100b (n=7, m=3) , givingVth = 7* (0.31 + 3*0.03) = 2.8V.Vcc is 3.3V.Apparently this design has functioned correctly for over 10 years, but since we will shortly be spinning a new board and porting the firmware to a new (ST) MCU I’d like to understand if there is a fundamental problem with this design. All of the original hardware and firmware developers are long departed (probably retired 😑).Thanks in advance if for any feedback.
Hi.I'm trying out new STM32N6 Nucleo board. It has cmera interfaces, so I wanted to try some examples with the camera.My usual routine for quickstarting some new STM32 product was to download CubeMX package for it, go to Repository folder -> Projects -> [board] -> Applications or Examples, and run an exaple project. But I didn't find any example neather for Nucleo nor other boards.Where can I find camera examples for NUCLEO-N657 board?Thanks.
In Table 7.4, "Low-power mode wake-up timings on LDO" of the datasheet, there is no mention of the FSTEN setting in the conditions for twu(stop3) (wake-up in SRAM2). When waking up in SRAM2, is the wake-up time typ. 22.5 μs at MSI=24MHz regardless of the FSTEN setting?
I’ve installed the newes STM32CubeProgrammer version on my Apple Silicon Mac. Now when I am running, it directly crashes. Digging a bit deeper via command-line gives: oading PRG Library: /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/Resources/bin/libCubeProgrammer_API.dylib108 external Loader listException in Application start methodjava.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:382) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:321) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method
I have an application that uses internal flash for logging. Unfortunately, after exiting stop3 subsequent writes to flash fail. Here’s my exit code -- the names of the routines should give a general idea. I don’t really have a clue what changed and the reference manual is notably sparse on details about the various stop/standby/shutdown modes SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); __DSB(); __WFI(); __ISB(); CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); PWR->APCR &= ~PWR_APCR_APC; palSetLine(LINE_testpin); chSysLock(); tagPowerRestoreClocksAfterStop3(); tagPowerPostStop3WakeEventI(); chSysUnlock(); // Ensure Flash is awake and not stuck in low-power mode FLASH->ACR &= ~(FLASH_ACR_SLEEP_PD); __DSB();
I am trying to configure the clock for the STM32L496 microcontroller, as shown in the screenshot below.I would like to use MSI in PLL mode with the LSE. When I configure the LSE in CubeMX, the 'MSI Auto Calibration' option disappears. When the LSE is disabled, the option is visible, but it cannot be enabled.Please tell me how to correctly configure MSI in PLL mode with the LSE in CubeMX.
Hi,Could you please share example for using IIS2MDCTR via SAI on STM32U385.Thanks
We are testing the best position for a VL53L5CX sensor in our product. We are observing unusual behavior and are not sure how the sensor should be calibrated in this setup.The sensor is mounted on the wall of a movable square housing and points inward. When the housing is positioned directly above a metal box, it appears that crosstalk affects the measurements in all 64 zones.We do not have the cover glass installed yet, but we will add it to the final product.How should the crosstalk calibration be performed in this situation?The vl53l5cx_plugin_xtalk allows a minimum calibration target distance of 600 mm. Therefore, should we perform the calibration outside the final assembly, using the actual cover glass and a target at 600 mm? Or should the calibration be performed with the sensor in its final mechanical position?There is another interesting observation: when the housing is positioned directly above the metal box, the crosstalk effect affects all 64 zones. However, when we raise th
As the title suggests, I see in debug mode that audio is captured from I2S_RX, but it is not transmitted on the transducer (I cannot hear any audio coming from I2S_RX with my hear). And the problem is that with the same hardware wiring it works on the other boards (including H7S3L8), but not on this specifically. I’ve tried to place dma buffer in RAM D2 and I’ve disabled D cache, ut it does not solve anything. Is the board I’ve ordered broken? I upload the code below
Hi all,Are these available for these samples? I am working on some secure boot devices and would like to try these chips as I am familiar with the STM32 ecosystem. Are you guys have any suggestion which NUCLEO can use for secure-boot purpose?I see there are NUCLEO-H5xx are designed for hardware crypto, sample project and we can build for chain of trust from these family chips?Please let me know, thank you.
Hi, I have another question regarding the practical installation of the ISM330DHCX for vibration monitoring in industrial machines. If the sensor is mounted directly on a machine, there may be exposure to **oil, grease, dust, coolant, and other contaminants**. I would like to know what is the recommended way to protect the sensor while still obtaining accurate vibration measurements. * Can the ISM330DHCX sensor/PCB be mounted directly on the machine?* Is a **protective enclosure or cover** recommended for industrial environments? * If an enclosure is used, how should it be designed so that it does not significantly affect the vibration measurement? * Is there a recommended **mounting method/material** for vibration monitoring applications? * Are there any recommendations regarding protection from **oil, grease, coolant, dust, and moisture**? I am interested in using the sensor on different types of industrial machines, so I would like to understand the recommended sensor mounting and
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.