Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello! I have a struggle to boot the isolation LRUN project from STM32Cube_FW_N6_V1.3.0/Projects/STM32N6570-DK/Templates/Template_Isolation_LRUN. 1. First i've performed the mass erase to remove the demo on the discovery board. 2. I've build and add the header to the binary with the Signing Tool for all three projects. Example below for FSBL. STM32_SigningTool_CLI -bin Template_Isolation_LRUN_FSBL.bin -nk -of 0x80000000 -t fsbl -o Template_Isolation_LRUN_FSBL-trusted.bin -hv 2.3 -dump Template_Isolation_LRUN_FSBL-trusted.bin3. I've Flashed the external memory in DEV mode with all three images:FSBL flashed to 0x7000 0000 SecApp flashed to 0x7010 0000NonSecApp flashed to 0x7018 00004. I've switched the board to Boot from ext. memory mode and pressed restart. The board doesn't boot. 5. I've loaded the FSBL project in DEV mode with debugger to internal RAM( 0x3418 0400 ) and it runs nicely. ---------------------------------------------
I am using a STM32G4 MCU and STM32CubeIDE. I want to synchronise two timers (TIM3 and TIM15) that are generating PWM signals so that they both start at the same time. TIM3 is set to 250 kHz and the PWM is modulated via DMA on channel 1. The modulated signal is a 10 kHz sine wave.TIM15 is set to 10 kHz and the PWM is a simple 50% duty cycle.I need the timers to start together to ensure that the PW Modulated 10 kHz sine wave (TIM3) is synchronised to the 10 kHz PWM (TIM15).I thought it would be straight forward enough. I have configured TIM15 as master. In CubeMX I have set Master/Slave Mode (MSM bit) to "Enable (Trigger delayed for master/slaves simultaneous start)" and Trigger Event Selection to "Enable (CNT_EN)".I have configured TIM3 as a slave. In CubeMX I have set Slave Mode to "Trigger Mode" and Trigger Source to "ITR6" (per the reference manual).To the CubeIDE generated code I have added: /* USER CODE BEGIN 2 */ HAL_TIM_PWM_Start_DMA(&htim3,
Hello everyone,I'm writing this to provide support for my External Loader project for TouchGFX , which I've been working on for a long time.The External Loader file works good with STM32CubeProgrammer. (Write-Erase-Read operations are possible) LOG OUTPUT IS ATTACHED --> [STM32Cube Programmer LOG Output]When I run my project file LCD_Driver_v10 and my External Loader file together, I get the following errors: The complete error message is attached. --> [STM32Cube IDE CONSOLE Output] Error: failed to download Sector[0]Error: failed to download the FileEncountered Error when opening C:\Users\USER\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.300.202508131133\tools\bin\STM32_Programmer_CLI.exeError in STM32CubeProgrammer I also checked this address https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/external-loader-fails-to-download/m-p/136566#M6974 which has a similar problem, but nothing changed.My Mcu is STM32F7
Hello everyone, First of all I am kinda new in ARM (I never use), I am working on the STM32H745I-DISCO board (using the CM7 core) and I am facing a persistent issue with UART . No matter what I try, the RX Interrupt never triggers, and the code never enters the HAL_UART_RxCpltCallback. My Setup: Board: STM32H745I-DISCO IDE: STM32CubeIDE (Latest Version) Scenario: UART Loopback Test (Connecting TX to RX physically). Peripheral: USART6 (TX: PC6 / RX: PC7) on the Arduino Headers (D1/D0). Settings: 115200 baud, 8N1, Asynchronous. The Problem: -HAL_UART_Transmit works fine (signals observed). HAL_UART_Receive_IT returns HAL_OK. However, the HAL_UART_RxCpltCallback is never executed. When checking SFRs in Debug mode: RXNE flag stays at 0. What I have verified so far (Step-by-Step): NVIC Settings: USART6 global interrupt is Enabled in CubeMX. Vector Table: USART6_IRQHandler exists in stm32h7xx_it.c and calls HAL_UART_IRQHandler. Initialization Order: I ensured that MX_USART6_
I'll explain Flash Erase Error to the stm32l475rct6 MCU that I'm currently using. Page : 127, Address : 0x0803F800, Bank : FLASH_BANK_1 is defined, and if you try to modify the value after first saving the value in the Flash area, the values already stored in Flash are not erased properly, so the Flash value cannot be modified. SMT32CubeIDE version is 1.19.0 and I'll attach the code I implement, so please check where the problem is and let me know if there is a solution.void AO_SaveCalibration(void){HAL_StatusTypeDef status; printf("Saving calibration to Flash...\r\n");printf("Data size: %u bytes\r\n", sizeof(AO_Calibration_t)); ao_cal.checksum = Calculate_Checksum1(); status = HAL_FLASH_Unlock(); if (status != HAL_OK){printf("ERROR: Flash unlock failed\r\n");return;} __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_ALL_ERRORS); while(__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY)){// Flash 작업 완료 대기} FLASH_EraseInitTypeDef EraseInitStruct;uint32_t PageError = 0;EraseInitStruc
Hello ST Community,I am working with the STM32N6570-DK and the USBX Ux_Device_Video example fromSTM32Cube_FW_N6_V1.3.0\Projects\STM32N6570-DK\Applications\USBX\Ux_Device_Video.I followed the README instructions exactly:Built FSBL and Ux_Device_Video projects successfully in STM32CubeIDEGenerated FSBL.bin and Ux_Device_Video.binSigned both binaries using STM32_SigningTool_CLIProgrammed:FSBL-trusted.bin at 0x70000000 (external flash)Ux_Device_Video-trusted.bin at 0x70100000 (external flash)Set BOOT0 and BOOT1 to boot from external flash and reset the boardHowever, the application does not run as expected. When the board is connected to a Windows PC, the Windows Camera application fails with the error: Can't start your camera0xA00F4241 <CameraSwitchFailed> (0xC00DABE7)From my understanding, the Ux_Device_Video example should enumerate as a USB UVC camera and stream video to the Windows Camera app. Since the camera app fails, it seems the firmware may not be executi
I'm using the X-CUBE-EEPROM library on my STM32C031G6Ux to store keys in flash memory. I configured eeprom_emul_conf.h so that the emulated EEPROM starts at 0x08007000, with 2 pages of 2 KB each, and set NB_OF_VARIABLES to 240.When I tried saving 240 variables once using EE_WriteVariable32bits and reading them back with EE_ReadVariable8bits, everything worked fine.However, when I repeat this process three times, writing stops once both pages are full, and the data is no longer read correctly.I experienced similar issues even with 120 variables. Interestingly, adding EE_CleanUp after all writes solved the problem for 120 variables.I then tried the same approach with 240 variables, calling EE_CleanUp after all write operations, but it still didn’t work.Is there a reason for this behavior? Am I limited to storing only 120 variables in flash?
Hello fellow readers,##Disclaimer##I am using a Nucleo Board, the Nucleo H7S3L8, and HAL_ERROR ist laughing me since 2 days in my face# I think you, dear reader, have heard about the SWR-Bit, which vanishes out as soon the software has restarted succesfully, everything seems perfect and you have finally the feeling you found the solution to world piece.But I am currently at the brink of insanity, because this little ******* ***** ** **** wont clear itself after I forced the reset. What do I mean specifically?HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) { uint32_t tickstart; if (heth == NULL) { return HAL_ERROR; } if (heth->gState == HAL_ETH_STATE_RESET) { heth->gState = HAL_ETH_STATE_BUSY; #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) ETH_InitCallbacksToDefault(heth); if (heth->MspInitCallback == NULL) { heth->MspInitCallback = HAL_ETH_MspInit; } /* Init the low level hardware */ heth->MspInitCallback(heth); #else /* Init the low lev
Hello all. I'm writing an application with the NUCLEO-H563ZI board (with the intention to use later the STM32H563 into a custom board). My application will communicate with a master PC via the embedded Ethernet, exchanging process data and commands. The protocol will be, most probably, Modbus/TCP. I've been able to configure the board (I/O), run the ThreadX OS, setup and run netXDuo middleware. I set up a TCP socket server connection on the STM32, with a C# test application as a client. I can open the socket from the C# client, send ad receive TCP packets almost correctly. The TCP server on the STM32 receives a packet from the client, extract the payload (data) from it, creates a new packet, copy the payload to the new packet and then echoes back the new packet to the client. This will change in the future, of course, but for the first tests it seemed nice to get back the same data. Here I have a problem. Everything works fine if the packet payload is less than 516 bytes long; over suc
Hi I am using Nucleo H753zi board, can I use X-CUBE-MEMSMIC1 expansion for sound source localization.
Hey!I'm working on implementing USB host functionality on the STM32U545 using the USB_DRD_FS peripheral. I've got the basic structure working, but I'm stuck at the enumeration stage, where the device responds with NAK to SETUP packets and enumeration never completes.As I'm using the dev boad which has no power, I'm using an external 5V supply on USB VCC and GND pins to use host mode.I ahve been trying the stm32u5xx_hal_hcd HAL file to get it working. Here's how I'm doing it:First, I'm keeping these structures:typedef struct { uint8_t dev_addr; uint8_t ep_addr; uint8_t ep_type; bool in_use; } channel_info_t; static channel_info_t _channel_info[FSDEV_EP_COUNT]; static uint8_t find_free_channel(uint8_t dev_addr, uint8_t ep_addr) { for (uint8_t i = 0; i < FSDEV_EP_COUNT; i++) { if (!_channel_info[i].in_use) { return i; } } return 0xFF; } static uint8_t find_channel(uint8_t dev_addr, uint8_t ep_addr) { for (uint8_t i = 0; i < FSDEV_EP_COUNT; i++) { if (_channel_info[i].
I have an ILI9341 SPI screen and a small self-made library that can display different numbers on the screen. I want to be able to update the screen (display a new number) every time there is an interrupt. I have tested the screen functions independently, and they work properly. But when I call them from the interrupt handler, they fail. The board is STM32F407G-DISC1. Timer configuration static void MX_TIM2_Init(void) { /* USER CODE BEGIN TIM2_Init 0 */ /* USER CODE END TIM2_Init 0 */ TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; /* USER CODE BEGIN TIM2_Init 1 */ /* USER CODE END TIM2_Init 1 */ htim2.Instance = TIM2; htim2.Init.Prescaler = 999; htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = 335900; htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim2) != HAL_OK) { Error_Handler(); } sClockSourceConfig.ClockS
Hi there !i work with DS2482 I2c to one wire . After i send the command reset i need the read the status register until i find one bit at 1, so i wrote my routine in this way static uint8_t DS2482_Status_Register(void) { uint8_t register_status=0; uint8_t data=0; while(register_status !=0x02 ) { Master_Recive_Data(DS2482_Addr, &data, 1); // HAL_Delay(1); dato= data; register_status = data; register_status &= 0x02; } if(register_status != 0x02) { return HAL_TIMEOUT; } return HAL_OK; } when i run the program i recive error 4 from i2C formvoid HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c) { } But if in the code below i put one delay of 1ms everything work perfect . So there is one "elegant" way to resolve the problem ? or there are other solution ? Thanks a lotSergio
I am working on STM32N6570-DK board. I am trying to run a code for three channels ADC+DMA, INP8, INP10, INP16. The output at USART is coming out to be zero in all three channels. I am attaching the code here.
Hello community members, I am using a STM32H5 with acitvated MPU region. I want to check and test dection of nullpointer access.Because of safety reasons. I have configured and activated the mpu so far. When doing a write access to the declared null pointer, the MemManageFault Handler is called as expected. uint32_t *m_pTest = nullptr;*m_pTest = m_value; // -> MemManageHandler is called (as expected)when doing a read access, the BusFaulthandler is calledm_value = *m_pTest; // ->BusFaultHandler is called (not my expectation)//here my mpu configuration and settingsSCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk |SCB_SHCSR_BUSFAULTENA_Msk |SCB_SHCSR_USGFAULTENA_Msk;/* Configure the MPU to prevent NULL-pointer dereferencing ... *///check nullpointer access Region1MPU_InitStruct.Enable = MPU_REGION_ENABLE;MPU_InitStruct.Number = MPU_REGION_NUMBER1;MPU_InitStruct.BaseAddress = 0x00U;MPU_InitStruct.LimitAddress = 0x200U;//512Byte for exampleMPU_InitStruct.AttributesIndex = MPU_ATTR
CubeIDE: v2.0.0CubeMX: v6.16.1Debugger: ST-LINK/V2 V2J46S7Hello,I'm attempting to setup a dual core project using STM32H757XIH MCU on CubeMX. I've generated and imported the project for CubeIDE. I've configured the Trace and Debug -> DEBUG for "Serial Wire" with M7 and M4 selected with Cortex-M7 as the initializer. I've configured one pin (PJ10) to be an output for a user LED.I've attempted to follow AN5361 "Getting started with projects based on dual-core STM32H7 microcontrollers in STM32CubeIDE" when configuring the debug profiles for the M7 project and M4 project while leaving the rest set to default.I've attached the logs to this post. Am I missing something when configuring the processor? Let me know if I need to add anymore information on my configuration.
STM32G491KEU3 on custom board. Using STM32CubeProgrammer to read/change option bytes.With BOOT_LOCK unchecked I use STM32CubeIDE to flash and debug my project. However SysTick_Handler() is never called, so HAL_GetTick() always returns the same value (zero). With BOOT_LOCK checked, HAL_GetTick() returns incrementing tick counts as expected.I thought I understood the ref manual description of BOOT_LOCK. Does BOOT_LOCK do other things?
Hello, does anyone help me with example for devkit with FatFs on uSD card? Thanks
Hi, I am working on STM32F469NI using the USB OTG HS peripheral in CDC (VCOM) mode. When using USB CDC without DMA, the VCOM works fine. However, when I enable Internal IP DMA (from CubeMX → USB_OTG_HS → Parameter Settings → Enable internal IP DMA), the USB CDC communication stops working after some time. Setup details: MCU: STM32F469NI USB mode: Device (CDC VCOM) PHY: Internal FS PHY DMA Mode: Internal IP DMA enabled for USB_OTG_HS Running on custom board Observed behavior: On PC, the VCOM port is detected correctly. Initially, data transfer works fine. After some time (or after repeated Tx/Rx), the communication hangs completely. No data transfer occurs until reset. If I disable Internal IP DMA, the issue goes away. What I tried: Checked buffer alignment (made Tx buffers 4-byte aligned). Verified HAL callbacks (CDC_Transmit_FS etc.) are still being called. Questions: Is Internal IP DMA for USB HS CDC fully supported on STM32F469NI? Are there know
We are currently working on a project with the STM32U5 series running FreeRTOS and need to integrate the USB Mass Storage (MSC) class for adding pendrive / thumbdrive support. While exploring solutions, we noticed that CubeIDE doesn't directly support USB class configuration for USB host, and AzureRTOS's USBX seems to be the default recommendation. However, switching to AzureRTOS is not feasible for our project since FreeRTOS is deeply integrated into our system. So we’d like to know: * Can you please provide USB MSC stack for freertos as well for stm32U5 ?* If not, do you recommend any third party USB stack for this purpose?* Do you recommend the integration of TinyUSB open source stack ?
Hello everyone, I am currently working on a project using the STM32U5G9ZJT6Q mcu with USB UVC. For my setup, I am providing: 32 MHZ external clock to phy 144 MHZ system clock In the documentation(TRM and CubeMX), the maximum external phy clock specified is 32 MHZ. However I need to achieve a 60 MHZ PHY Clock, which seems to be supported by the hardware but isn't explicitly listed in CubeMX or the reference manual. My questions are: Is it possible to configure the external PHY Clock to run at 60 MHZ? If so, does anyone have an example configuration or code snippet to achieve this? Any insights or suggestions would be greatly appreciated! Thank you in advance.
I am trying to get the USB CDC (Virtual COM Port) working on my STM32H743VIT6. I have successfully used this exact setup in the past, I would normally flash the code via ST-Link, plug in the USB micro USB cable, and the COM port would appear in Device Manager for Tera Term. However, currently, the device refuses to exit DFU mode and enumerate as a COM port, even after flashing the application code. step that i have done: 1. I pull BOOT0 to 3.3V to enter the bootloader. Device Manager correctly shows DFU in FS Mode 2. I upload my .elf file (My application code includes HAL_PWREx_EnableUSBVoltageDetector(); in main().) using STM32CubeProgrammer. The upload verifies successfully. 3. I disconnect power, move BOOT0 to GND, and reset Issue: The Device Manager still shows "DFU in FS Mode". It does not switch to the Virtual COM Port (CDC). My Question: What specific steps should I take to force the board to exit DFU mode. I want the device to boot directly into my application and enumera
Hello, I would like to know the H264 VENC performance for the STM32N6 using the ST example: STM32Cube_FW_N6_V1.1.1/Projects/STM32N6570-DK/Applications/VENC/VENC_RTSP_ServerI have a hardware setup with a nucleo-n657x0-q + a ST B-CAMS-IMX camera module.Question 1: The example provided by the STM32CUBE_FW is for STM32N6570-DK. Will it also work for the nucleo-n657x0-q Thank you.
Sir can i use the stm32 cube ide for the commercial in free of cost. is there any limitation pls tell me
Dear ST Community, I have a working application for USB PD SPR and EPR and now I want to change the voltage (power profile) during an active contract.So e.g. I have 5V currently and want to request 9V from the source, or I have 20V currently and want to switch to 28V (EPR).How to do that? According to the USB Specification you would send a "Get Source Capability" Request so I used USBPD_DPM_RequestGetSourceCapability() [or USBPD_PE_Send_ExtendeControlMessage(m_uPort, USBPD_EXTENDED_CONTROL_EPR_GETSRCCAPA) in EPR]. Then the source responds with it's capabilities. USBPD_DPM_SetDataInfo gets called with the PDOs but USBPD_DPM_SNK_EvaluateCapabilities is never called afterwards....In SPR Mode nothing happens, voltage stays the same. In EPR Mode 30ms later a hard reset is triggered. Why does the ST Stack not Evaluate Capabilities after successfull reception of PDOs? According to USB Spec as a Sink we always need to respond to a capabilities message with our "wish".....&n
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.