Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello,Because there is no active handle in DMA list for DCMI DMA initialization (bug!?) I searching for the ways to enable and use DMA, I can't find examples for parallel mode except for CSI serial, if I switch to use DCMIPP in parallel mode then the cubeMX do not generate msp initialization code function HAL_DCMIPP_MspInit for DCMIPP interface (no pinout, RCC, IRQ...), and in DMA list DCMI_PSSI handle stays inactive,all my attempts to setup DCMI DMA do not work and DMA throws error 0x40, DCMI and camera working well, I getting hsync and vsync callbacks firing and counters show correct values, I tryed various settings but still cant start DMA transfer, there is my test and msp initialization code, please check: uint32 err0 = HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_CONTINUOUS, (uint32)frame_buff_DCMI, 320 * 240 / 2); uint32 err1 = HAL_DCMI_GetError(&hdcmi); HAL_Delay(5000); uint32 err = HAL_DCMI_GetError(&hdcmi); printf("DCMI %u %u, %u %u %u, %u %u\n", hdcmi.St
Hello everyone,I am currently working on an STM32-based project and have encountered an issue with UART communication. The UART works correctly after startup, and data is transmitted and received as expected. However, after running for several minutes, the communication suddenly stops and no further data is received.I have checked the wiring, baud rate configuration, and power supply stability. I also monitored the application for hard faults but could not identify the root cause. The issue occurs consistently after prolonged operation.Development Environment:MCU: STM32 Series IDE: STM32CubeIDE Communication: UARTHas anyone experienced a similar issue or can suggest possible causes and troubleshooting steps? Any guidance would be greatly appreciated.Thank you.
Hi all! Thank you for taking time to assist me. I am attempting to make a composite USB Device on the NUCLEO-C562RE. I found the Middleware USBX examples and the core drivers exist in my toolchain at: STM32CubeC5/middleware/usbx However, I cannot seem to find the middleware configuration for USBX in STM32CubeMX2. My pack manager in the STM32CubeMX2 is set to this default value: "cube.packManager.cmsisPackRepositories": ["https://developer.st.com/st-pack-server/api/v1/pidx/STMicroelectronics.pidx"] Please let me know if I have missed anything or if you need further information from me to figure out the root issue. The examples, linked above, clearly auto generated the USBX files using the MX2 software, but I could not find the documentation that allowed me to generate those files. I would greatly appreciate it if someone could assist me with this. EDIT: I saw this forum that says support isn't out until Q3. Does that mean I have to write the generated cod
Hello!I am working on a project using the STM32U375CGUx MCU, and I am trying to implement a Stereo Audio Acquisition system using two omnidirectional digital PDM MEMS microphones.Hardware Setup: Microphone L: L/R pin tied to GND (Rising Edge data output). Microphone R: L/R pin tied to VDD (Falling Edge data output). Both microphones share the same lines connected to the MCU: PB4 (ADF1_SDI0) for the clock and PB3 (ADF1_CCK0) for the data stream. The Issue:When configuring the peripheral through STM32CubeMX, I am unable to set up a true Stereo configuration. I can only make it work in Mono.Looking at the generated HAL initialization code, I am forced to choose either MDF_BITSTREAM0_FALLING or MDF_BITSTREAM0_RISING for the FilterBistream parameter. There is no option/macro to sample both edges (interleaved) simultaneously on the same filter instance:AdfHandle0.Instance = ADF1_Filter0;AdfHandle0.Init.CommonParam.ProcClockDivider = 6;AdfHandle0.Init.CommonParam.OutputClock.Activation =
Hello,I’m working with custom board STM32F767BITX, trying to interface Standalone USB Host MSC, with no Free RTOS.Tried different reference, below is one reference which I followed As soon as connected USB, it shows connected but after that it loop between this two calls alternatively, USBH_LL_PortDisabled() and USBH_LL_PortEnabled() which disconnect USB and connect again and continue to do that.So I dont understand the root cause of this, what trigger this to behave like this?Please guide me to fix this issue. void SystemClock_Config(void){ RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Configure the main internal regulator output voltage */ __HAL_RCC_PWR_CLK_ENABLE(); __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3); /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE; RCC
Hi everyone,I'm working on a project using **STM32H753ZIT6** (Cortex-M7 @ 480MHz) to drive an **Alientek ATK-MD0430** 4.3" TFTLCD with **NT35510** controller via **FMC 16-bit 8080 parallel bus**.**Symptom: Screen is completely dead — no backlight, no image, NT35510 ID read returns 0x0000 or 0xFFFF.**I've been debugging this for two weeks and would appreciate any guidance.---### Hardware Configuration| LCD Signal | STM32 Pin | FMC Function ||-----------|-----------|--------------|| CS | PD7 | FMC_NE1 (Bank1) || RS | PD13 | FMC_A18 || WR | PD5 | FMC_NWE || RD | PD4 | FMC_NOE || RST | PG9 | GPIO Output || BL | PA8 | TIM1_CH1 PWM || D0-D15 | Standard FMC data bus pins | FMC_D0~D15 |### System ClockHSE=25MHz → PLL1 /5×192/2 = 480MHz SYSCLKPLL2 /5×120/3 = 200MHz → FMC (HCLK=240MHz)VOS Scale 0### What I've Tried (all failed)1. Copied NT35510 init sequence from Alientek's official MiniSTM32H750 example2. Fixed CMD/DATA addresses: CMD=0x6007FFFE, DATA=0x60080000 (RS on A18)3. MPU configured for
Hello. I’m facing strange issue in my design with STM32U575RGT6, revision “U”.Finally I discovered what is going on, but I don’t have ideas how to fix this.I’m using electronic switch to power ON and OFF the device:VBATT is 4.2V Li-Ion battery.One half of BAV70 diode is controlled by manual SWITCH (to power ON), second one by IO pin from uC (to maintain ON, and to OFF).Problem is that my program often hangs up in this function (I added LED blinks inside): if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK) { while (1) { HAL_GPIO_WritePin(POWER_ON_GPIO_Port, POWER_ON_Pin, GPIO_PIN_SET); HAL_Delay(100); HAL_GPIO_WritePin(POWER_ON_GPIO_Port, POWER_ON_Pin, GPIO_PIN_RESET); HAL_Delay(1000); } Error_Handler(); }Voltage on VCAP pins is 0.9 V, and often freezes in this level. Rarely steps up to 1.2V and program normally continues.I finally discovered that is caused by slow rising of VDD voltage. This is from my electronic switch:I can bypass the
I read a couple of topics that discussed having to use the external xtal to drive the 48 Mhz as opposed to HSI48. When I run cube mx, the clock mux is greyed out and I cannot change the clock source.Am I chasing the right issue here and if so, how do I ungrey the clock mux?My IOC file is attached.
Hi all, we have developed a video capture application and are field-testing this right now. In order to optimize perceptual quality, we are tuning the quality parameters to find a good trade-off.I saw in the h263encapi.h some features mentioned that are interesting to our application but could not find out if the VENC hardware actually supports it, likeRegion of interest cyclic intra refresh Video stabilization (although I fear that memory bandwidth is a limit here)I have read the Hantro Software Integration Guide in the github repository but that does not go into detail on what is available on the STM32N6.It seems that there has been an earlier discussion in this topic mentioning an Internal ticket number: 209269Could we have a feature map on what the IP block actually supports and the related software documentation?Thanks a lot Simon
Good morning everyone,I need to drive an external pump using DAC out pheriperal.I am working with an STM32H562ZI microcontroller and have followed the guide available at the following link: Getting started with DACBelow is my current configuration:/** * @brief DAC1 Initialization Function * @param None * @retval None */static void MX_DAC1_Init(void){ /* USER CODE BEGIN DAC1_Init 0 */ /* USER CODE END DAC1_Init 0 */ DAC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN DAC1_Init 1 */ /* USER CODE END DAC1_Init 1 */ /** DAC Initialization */ hdac1.Instance = DAC1; if (HAL_DAC_Init(&hdac1) != HAL_OK) { Error_Handler(); } /** DAC channel OUT1 config */ sConfig.DAC_HighFrequency = DAC_HIGH_FREQUENCY_INTERFACE_MODE_ABOVE_80MHZ; sConfig.DAC_DMADoubleDataMode = DISABLE; sConfig.DAC_SignedFormat = DISABLE; sConfig.DAC_SampleAndHold = DAC_SAMPLEANDHOLD_DISABLE; sConfig.DAC_Trigger = DAC_TRIGGER_NONE; sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE; sConfig.DA
Hi,We are currently evaluating the possibility of booting an STM32N655X0-based custom board from an SD card and would appreciate some guidance before committing to this design.Current Setup MCU: STM32N655X0 Custom hardware Currently, the FSBL is downloaded directly into RAM during development. The FSBL then loads the application from external flash. We would like to migrate to SD card boot. Understanding from UM3234While reviewing UM3234 - How to Proceed with Boot ROM on STM32N6 MCUs, I found the following description (page 15):In data transfer mode, the Boot ROM searches for two FSBL images. It first looks for a GPT header at LBA1. If GPT is present, the Boot ROM uses the GPT table to locate the FSBL images. If GPT is not found, it falls back to the default locations: FSBL1: LBA 128 FSBL2: LBA 640 Our goal is to use a single SD card for both: Storing the FSBL used by Boot ROM Storing application data using FileX What We TriedOption 1: GPT PartitioningWe partitioned the SD
I need to create, read and modify files using filex. Such files have names that uses cyrillic characters set (they must be codified using unicode 16 bit). It is possible to manage such files? Thanks
Hi everyone,I'm working on a project using the STM32F4 series with STM32CubeIDE. After the MCU wakes up from Stop mode, HAL_Delay() seems to get stuck and the program doesn't proceed as expected.I've already re-initialized SysTick after wake-up, but the issue still persists. Has anyone run into this before? Would appreciate any pointers on what might be missing in the clock/SysTick reconfiguration after Stop mode exit.Thanks in advance!
I have used the HAL_Delay function as below, the micro is stm32g474ret6.while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, SET); HAL_GPIO_WritePin(Buzzer_GPIO_Port, Buzzer_Pin, RESET); HAL_Delay(1000); HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, RESET); } /* USER CODE END 3 */}The problem is the code always struck in the HAL_Delay function with uwTick always returning 0. The systick interrupt handler is not called. Another observation if i enable the timer1 interrupt (i assume enable any interrupt) the code is reset. I generated the PWM using timer1 without interrupts. What is the problem when i enable interrupts how do i check it? Is it something to do with the Interrupt vector table.
I am working with the STM32H7S3L8 MCU and using Zephyr RTOS for development. Currently, I see that Zephyr supports USB FS but does not seem to support USB HS for this MCU. Are there plans to add this support in future Zephyr releases? Any guidance or workarounds for enabling USB HS in Zephyr would be greatly appreciated. Thank you!
Hello @B.Montanari I am working with the STM32N6570-DK board and facing an issue while configuring LTDC in a dual-project (FSBL + Application) setup. As an initial step, I tested the "LTDC_Horizontal_Mirroring" example provided for STM32N6. This example is built as an FSBL-only project, and after building and flashing it, the display works correctly as expected. However, my final goal is to use LVGL for GUI development. Since I need more memory space for image storage and application resources, I created two separate projects: FSBL project – responsible for boot and low-level initialization Application project – intended to handle LTDC and GUI (LVGL) In my setup: The device boots successfully. FSBL execution appears correct. Control jumps to the Application project. LTDC peripheral configuration in the Application project is replicated from the working example. RIF configuration is performed in the FSBL project. Despite this, the display remains gray after
I posted something the other day; that thread is still open, and I'll close it once I have a solution. I think this information must be out there somewhere because right now it's very limited. Here is the thread: CDC HOSTAs I said, I have no problem with the development boards, but your reasoning means that I might still end up with the same problem in the end. Let me explain. We have 3 chips of the same model but in different packages. This means that the 3 chips have the same functions but a different number of ports.STM32F411CEU6 (UFQFPN48) / Dev Board: Weact Blackpill. (unofficial) (BlackPill Schematic)STM32F411RET6 (LQFP 64) / Dev Board: Nucleo-F411RE (Nucleo F411 Schematic)STM32F411VET6 (LQFP 100) / Dev Board: F411-Disco (Disco F411 Schematic)First, I should start by saying that tutorials for HOST/CDC mode are very rare. Usually, the code generated by CubeMX is reliable, and in this case, I was able to test the DEVICE/CDC part wit
As the title suggests My program on a Nucleo H7S3L8 stops running when D cache is enabled (appearently it does not go into Hardfault mode). However, when the line SCB_EnableDCache() is commented, it starts again running. Since I need D cache I configured the MPU for where the dma buffers of the project are located, since I’ve read that it could be a cache coherency problem with DMAs, but neither this solution solves the problem. I’ve read somewhere that is XSPI2_HSLV OTP that must be enabled on STM32CubeProgrammer, but I’ve checked and this is enabled! How the problem can be solved? I’ll upload the project
Hi all, Is this possible with a DMA on an STM32N6 device, using the HPDMA/GPDMA? (or I assume the H7 is quite similar, I believe?)Source array: RGBRGBRGBRGB (24 bpp) Destination array: xRGBxRGBxRGBxRGB (32 bpp)Or vice verca:Source array: xRGBxRGBxRGBxRGB (32 bpp) Destination array: RGBRGBRGBRGB (24 bpp) This would solve my issue, where I need both the 24bpp (NPU input) and a jpeg-encodable format (display; which all seem to be either 16bpp or 32bpp). If the above is not possible, then … I’d be open to suggestions on what else to do… Best regards, rphii
Hello! I have been using the STM32H723ZG Nucleo board and am now trying to ping the STM32 device from a PC through an Ethernet connection, but the ping is not working. For ex: ping 192.168.10.XX (STM32 Static IP) No response is received. My board setup and module details are given below.Board / Setup MCU: STM32H723ZG (Nucleo) Interface: Ethernet (RMII) PHY: (e.g., LAN8742 – please confirm) Stack: lwIP (CubeMX generated) RTOS: FreeRTOS Connection: Ethernet cable through splitter (PC ↔ STM32) PC IP: 192.168.10.XX (static) STM32 IP: 192.168.10.XX (static) STM cube IDE version: 1.18.1 Observed Behavior (STM32 side logs): STM32 successfully receives ARP requests from PC. Who has 192.168.10.50? Tell 192.168.10.100 (Captured by wireshark). 2. lwIP processes the request and generates an ARP reply. 3. ARP reply frame content (from debug log): 192.168.10.XX is at 00:80:XX:X
How would I go about implementing a USB host for a usb printer. I would like to send things through my STM32 to be printed. I’ve seen adaptations or some work done on the USB printer class as a device but I am unsure how I would do this as a host? Any ideas or already implemented libraries?
Hello, I started using HAL 2.1.0 which was available as a Pack download in MX2. I recompiled my application and I observed an assert during the DAC initialization in mx_dac1_init when HAL_GPIO_Init is called. hal_gpio_config_t gpio_config; /** [GPIO Pin] ------> [Signal Name] ------> [Labels] PA4 ------> DAC1_OUT1 ------> PA4 **/ gpio_config.mode = HAL_GPIO_MODE_ANALOG; HAL_GPIO_Init(PA4_PORT, PA4_PIN, &gpio_config);Inside the HAL_GPIO_Init the assert occurs due to an incorrect pull mode. if ((mode != LL_GPIO_MODE_ANALOG) || ((mode == LL_GPIO_MODE_ANALOG) && (p_config->pull != HAL_GPIO_PULL_UP))) { // I commented out this line //ASSERT_DBG_PARAM(IS_GPIO_PULL(p_config->pull)); LL_GPIO_SetPinPull(p_gpio, io_msk, (uint32_t)p_config->pull); }I checked the MX2 configuration of the DAC output pin and the pull field is empty and cannot be changed (see screenshot). I attached the ioc2 file for reference.T
Dear all!i’m working with STM32H743ZIT6 in ETH RMII, ADC, blink led if i disable MPU, Lwip config, led will blink, when i enable MPU_Config(); SCB_EnableICache(); SCB_EnableDCache(); MX_LWIP_Init(); CPU hang, led didn’t blink, so can you help to take alook my IOC file, and share me how to config this task
Hi ,I have a board that has a STM32H562xxx , I have 4 analog inputs mapped on ADC1 IN1, IN14, IN15 and IN18 single ended … ( PA1, PA2, PA3,PA4 ), TRGO TIM8 I have DCACHE1 disabled HAL_ADC_ConvHalfCpltCallback - gives a flag the cvt is completedI have a uint16_t dmaBuffer[4]When I run it the variable dmaBuffer[0..2] have values ~220 with small oscillations and only dmaBuffer[3] with correct values from ADC1It’s the first time I used this board and 1st to have CACHE … otherwise I eventually disabled it.Can anyone help ? What info do I need to provide so I get little help make this work ?ThanksCristian
Hello,im in the process of trying to make a LED Matrix driver with the gpdma on my stm32h562. Currently, I have everything working with one buffer, but want to implement double buffering so i can fill one buffer with data, and read from the other.I was looking around on the internet on how to implement this, but i found only one thread with the same problem, but i cant figure out how to implement the solution into my project, as there is no LLIx.nextLLI definition anywhere. Im using CubeMx to generate me code. /* USER CODE BEGIN Header *//** ****************************************************************************** * File Name : linked_list.c * Description : This file provides code for the configuration * of the LinkedList. ****************************************************************************** * @attention * * Copyright (c) 2026 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be fo
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.