Developer support experience survey - We value your feedback
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
Split from: HAL_UARTEx_ReceiveToIdle_DMA return HAL_ERROR when stm32's partner restart. That thread is solved; this is a new question. I think I'm seeing a similar problem if I call `HAL_UARTEx_ReceiveToIdle_DMA()` when the UART receive line is actively receiving data (when the other end is transmitting). A good percentage of the time it returns HAL_ERROR. I'm using STM32L4 HAL 1.13.6 (Cube 1.18.2). The problem is that the UART generates an overrun error immediately when `UART_Start_Receive_DMA()` enables the overrun error. The overrun error overwrites `huart->ReceptionType = HAL_UART_RECEPTION_STANDARD` which causes `HAL_UARTEx_ReceiveToIdle_DMA()` to return HAL_ERROR as shown in the code snippet from `HAL_UARTEx_ReceiveToIdle_DMA()` below: /* Set Reception type to reception till IDLE Event*/ huart->ReceptionType = HAL_UART_RECEPTION_TOIDLE; huart->RxEventType = HAL_UART_RXEVENT_TC; status = UART_Start_Receive_DMA(huart, pData, Size); /* Check Rx process has
Hardware/Software Environment:MCU: STM32G030K6T6SDK: MCSDK v5.4.8 (CubeMX v6.3)Current Sensing: Single-Shunt (Rshunt = 0.1Ω, Op-amp Gain = 7.5)Motor: PMSM, Nominal 900 RPM.Observer: STO-PLL, Min Reliability Speed = 350 RPM.The Problem:I am trying to start a motor that is windmilling at 500 RPM in the CCW direction. My application requirement is to run in the CW direction at 900 RPM.Currently, when I call MC_StartMotor1(), the motor slows down slightly but continues to rotate CCW. The State Machine transitions from IDLE -> START, stays in START (Rev-up) for the duration of the phases, and then returns to start-up fault.Normal start from 0 RPM works perfectly.Rev-up Table: Phase 1 is 0 RPM (Alignment) for 2000ms at 90% nominal current. Subsequent phases ramp to +450 RPM.Manual Braking: I have implemented a PWMC_TurnOnLowSides() call for 500ms in the CLEAR state to dissipate CCW energy, followed by PWMC_SwitchOnPWM().Observation: Despite high alignment current, the motor "slips" and ne
Hello,I am currently preparing the documentation package for CE certification of a device that uses the STM32G071RB microcontroller.Could you please clarify whether there is any official CE compliance documentation available for this MCU (or for the STM32G0 series), such as:CE declaration or compliance statementRoHS / REACH declarationenvironmental or material compliance documentationany other certificates typically provided for regulatory documentationIf a direct CE certificate is not applicable to the microcontroller itself, could you please advise which official documents from ST are recommended to include in the technical file for CE marking of the final product?A link to the relevant documents or the ST compliance page would also be greatly appreciated.Thank you in advance for your help.Best regards
Hi, I'm using an STM32WL5MOC where the LPUART is used to wake up the module from Stop2 mode. Since I have a lot of data to transfer, I would like to ask how I can switch to the HSI clock after waking up, and then, of course, switch back to the LSE to allow wake-up functionality. Thanks.
Hello, I have used DMA for timer outputs, input compares, memory to memory, etc. and all has worked fine, however I can't seem to get a timer-triggered DMA from memory to GPIO outputs (as this post seems to have managed).I have tried using the ODR register, the BSRR register, 16 bit transfers, 32 bit transfers, reordering the initialisation of different components, setting TIM1->DIER = TIM_DIER_UDE in different places, etc. etc. The timer is definitely incrementing and resetting correctly and I am getting a TEIF1 on DMA1.I am less familiar with DMAMUX (I used the F401 previously) so I may be making a mistake there.#include <stdio.h> #include "main.h" #include "stm32g0xx_hal_tim.h" void SystemClock_Config(void); static TIM_HandleTypeDef htim1 = {0}; static DMA_HandleTypeDef hdma = {0}; #define GPIO_BUF_LEN 4 static uint32_t gpio_buf[GPIO_BUF_LEN] = { 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0x00000000, }; static void Init_GPIO(void) { __HAL_RCC_GPIOA_CLK_E
Hello,I am wondering why the STmicro example code (STM32CubeH7) does not use the interrupt attribute for defining exception handlers.The difference I have noted when using this attribute is that it forces the stack alignement to 8 bytes:Example: void f(void); void handler(void) { return f(); } compiles with arm-none-eabi-gcc 10.2.1 and -O1 -mthumb -mcpu=cortex-m7 in: handler(): push {r3, lr} bl f() pop {r3, pc} whereas if I add the attribute "interrupt": handler(): mov r0, sp bic r1, r0, #7 mov sp, r1 push {r0, lr} bl f() pop {r0, lr} mov sp, r0 bx lr One can see the difference is in the 3 first instructions that align the stack to 8 bytes. Indeed the stack is not always aligned to 8 bytes inside a function. From the Procedure Call Standard: 6.2.1.1 Universal stack constraints At all times the following basic constraints must hold: Stack-limit ≤ SP ≤ stack-base. The stack pointer must lie within the extent of t
Post edited by ST moderator to be compliant with the ST community rules especially for sharing a code. The latest Cube H5 package (STM32Cube FW_H5 V1.6.0) has broken the use of ADC2_INP0 with the following changes to LL_ADC_EnableChannel0_GPIO and LL_ADC_DisableChannel0_GPIO in STM32H5xxLL_ADC.H. Previous, __STATIC_INLINE void LL_ADC_EnableChannel0_GPIO(const ADC_TypeDef *ADCx) { /* Prevent unused argument(s) compilation warning */ (void)(ADCx); SET_BIT(ADC1->OR, ADC_OR_OP0); } Current, __STATIC_INLINE void LL_ADC_EnableChannel0_GPIO(ADC_TypeDef *ADCx) { SET_BIT(ADCx->OR, ADC_OR_OP0); } Previous, __STATIC_INLINE void LL_ADC_DisableChannel0_GPIO(const ADC_TypeDef *ADCx) { /* Prevent unused argument(s) compilation warning */ (void)(ADCx); CLEAR_BIT(ADC1->OR, ADC_OR_OP0); } Current, __STATIC_INLINE void LL_ADC_DisableChannel0_GPIO(ADC_TypeDef *ADCx) { CLEAR_BIT(ADCx->OR, ADC_OR_OP0); } According to the reference manual t
Hi,What about Simetrix EOR model for the RHFL4913A?? It would be really fine as well to get RHFL7913 BOL and EOR simetrix models.Cheers.
Split from CubeIDE incorrectly flags __attribute__((fallthrough)) as syntax error.I've also noticed it doesn't like the use of static_assert at file scope:
Hi,in AN5225 an anylzer is used (e.g. Fig 22, page 33). Can anyone tell me which analyzer it is?Best regards,Achim
We have a custom stm32mp25 board. On Mickledore we were able to create a/b partitions in our machine conf doing the following: PARTITIONS_IMAGES += "tc-appfs-a tc-appfs-b" STM32MP_TCFS_IMAGE ?= "ti-tc-appfs" STM32MP_TCFS_LABEL_A ?= "tc-appfs-a" STM32MP_TCFS_LABEL_B ?= "tc-appfs-b" STM32MP_TCFS_MOUNTPOINT ?= "/tc-apps" # Proposed value for tc-appfs is 150MB STM32MP_TCFS_SIZE ?= "153600" PARTITIONS_IMAGES[tc-appfs-a] ?= "${STM32MP_TCFS_IMAGE},${STM32MP_TCFS_LABEL_A},${STM32MP_TCFS_MOUNTPOINT},${STM32MP_TCFS_SIZE},FileSystem" PARTITIONS_IMAGES[tc-appfs-b] ?= "${STM32MP_TCFS_IMAGE},${STM32MP_TCFS_LABEL_B},${STM32MP_TCFS_MOUNTPOINT},${STM32MP_TCFS_SIZE},FileSystem" PARTITIONS_LIST += "tc-appfs-a tc-appfs-b" However, in scarthgap this no longer works. We are getting the following error:Cannot generate FlashLayout_emmc_stm32mp257f-m670-optee.tsv file: the ti-tc-appfs-ti-linux-stm32mp25-m670.tc-appfs-a.ext4 binary for tc-appfs-a partition is missing in deplo
Hello STM32 community!I'm relatively new to the embedded field and have been diving into communication protocols through small projects. Currently, I'm working on implementing USB CDC on an STM32H563ZI, and I've been facing challenges for the past two weeks.I've extensively searched the internet and followed various tutorials, but unfortunately, none of them seem to work.One of the tutorial(from STM community) that I followed: https://www.youtube.com/watch?v=LdY2bieaPwkI have added read functions to receive the data. I have made two separate semaphores for read and write functions. (It should work even without semaphores though). When I run the code, it's not taking any input from the terminal. Inside app_usbx_device.c file,these two threads(for read and write) were created inside MX_USBX_Device_Init() function.I am giving semaphore inside the while loop here...Inside ux_device_cdc_acm.c file,I am declaring variables...I am defining the read and write functions like this
HiI would like to know the state of the GPO pin when VCC=0 on the ST25DV64KC-IE8T3. The GPO output is open drain and should be in high independence when VCC=0, but it seems that the MOSFET remains activated. BRGilberto
Hello, I am currently trying to port the ST25R3916B driver to a platform that uses the ThreadX RTOS, but I am encountering some issues. I have previously ported it to a platform using Zephyr, and that process went smoothly.I have already implemented the platform-specific files responsible for I2C communication, IRQ handling, and software timers. The initialization process completes without any errors. However, in the main thread—where I call rfalWorker()—the NFC tag is not detected.Below are some relevant code snippets: Init() { /* Initialize RFAL platform */ rc_st = rfalNfcInitialize(); }Discover() { /* Retrieve default discovery parameters */ rfalNfcDefaultDiscParams(&m_discParam); m_discParam.notifyCb = m_fncPollNotification; m_discParam.p2pNfcaPrio = true; m_discParam.totalDuration = 1000; m_discParam.techs2Find = flags; m_pollDuration = duration; ReturnCode rc = rfalNfcDiscover(&m_discParam); } while (1) { rfalNfcWorker(); state = rfalNfcGetS
I’m trying to get a USB Full-Speed Host Mass Storage example running on the STM32H753I-EVAL2 using ThreadX, USBX, and FileX.I’ve generated the base project from CubeMX, but I’m running into a few issues:VBUS Enable/Detection: VBUS is not being enabled correctly via the MFX (IO expander).Even when manually configuring, the stack doesn’t seem to handle VBUS properly in host mode.Memory Pool & Stack Sizes:Default memory pool size and system/stack sizes seem insufficient, causing failures with Mass Storage class. tried increasing but did not succeed and ended up in memfaultsI’m looking for:A working USB FS Host Mass Storage example for STM32H753I-EVAL2 with ThreadX, USBX, and FileX.Guidance on properly enabling VBUS via MFX or directly on the board.Recommended USBX memory pool and stack sizes for Mass Storage class.BSP package for STM32H753I-EVAL2Any example projects, tips, or guidance would be greatly appreciated.Thanks in advance!
Hi everyone, I'm struggling with a critical synchronization issue between TouchGFX Designer (4.2x) and IAR Embedded Workbench (9.60.2) on an STM32H563 project.Whenever I modify the UI (e.g., deleting a Button or adding a ToggleButton), TouchGFX correctly generates the new .cpp and .hpp files in the "generated/" folder.However, upon flashing the device, the UI is completely corrupted:- Images are replaced by random noise or other assets.- Texts disappear- Moving a widget "off-screen" instead of deleting it works, but adding new ones breaks everything again. I'm using Nucleo-H563ZI with Riverdi screen.I tried these steps without success:- Delete IAR folders: Obj, BrowseInfo and regenerated- Deleted TouchGFX/generated and TouchGFX/build and regenerated- Full chip erase (Internal + External Flash) via STM32CubeProgrammer- Forced "Rebuild All" in IAR Any idea on how to fix this issue?
Hi all. I have been witnessing a rapidly shrinking amount of free space on my C drive. On a regular drive clean up of non-essential data, I can generally remove 1 Gigabyte or so of temporary files. This however, does not account for the rapid depletion of available free space. On further investigation, I looked into the 'Other' (Manage other large folders) section of the 'System -> Storage' properties of my Windows 11 C drive. I was a little gob-smacked to discover that - between them - the ST related folders: stm32cubeide, stm32cubemx, STM32Cube and ST contain over 100Gb of data.Obviously allowing for software packs and the various STM applications in daily use, I found a considerable amount of data was held in several .jxbrowser folders across more than one location. For example, the .jxbrowser-7.38.2 folder inside the stm32cubemx directory - alone - is at a whopping 17.5Gb. I don't see any way of cleaning them or whether or not it is safe
Hi everyone,I have recently upgraded from openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11 to openstlinux-6.6-yocto-scarthgap-mpu-v26.02.18 of the meta-st-stm32mp layer.I am using a custom board based on a STM32MP157 MPU.With the previous revision, my board booted fine but since I updated to the new version it is stuck during boot. Here are the boot logs I got after enabling the early console:Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.6.116 (oe-user@oe-host) (arm-oe-linux-gnueabi-gcc (GCC) 13.4.0, GNU ld (GNU Binutils) 2.42.0.20240723) #1 SMP PREEMPT Sun Nov 2 13:14:42 UTC 2025 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Eaton Machine [ 0.000000] earlycon: stm32 at MMIO 0x40011000 (options '115200n8') [ 0.00000
I see in STM32CubeMX that a STM32G411 exists but it has the status "restricted". I'm curious why this type is not widely available. I'm currently using the STM32G431 in an application, mainly because of its raw clock speed of 170MHz. I don't actually need its analog functions but the flash size might become too tight. In that case, my only option would be to switch to the G491, which is more expensive and contains even more unneeded peripherals... So... why is the G411 not available to the public?
Hi Team,I'm recently using the STM32U5G9ZJT6Q part in one of my design. I couldn't find the package mechanical information in Datasheet. For now, I'm using the LQFP-144 form the STM32H573ZIT3Q part number. Will it be okay? Can you please help to verify it? Attaching the below Screenshots,Screenshot from the STM32U5 Datasheet. Not having the LQFP-144 details.Screenshot from the STM32H5 Datasheet. Having the LQFP-144 details
How to configure parallel compilation in cubeide, that is, "j-4" "j-8" and I encountered an error in the Windows 87 code, how to solve it, I changed the path and still couldn't do it··········································································································································00:10:38 **** Build of configuration Debug for project fishboat_2 ****make -j4 allarm-none-eabi-gcc "../Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xB -c -I"D:/studystudystudy/Cube_32F1/fishboat_2/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"D:/studystudystudy/Cube_32F1/fishboat_2/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2" -I"D:/studystudystudy/Cube_32F1/fishboat_2/Drivers/CMSIS/Include" -I"D:/studystudystudy/Cube_32F1/fishboat_2/Drivers/CMSIS/Device/ST/STM32F1xx/Include" -I"D:/studystudystudy/Cube_32F1/fishboat_2/Drivers/STM32F1xx_HAL_Driver/Inc" -I"D
I am running CubeMX in a WIndows on Arm VM on a MacMini, which is connected to a KVM. When I switch the KVM to another machine and come back, all of the windows have changed size (not unexpected). They all revert to their original sizes and positions, but the window for CubeMX does not redraw/scale it's content.For example, I see this before I switch away:And this when I switch back (note the double menu):Dragging the edge of the window to cause a (very small) change in size restores the expected view.CubeIDE and TouchGFX do not show this behaviour.
Greetings,I am in the process of integrating the OpenBootloader Middleware application onto a STM32C011 device.I got the code from the STM32Cube/Repository/STM32Cube_FW_C0_V1.4.0/Middlewares directoryI have the code in an STM32CubeIDE project, and it is not compiling?For example:The C file, Interfaces/Patterns/OPTION BYTES/optionbytes_interface.c, has code to write to aFLASH control register. WRITE_REG(FLASH->PCROP2ASR, (*(Data + 56) | (*(Data + 57) << 8)));Yes, the STM32C0 has not such field name PCROP2ASR in the FLASH_TypeDef structure? ../OpenBootloader/Interfaces/Patterns/OPTION BYTES/optionbytes_interface.c: In function 'OPENBL_OB_Write':../OpenBootloader/Interfaces/Patterns/OPTION BYTES/optionbytes_interface.c:162:22: error: 'FLASH_TypeDef' has no member named 'PCROP2ASR'; did you mean 'PCROP1ASR'?162 | WRITE_REG(FLASH->PCROP2ASR, (*(Data + 56) | (*(Data + 57) << 8)));| ^~~~~~~~~How can this
Hello.I'm currently working on the above cpu and trying to implement a custom ble p2p server app. I have 1 service and 2-3 characteristics and i want to add Freertos for time critical constraints managenments. Correct me if im wrong, but it seems that the Freertos stack is incompatible with a custom ble p2p server template. The only thing that i can choose to use when enabling Freertos is the heart monitor template. Is there any work around or do i have to ditch free rtos all together and go bare metal instead ?
Hello,I'm attempting to work with the SAI using DMA on the H7S using the NUCLEO-H7S3L8, unfortunately there is no SAI example. There is an I2S example using DMA on the STM32H7S78-DK:https://github.com/STMicroelectronics/STM32CubeH7RS/tree/main/Projects/STM32H7S78-DK/Applications/USB_Device/Audio_StandaloneI've generated a project for the Nucleo using CubeMX, and then brought over the DMA code in the HAL_SAI_MspInit from that I2S example, and modified it for SAI. The result runs, but a user settings error is reported in the DMA interrupt:Here's the complete project:https://github.com/mojolabsdotnet/saiDmaH7SWhat is the right way to setup DMA for the SAI on the H7S?Thanks!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.