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 everyone. How are you?I created a test program based on https://community.st.com/t5/stm32-mcus/how-to-calibrate-the-stm32-s-real-time-clock-rtc/ta-p/744958 I calibrated and compared the signal (512Hz @ PB2) with an oscilloscope, resulting in an error of less than 20 ppm. The RTC worked for 24 hours, and the seconds were the same as my base source (Windows). To me, this indicates that the hardware, crystal, and capacitors are OK.After that, when I entered my application code, the RTC always showed a delay (error > 5000 ppm). My code never use HAL_RTC_SetTime or HAL_RTC_SetDate. Reading from the RTC->CALR register is the same as the calibration value.Regardless of whether the calibration is at -488 or +488 (maximum value), the RTC always lags. I have the feeling that the processor gets busy doing something, and ends up losing some RTC pulse.Unfortunately, I can't post the complete code here, but I can provide some other information:- 1 ISR timer every 1 ms- X-Cube F
Follow-on from CubeMX code generation from command line.I am posting again in hopes of getting meaningful answer.I tried creating a simple script text file to automate code generation for my project. The script file has all of three lines:config load DCC_tester.iocgenerate code .exitThe feedback I got on why it did not work was my .ico file was corrupted. To prove this was not the case I used a very simple project file using one of your example projects from one of your released STM32H5 bundles.The only modification I made was changing the name and making it a cmake project.I am running on Windows 11 with CubeMX installed using all defaults.I can click on the .ioc file from Windows Explorer and the MX IDE opens just fine. I can click the "GENERATE CODE" button and that also works just fine. All the files are generated as expected.I try launching using the -q using ether a PowerShell script or a command line batch file and neither completes although it looks like its trying.
Hello everyone,I am currently working on a project using the STM32H755 microcontroller, and I am facing an issue with the program getting stuck in the `Reset_Handler` during debugging. Specifically, the code halts at the instruction `ldr sp, =_estack`, which sets the stack pointer, and does not proceed further.### Project Setup:- **Microcontroller**: STM32H755- **Core**: Only using the Cortex-M7 (CM7) core, with Cortex-M4 (CM4) code generation disabled.- **Debugger**: ST-LINK V3- **IDE**: STM32CubeIDE- **Firmware**: No custom firmware for CM4, only CM7 is active.### Steps Taken:1. I created the project with STM32CubeMX, configured it to use only the CM7 core (CM4 is disabled).2. During debugging, the code reaches `Reset_Handler` but gets stuck at `ldr sp, =_estack`.3. I have tried stepping through the code and confirmed the program halts at the stack pointer initialization.### Possible Causes Considered:- **Dual-Core Synchronization**: Since this is a dual-core MCU, I suspect there mig
A new question moved from this thread. Thank you a lot! But still I have many questions regarding this. Like this one: I have configured the ADC with the Temperature Channel and Vref int channel to be used with DMA. However in many examples they show how to configure the rank for the DMA but the rank option is missing within my CubeMX: Is this a bug or I'm missing something?
Hi, I'm stuck on a problem with setting PWR_CR_VOS on NUCLEO-32 STM32L031K6- I want to select HSI16-PLL as clock source- VDD is 3.3V- FLASH latency is set to 1WSBut I can only set PWR_CR_VOS to RANGE 2 and RANGE 3.RANGE 1 cannot be selected, so I can't set HSI-PLL to 32MHzwhere am I going wrong?Example code:// Set the Flash ACR to use 1 wait-state// and enable the prefetch buffer and pre-read.FLASH->ACR |= (FLASH_ACR_LATENCY | FLASH_ACR_PRFTEN | FLASH_ACR_PRE_READ);//----------------------------------------------------// 1. POWER ENABLE CLOCK and VOLTAGE REGULATOR//----------------------------------------------------// APB2ENR->SYSCFGENRCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;// APB1ENR->PWREN: Power interface clock enable bit for PWRRCC->APB1ENR |= RCC_APB1ENR_PWREN;// PWR: VOS[11:2] bits (Voltage scaling range selection)// !!! 0x0UL: FORBIDDEN// 0x1UL: 0b01 RANGE 1 1.8V 32MHz// 0x2UL: 0b10 RANGE 2 1.5V 16MHz// 0x3UL: 0b11 RANGE 3 1.2V 4.2MHz// Clear VOS bitsPWR->CR &
generated a new cubeIDE project with cubeMX, for my U585I-IOT02A board, the only things I changed are PC1 pin to high level and toolchain/ide to cubeIDE.building gives me this error : /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed no matter what I do or find on internet, I can't get it fixed... I'm on arch linux and installed all stm32 softwares with aur and zip downloaded on the st site if needed.
Hello everyone, I have a NUCLEO-H723ZG board and I would like to establish Ethernet communication with it. The board already includes a LAN8742 chip as the physical layer. However, in my system there is an external LAN8720 magnetic Ethernet module. At the moment, I can successfully ping the board using the on-board LAN8742 with the LwIP_UDP_Echo_Server application example. What I want to do is disable the on-board LAN8742 and instead use the external LAN8720 for Ethernet communication. I could not find any example where an external PHY is used together with an STM32 board that already has an on-board PHY. First of all, is such a setup actually possible? If it is, can I connect the external LAN8720 to the ETH header pins in RMII mode and make it work by adding the LAN8720 PHY driver? I have seen some discussions stating that this cannot be done without physically removing the LAN8742 chip, possibly due to pin conflicts. Could you please clarify this for me? Is it possible to achieve Eth
Sir, I have installed stm32cubeide 2.0.0 which is latest version. I opened cube mx and created a new project and selected new x cube ai package and generated the code, works fine and done successfully.after that i press exit the project, then i open the project but the x cube ai package is not selected in cube mx, and even i saved also why? please help me @Nalle @LMSTM @Balabala
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code or a script. Please read this post: How to insert source code. Hi This is something very easy that I am missing or impossible. I am using a nucleo-l476 to drive an RA8875 with a flash memory attached. This is using touch gfx to drive the RA8875 LCD. I am switching in/out of memory mapped mode to rewrite part of the flash memory so I can load different images into the flash memory and touch gfx will load the new images from the nor flash (This all works beautifully). what I am trying to do is have touch gfx load an image to a different part of the nor flash using partitioning. see linker below. MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K RAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K QSPI_NOR (xrw) : ORIGIN = 0x90000000, LENGTH = 8M QSPI_NOR_P (xrw) : ORIGIN = 0x9
Hi, I am designing a PCB using STM32G0B1RE to be deployed in automotive environment. I need to add ESD protection on its GPIO and ADC pins. I was going through AN5612: ESD protection of STM32 MCUs and MPUs. (Since any specific STM32 family is/are not mentioned in the doc, I think that it should be applicable to all the families.) Under subsection "3.3.4 Other serial interfaces", for I2C-bus ESD protection, the suggested part no. is USBLC6-4. Its electrical characteristics (see attached image) mentions that its V_BR (min) is 6.1V. As per the STM32G0B1RE datasheet, the maximum allowable voltage on any pin is 4.0V to 5.5V (depending on the pin).As per my understanding, V_BR of the ESD diode should be less than the AMR (Absolute Maximum Rating) of the concerned pin. My doubt is that whether the above mentioned ESD diode would be appropriate or are there some other parameters that are needed to be taken into consideration?What is the best approach to select the ESD
HI, how do I read the temperature value of a STM32C071 ADC and convert it into °C using DMA? I cant find any formula in the datasheet. BR Matthias
Question moved from this thread. + Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code and a linker script content. Please read this post: How to insert source code. One more question, if you can help. BSP_TS_GetState(& osc->touchScreen); BSP_TS_Init(ILI9488_TFTHEIGHT, ILI9488_TFTWIDTH); BSP_TS_Init and BSP_TS_GetState are not recognized by IDE versions 1.19 and 1.20. I have to disable them to compile, so the TOUCH doesn't work. C:/Users/Valter/STM32CubeIDE/workspace_1.19.0/Oscillo_STM32G431CBU/Debug/../Core/Src/oscilloscope.c:48:(.text.oscilloscopeInit+0x138): undefined reference to `BSP_TS_Init' C:/Users/Valter/STM32CubeIDE/workspace_1.19.0/Oscillo_STM32G431CBU/Debug/../Core/Src/oscilloscope.c:231:(.text.serveTouchScreen+0x10): undefined reference to `BSP_TS_GetState' I have never used this command before. Thanks
Hello to everyone,I'm using a custom board based over STM32H743XIH6.I'm developing a project that need to use TouchGFX, FreeRTOS and LWIP over ethernet. My first goal it's to be able to PING the card while TouchGFX is running, but i'm having lot of problems (hardfoults) If I enable only TouchGFX + FreeRTOS all run wellIf I enable only LWIP + FreeRTOS I can PING the cardIf I enable all (LWIP-FREERTOS-TouchGFX) I have lot of problems (HardFAULTS).Someone could share a simple project that can use all of them?I'm using a Custom board but i could try to a NUCLEO H743ZI KIT too.Best Regards.Roberto
Hello allDo we knoiw for the example like ( https://support.touchgfx.com/docs/development/scenarios/running-graphics-from-external-ram ) but for the STM32H750B-DK board where the bigger LCD is used?Any comments are more than welcome!Best.
Hi, I’m trying to get SDMMC + FileX + ThreadX working on an STM32H5 (NUCLEO-H563ZI) and I can’t find any complete example. SDMMC works on its own, but once I enable FileX, fx_media_open fails and no files get created. I’ve tried the H573 FileX examples, aligning buffers, using 1-bit mode, and adapting the fx_stm32_sd_driver_template, but nothing has worked so far. Does anyone have a minimal working example project that shows FileX mounting the SD card through SDMMC and writing a simple text file? Even a small CubeIDE project or code snippet would be extremely helpful.
I am working on an STM32 device with TrustZone enabled, and I am using the RTC with backup domain powered by VBAT. My RTC is initially configured while VDD is present, and after power-off, the time is supposed to be retained using VBAT.When I use the LSI clock, the RTC initializes correctly, and the time is retained across power cycles. However, I observe some drift, so I switched to the LSE clock. With LSE, the drift problem is gone, but a new issue appears:The RTC time is NOT retained when the system is powered from VBAT only.After removing and restoring VDD, the RTC resets instead of keeping the previous time.Details :TrustZone is enabled in the project.RTC + Backup domain is configured in the secure domain.Powering the RTC from VBAT works when LSI is used but fails when LSE is used.LSE crystal is soldered and oscillation appears stable.VBAT is present and verified during power-off.No backup registers or RTC clock settings seem to persist when using LSE.1)What could cause the RTC no
Hi!I'm going to compile packages to bild a web browser that is optimal for the hardware of MP2.I know that ST Dev team have built an minimal web browser to use in kiosk mode. They have been using Qt Nano Browser.But my goal is to try to build a better web browser that works with down streaming and up streaming.My question is: I need some information from ST about what they have tried. What packages they have been using etc, their suggestions what will work and what they have tried with. A list of packages that support the hardware would be excellent.The source code is going to available at Github for all to use. Even for ST.
I have been trying to generate a motor control demo for TrustZone enabled environment but seems Motorcontrol work bench does not support that. Is there any procedure/ way to manually port the code to TrustZone enabled environment?
HiFrom the ST25R3919B datasheet, I cannot find or understand the voltage level of EXT_LM. Does the EXT_LM voltage level depend on the VDD supply?”BR
Hello,Has the integrated support for CubeMX been removed in the new CubeIDE?I just updated to the latest (2.0) and now, when clicking on the ioc file of a project (created with previous version 1.19), CubeMX opens up.The top right corner has also changed.Also all the new project dialogs have changed, and it does not generate an ioc file anymore... Did my update went wrong somehow?
i'm trying to receive some data by uart and send by spi, both dma normal mode, i've done comunication separately but when i join them get stuck on spi busy, i tried a lot rtos(queues and semaphores), i changed almost all the code, but i just can't do this alone, i need some help. I am starting now at this level of embedding sistem and i'll be greatfull if anyone cold help me. this is my code for: RTOS: /* USER CODE BEGIN Header */ /** ****************************************************************************** * File Name : freertos.c * Description : Code for freertos applications ****************************************************************************** * @attention * * Copyright (c) 2025 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. * **********************
Dear All,I have been working on project to develop an HMI for vehicle for prototype purpose I am using MI0283QT-9A TFT display in SPI mode want it to work with my customized board using STM32F103CBT6. Currently I my using ILI9341 drivers available online and for their project it works where they used STMBlue pill.Mentioning detail of SPI and GPIO selection I made:1)SPI: pre scale: 64, Mode: transmit only master, Frame format: Motorola, 8bits ,First bit MSB,Baud rate:1.12MBits/sec2)GPIO: CS(GPIO_out=Low),D/C(GPIO_out=High),RST(GPIO_out=High)Connection:IM0=L, IM1=H,IM2=H,IM3=0.RS---> SCKWR---> D/CCS ----> CSRD---> VCCD0-D17--->GNDSDI ----> MOSISDO ----> MISOIssues and observations:1) The SPI communications starts MOSI send some packets SCK is have 1.1MHz stay active for 10 sec and stops, this activity is done after every resent or turn ON. Verified on CRO.2) The LCD backlight turns ON and doesn't display anything For reference I have provide links of l
I want to use stm32f103rct6 inner RTC, I write some code as below to active RTC, But I found I couldn't set DBP bit of PWR_CR reg to 1, __HAL_RCC_PWR_CLK_ENABLE(); __HAL_RCC_BKP_CLK_ENABLE(); LL_PWR_EnableBkUpAccess();when I debug the reg as below(gdb) x/2x 0x40007000 0x40007000: 0x00000000 0x00000000
Hi all,Dwelving deeper into the life and soul of the STM32Cube extensions I have come across a rather evil little bug. Luckily it is quite easy to reproduce.Use CubeMX to generate a boilerplate CMake project for any STM32 chipOpen VS Code, and open the folderIn VS Code, disable STM32Cube CMake Support extensionIn VS Code, hit "F1" and type "edit user". Select "Preferences: Open User Settings (JSON)"In the JSON editor, remove the "cmake.environment" keyIn VS Code, re-enable the STM32Cube CMake SupportExpected outcome:The "cmake.environment" setting should be put into the ".vscode\settings.json" file, similar to how "cmake.cmakePath" is placed there by the extension.Observed outcome:The "cmake.environment" setting stays in the user's local settings file and affects all projects, ST and non-ST alike. The "${env:PATH}" evaluation is at the end of the line but nevertheless the setting gives preference to ST-sourced tools and executables if they happen to be found from from the folders that
Hi I am evaluating NFC function on your STEVAL 25R3916B board, but I would like to see how it works with the I2C interface. Currently, the default configuration is SPI.I have downloaded STM32CubeIDE and STEVAL-25R3916B_V2.1.0 project code, but am not sure where should I put this definition "RFAL_USE_I2C", could you help me check where this macro needs to be placed?Thanks Leo
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.