Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
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
I am developing an application on NUCLEO-N657X0-Q using Getting started image classification as base code. I need to add to the project the standby mode and right now when it enters standby mode, then it fails to resume correctly, i guess because part of the application is lost when system wakes up (retention is only 80 KB).The total size of the application is much bigger then 80KB and I am not sure how to extend the actual retention memory in use adding the TCM retention memories.Actually the application code is placed at 0x34000400.Is there an example on how to place the application also in TCM? I thought that another solution could be placing in retention at 0x34000000 the fsbl code and maybe in axisram2 the application, so that when the system wakes up after a standby it executes again fsbl and gets from external flash the application code.I tried this last part changing the linker files, setting 0x34000000 for fsbl and 0x34100400 for application, then in fsbl code i set address 0x
I wanna implement Master and Slave ethercat protocol on stm32h7 series. Is there any examples available on subject?. Where should i start. Any resources?
I need to use embedded STM32H573 bootloader to update customer application using UART1 or uart3.I try to use AN2606, but no success. May you provide correct code to jump from application to the embedded bootloader for specific processor model: STM32H573, please?
Hi! I use LL drivers to work with UART as follows: LL_USART_SetRxTimeout(USART1, 3 * 11); LL_USART_EnableRxTimeout(USART1); LL_USART_ClearFlag_RTO(USART1); LL_USART_EnableIT_RTO(USART1); LL_USART_EnableIT_RXNE(USART1);and it works fine until I switch the MK to STOP1 mode HAL_SuspendTick(); HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); // STOP1 HAL_ResumeTick();What do I need to do to get this to work in STOP1 mode?
I have added a wolfSSH ICube repo to my project. It does not compile, showing: Cube/Middlewares/Third_Party/wolfSSL_wolfSSH_wolfSSH/wolfssh/src/internal.c: In function 'GenerateKey':Cube/Middlewares/Third_Party/wolfSSL_wolfSSH_wolfSSH/wolfssh/src/internal.c:2215:15: error: implicit declaration of function 'wc_SSH_KDF'; did you mean 'wc_HKDF'? [-Wimplicit-function-declaration] 2215 | ret = wc_SSH_KDF(hashId, keyId, key, keySz,I checked the configwolfSSL.I-CUBE-wolfSSL_conf.hand it seems to be missing the wolf repo has:/* Enable wolfSSL features needed for wolfSSH */#define WOLFSSL_WOLFSSH /* Enable wc_SSH_KDF function */ Do I have to manually add it? Am I missing some other config that enables it?wolfSSH example referencewolfip/src/port/stm32h563/user_settings.h at master · wolfSSL/wolfip
I am working on STM32H745BIT6 (dual-core: Cortex-M7 + Cortex-M4).Issue:DMA is functioning correctly when used from the CM7 core The same DMA configuration does NOT work when executed from the CM4 core
Hi everyone I have a bit trouble initializing the JPEG peripheral on the N6. See the stack trace: I feel like this has something to do with the RIF? I don’t know, this chip is very new to me. If anyone can help me, it’d be greatly appreciated. Best regards
I'm using an STM32H7S78-DK board and I have a part of the firmware that, from the boot, updates the FLASH from a .bin inside an SD cardThe code is pretty simple as I loop the FLASH comparing every sector with the one in the SD card and, if different I erase the internal flash sector and write the new one.Everything was working correctly until a update the code via CubeMXThe read seems to still workingif (EXTMEM_Read(0, fw_offset, flash_buf, br) != 0)but as soon as I do theif (EXTMEM_EraseSector(0, fw_offset, FLASH_SECTOR_SIZE) != 0)I got an errorThe crash happens in if (EXTMEM_DRIVER_NOR_SFDP_OK != EXTMEM_DRIVER_NOR_SFDP_SectorErase(&extmem_list_config[MemId].NorSfdpObject, local_address, sector_type)) { retr = EXTMEM_ERROR_DRIVER; }I've rolled back just the driver in the STM32_ExtMem_Manager, and everything started working againI've noticed that quite a few files have been changed, including the addition of #define EXTMEM_DRIVER_CUSTOM 0In the conf_temp
STM32N6570-DK: BOOT0/BOOT1 switches appear to have no effect. In DEV boot (BOOT1=H), external loader MX66UW1G45G_STM32N6570-DK fails with "Init function fail with timeout" via both STM32CubeProgrammer 2.22.0 CLI/GUI and STM32CubeIDE (ST-LINK FW V3J17M10, hot plug and under-reset modes, AP1). In serial boot (BOOT0=H), no USB DFU enumeration on USB1 and no UART acknowledgement on the STLink VCP (115200 8E1). SWD debug access works normally; the board previously booted user firmware from flash. Official STM32N6-OOB readme procedure reproducibly fails at the first sector erase.
Hello.I am building a Thread SED product using the STM32W5MMG. Recently, after upgrading the firmware version to v1.24.0, I encountered a problem with low-power startup.Upon investigation, I discovered that the location of the “Init_Debug();” call within the MX_APPE_Init() method in app_entry.c was different.Previously (in v1.23.0), I had written the following code within the /* USER CODE BEGIN APPE_Init_1 */ block, and this worked correctly. HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer *//* USER CODE BEGIN APPE_Init_1 */#if (CFG_FULL_LOW_POWER != 1) Init_Debug();#endif UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); Led_Init(); Button_Init();/* USER CODE END APPE_Init_1 */ However, with the transition to v1.24.0, the call location of Init_Debug(); was changed as follows. HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */ Init_Debug();
Hello everyone!I will try to be short here… even though I will probably fail on this task.Hardware: ST-Nucleo-STM32F446REI have a 96kHz loop, which happens inside a callback from TIM3. I also have 4 analog signals to be sampled. Originally, I have set these signals into ADC1 (CH6 and CH7) and ADC2 (CH15 and CH9). Due to the ~10.4us period of time I have inside my callback, considering 168MHz system clock and 21MHz ADC clock (System Clock /2 /4), I need to act quick. I have decided to use DMA for this application: DMA2 Stream 0 assigned to ADC1 and DMA Stream 2 assigned to ADC2. Then, inside the loop, I am simply assigning the buffer values to variables (or, if I need to squeeze a few more cycles, I can use them directly). However, I noticed the variables assigned to ADC2 would not be sampled correctly: the first channel would be sampled just once, at the startup, and the second never, while the two channels on ADC1 would behave well. In my code, var3 and var4, respectively. The most re
Hi,I made a post a few weeks ago but I can’t find it now because I think this forum may have been updated.I have an STM32F779I-EVAL and I’ve managed to get LwIP_HTTP_Server_Raw compiled and running from this repo (STM32CubeF7/Projects/STM32F769I_EVAL/Applications/LwIP/LwIP_HTTP_Server_Raw).The display turns on, and within the debugger, there is no issue. It shows a DHCP timeout and then states its IP is 192.168.0.10, this is fine by me.With a normal ethernet cable connected to a network switch, or even using a crossover ethernet cable, I get nothing when I ping 192.168.0.10. Ethernet is set up correctly within Windows.Does anyone have a clue what’s going on here?I’ve tried basically every tutorial on the internet at this point to ping the device. The most hopeful looks like this one, but still nothing. I’ve also got a Nucleo-H755ZI-Q which doesn’t work with any example.I’m starting to think maybe it is my set up but I’ve tried across multiple computers, all using the correct settings (
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.