Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello. I'm upgrading from version 1.0.0 to 2.0.0 of the X-CUBE STL for STMF4, but I'm struggling to resolve this warning:Warning: L6775W: stl_sch_main.o(.debug_frame) has FDEs which use CIEs which are not in this section. The warning disappears when turning of debug symbols. I'm using Arm Compiler 6.16.2 with Keil Uvision and an STM32F437. The STL version is V2.0.0 / 19-December-2022The example projects that follow the STL package also have debug symbols enabled and produce the same warning. Is this an issue with how the library has been compiled, or is it possible to resolve this without disabling debug symbols or just suppressing the warning? Any inputs would be greatly appreciated.
HAL_I2C_Slave_Seq_Transmit_* and HAL_I2C_Slave_Seq_Receive_* functionsI have to program an I2C slave which during communication the transfer direction switch. The HAL driver manual does not go into too much details. Are there example code anywhere? Thank in advance.
Hello, I am working on a Bootloader that reads USB-Key using USB_Host middleware to retrieve files before performing some operations but I have some issues detecting some USB keys.USB 2.0 Keys are all detectedUSB 3.2 Keys are not well detectedI have examinated USB File descriptors using USB Device Tree Viewer and noticed that:Demanded Current <=500 mA : DetectedDemanded Current > 500 mA : Not DetectedEven though, I have measured Ibus and it's never over 120 mA so I assume it's not that.If I use a USB-C to USB-A adapter to force to use USB 2.0 fallback, it doesn't work either. Then I noticed that in the Device Tree that:Enumerator: SCSI => Not DetectedEnumerator: USBSTOR => Detected When I use Debugger, I can see a hard fault coming from USBH_Process : case HOST_CHECK_CLASS: if (phost->ClassNumber == 0U) { USBH_UsrLog("No Class has been registered."); } else { phost->pActiveClass = NULL; for (idx = 0U; idx < USBH_MAX_NUM_SUPPORTED_CLASS; idx++)
Hi guys I've upgraded from 1.5.1 to 1.5.2 and I'm receiving HardFaults when using FDCAN \STM32Cube\Repository\STM32Cube_FW_G4_V1.5.1\Drivers\STM32G4xx_HAL_Driver\Src\stm32g4xx_hal_fdcan.c FW 1.5.1 Line: 3493 /* Write Tx payload to the message RAM */ for (ByteCounter = 0; ByteCounter < DLCtoBytes[pTxHeader->DataLength >> 16U]; ByteCounter += 4U) { *TxAddress = (((uint32_t)pTxData[ByteCounter + 3U] << 24U) | ((uint32_t)pTxData[ByteCounter + 2U] << 16U) | ((uint32_t)pTxData[ByteCounter + 1U] << 8U) | (uint32_t)pTxData[ByteCounter]); TxAddress++; } FW 1.5.2 Line: 3523 /* Write Tx payload to the message RAM */ for (ByteCounter = 0; ByteCounter < DLCtoBytes[pTxHeader->DataLength]; ByteCounter += 4U) { *TxAddress = (((uint32_t)pTxData[ByteCounter + 3U] << 24U) | ((uint32_t)pTxData[ByteCounter + 2U] << 16U) | ((uint32_t)pTxData[ByteCounter + 1U] << 8U) | (uint32_t)pTxData[ByteCounter]
Hello,I am Manikandaprabhu, we are working with the STM32H745XIH6 MCU Disco Board and interfacing it with an eMMC module.The eMMC communication is working correctly on its own.However, we are trying to integrate it with the FatFs filesystem for accessing based on file name,but it's not working.We are facing mounting error, when working with the FATFS file system. Can anyone provide the correct configuration steps and a sample code to initialize and use FatFs with eMMC on STM32H745?Next we need to work with MMC 8 bit Wide Bus mode for fast communication but its only work with MMC 4 bit Wide Bus mode. How to work with 8 bit Wide Bus mode?Which method based to select SDMMC clock divde factor ?These are all my doubts. Kindly find and help me to resolve our queries regarding STM32H745XIH6 MCU Disco Board. Thanking you.
Hi,I'm currently working with the STM32N6570-DK and the VENC_RTSP_Server Application from the STM32CubeN6 package.I'm trying to evaluate the VENC peripheral h264 performance.By default, the example application runs at 20 fps, I would like to take it to 30 fps. VENC, DCMIPP and IMX335 camera should support it.My question is : What do I need to modify in the example code to be able to achieve 30 fps ?(appart from the obvious "#define ...") Here is what I've already tried : I first tried to simply modify line 52 and line 109 in venc_app.c :52: #define FRAMERATE 30 109: IMX335_SetFramerate(Camera_CompObj, 30);This gives the problem I have at 30 fps (no problem at 25 fps), the video cuts and distorts like this :I then tried to change the DCMIPP clock divider and CSI bitrate with the following lines:line 346: PeriphClkInit.ICSelection[RCC_IC17].ClockDivider = 4; line 373: csiconf.PHYBitrate = DCMIPP_CSI_PHY_BT_2000; I also tried to set the IMX camera frequency by adding
Hello ST Community,We are using the STM32G0B1RET6 and have created a custom bootloader using FDCAN. Our setup includes two separate STM32CubeIDE projects:Bootloader ProjectProgrammed via ST-LINK V2Receives application firmware over FDCANWrites it to internal Flash and jumps to the applicationApplication ProjectStarts at Flash address 0x08004000Compiled and generates a .bin fileI have written and successfully uploaded the bootloader code using ST-LINK V2. Now, I would like to know how to send the .bin file over FDCAN (e.g., using Vehicle Spy 3 or another method), so that the bootloader can receive and flash it correctly.My questions:What is the recommended way to send the application .bin file over FDCAN?How should I format the FDCAN messages (e.g., 8-byte chunks)?Are there any example tools or scripts to convert a .bin file into FDCAN messages?How can I verify the firmware was flashed and jumped to successfully?Any guidance, sample projects, or advice would be appreciated.Thank you!
I need to know how to calculate Timing Register 0 for I3C. In this example, the I3C clock is 150 MHz. Can someone explain the value of the register and how it is calculated?
Hello everyone! I am trying to use the ADC of my NUCLEO-F334R8 board. I want to read the PC1 pin (ADC12, channel 7). I try to initialize the ADC with the following code: void BSP_ADC_Init() { // Enable GPIOC clock RCC->AHBENR |= RCC_AHBENR_GPIOCEN; // Configure pin PC1 as analog GPIOC->MODER &= ~GPIO_MODER_MODER1_Msk; GPIOC->MODER |= (0x03 << GPIO_MODER_MODER1_Pos); // Enable ADC clock RCC->AHBENR |= RCC_AHBENR_ADC12EN; // Reset ADC configuration ADC1->CR = 0x00000000; ADC1->CFGR = 0x00000000; ADC1->SQR1 = 0x00000000; // Enable continuous conversion mode ADC1->CFGR |= ADC_CFGR_CONT; // Select channel 7 ADC1->SQR1 |= (0x07 << ADC_SQR1_SQ1_Pos); // Set sampling time to 19.5 ADC clock cycles ADC1->SMPR1 = (0x04 << ADC_SMPR1_SMP7_Pos); // 12-bit resolution ADC1->CFGR |= (0x00 << ADC_CFGR_RES_Pos); // Select PCLK/2 as ADC clock RCC->CFGR2 |= (0x11 << RCC_CFGR2_ADCPRE12_Pos); // Enable ADC
Respected , Hi we stm585 discovery boared and we are clone https://github.com/FreeRTOS/iot-reference-stm32u5/blob/main/ In which for tfm code link : https://github.com/FreeRTOS/iot-reference-stm32u5/tree/main/Projects/b_u585i_iot02a_tfm We facing code building issue . We attached log of building error . Please provide solution as early as possible. Also we setup enviroment as per Getting_Started_Guide.md but we are facing build issue for " b_u585i_iot02a_tfm ". Get attached log file Stm32Ide version 1.17.o Toolchain 1.13 Also we share log fi Would you share any dependency for building code. Error CMake Error in C:/Iot_base/iot-reference-stm32u5/Middleware/ARM/mbedtls/library/CMakeLists.txt:Target "crypto_service_mbedcrypto" INTERFACE_INCLUDE_DIRECTORIES propertycontains path: "C:/Iot_base/iot-reference-stm32u5/Middleware/ARM/trusted-firmware-m/secure_fw/partitions/crypto" which is prefixed in the source directory. CMake Error in C:/Iot_base/iot-reference-stm32u5/Middleware
I try understand how migrate X-CUBE-IRREMOTE receiver code to LPTIM. Is this doable in IN1 LPTIM3 pin ?If not directly can LPTIM IN trigger next TIMx events?
I'm working on my cpp scaffold for stm32, so I read the startup file generated by STM32CubeMX.And I noticed that the startup file contains a definition called BootRAM, but there is no documentation on it.It also seems not being used anywhere else on a regular project, so what on earth it is?Should I consider it when I write my own startup file?P.S. The startup code I've mentioned is below:/* start address for the initialization values of the .data section. defined in linker script */ .word _sidata /* start address for the .data section. defined in linker script */ .word _sdata /* end address for the .data section. defined in linker script */ .word _edata /* start address for the .bss section. defined in linker script */ .word _sbss /* end address for the .bss section. defined in linker script */ .word _ebss .equ BootRAM, 0xF1E0F85F
Hi, I have problem with my SPI peripheral. For generate inicial code I used STM32 Cube IDE Version 6.14.1, and programming IDE STM32 Cube IDE Version 1.18.1.Description of problem:1.I want simple to check loop with transmit and receive data, but when I do that I always have 0 or 255 in receive register. I tried the same thing with UART, and it works.2.On SCK I don't have clock, I try with oscilloscope to see but nothing. In attachment I leave full project and video, please can someone check and say me some advice.
Is the 'stm32-external-loader' repository still maintained?The stm32-external-loader contrib branch has not been updated in over 5 years. There are currently 7 open pull requests with updates to support new flash ICs. Some of these PR are 4 or 5 years old.The ST MOOC external loader course encouraged developers to add their drivers and many have. Does anyone from ST know why these updates were never considered for the contrib branch?
Hi, I wanted to know if it is possible and how to approach reserving/allocating a section of internal flash (The Resource section) for a FatFs file?
Hello, I am working on a stm32u083rc. I'm trying to establish a USB Serial connection using the HAL_PCD library. I'm at the enumeration stage and trying to read the data sent by the PC (windows).The USB device is initialized with CubeMX (STM32Cube FW_U0 V1.2.0) in Device only, Full Speed, interrupts enabled.In my setup, I call the HAL_PCD_Start() function. Windows will detect a connection and attempt to enumerate it. At this point, the HAL_PCD_ResetCallback() function is called and I open EP0 in and out : HAL_PCD_EP_Open(hpcd, 0x00, 64, EP_TYPE_CTRL); HAL_PCD_EP_Open(hpcd, 0x80, 64, EP_TYPE_CTRL);Next, the HAL_PCD_SetupStageCallback() function is called and I'm supposed to respond to requests from the PC (USB host). Unfortunately, before calling this function, in the PCD_EP_ISR_Handler() function (line 1605 in file stm32u0xx_hal_pcd.c) :/* Get SETUP Packet *ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num);Always returns 0, as if no req
Hi, I'm just struggling with the same problem. I use SPI with DMA non-circular mode and want a callback for receive complete. I can set the callback function with HAL_DMA_RegisterCallback but in HAL_SPI_TransmitReceive_DMA it will be overwritten: /* Set the SPI Tx/Rx DMA Half transfer complete callback */ hspi->hdmarx->XferHalfCpltCallback = SPI_DMAHalfTransmitReceiveCplt; hspi->hdmarx->XferCpltCallback = SPI_DMATransmitReceiveCplt; Edit: Post moved from original thread How to know the when the DMA transfer done?, to give a chance to be answered. Please precise if you are using U5 as original one.
Hello all,I'm working with the STM32N6 series and I'm trying to correctly configure the isolation between the secure and non-secure domains using the RIF (Runtime Isolation Framework).I found example code like this in a template (STM32CubeN6) static void SystemIsolation_Config(void) { /* USER CODE BEGIN RIF_Init 0 */ /* USER CODE END RIF_Init 0 */ /* set all required IPs as secure privileged */ __HAL_RCC_RIFSC_CLK_ENABLE(); RIMC_MasterConfig_t RIMC_master = {0}; RIMC_master.MasterCID = RIF_CID_1; RIMC_master.SecPriv = RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV; /*RIMC configuration*/ HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_ETH1, &RIMC_master); /*RISUP configuration*/ HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_ADC12 , RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_NPRIV); HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_CSI , RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_NPRIV); HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_ETH
Hi,I know this question have been asked many times but i still can find a solid answer that can really help.I will try to ask again depends on the progress i have made and i hope if someone made this class that he could help.My objective is to be able to print 1 label using stm32f407 and a label printer from brother just to check the feasibility of this usb host and printer setup, so i just wanted to create usb host CDC project and adopt it to work with printer, ST community recommended this approach or use MSC.what did few changes on the usbh_cdc source and header files like this: /*Communication Class codes*/ #define USB_CDC_CLASS 0x07U #define COMMUNICATION_INTERFACE_CLASS_CODE 0x07U /*Data Interface Class Codes*/ #define DATA_INTERFACE_CLASS_CODE 0x07U /*Communication sub class codes*/ #define RESERVED 0xFFU #define DIRECT_LINE_CONTROL_MODEL 0x01U #define ABSTRACT_CONTROL_MODEL 0xFFU #define TELEPHONE_CONTROL_MODEL 0x03U #define MULTICHANNEL_CONTROL_MODEL 0x04U #define CAPI_CONTR
Dear STM32 Community,I'm currently working on a bare-metal project with the STM32H723VG using the LwIP stack. I've implemented a TCP Echo Server based on the examples provided in the STM32Cube repository.The application works as expected when I open a new socket connection from my PC for each request—i.e., I send a message, receive the correct 193-byte response, and then close the socket.However, if I maintain a persistent socket connection and send multiple messages (without closing the connection), I begin to encounter an issue: after approximately 30 successful requests, the server starts responding with only partial data—typically between 5 and 30 bytes instead of the full 193 bytes. If I then close and reopen the socket, the server resumes responding correctly for another 30 or so requests.I've verified that socket creation and teardown are functioning correctly on both the client and server sides. This behavior seems to suggest an issue related to buffer management or resource ex
Hi Community,I'm currently facing an issue where NetXDuo with the STM32H563 locks itself out if the packet pool runs out of packets. In the current szenario the problem occurs when using the ftp-server addon and retriving a file. As the chunks are posted to the tcp stack very fast, the socket_send routine returns success, but packets are not released (as they are currently not sent by the stack -> normal behaviour)But if this happens to fast, the packet pool runs empty (which may also be an ok behaviour here). But then the network driver can't fill up it's rx-descriptors anymore and locks up completely. The packets are never released and a reboot of the device is necessary.Is this a known issue somwhere? Any Ideas how/ where to debug further?
Has anyone successfully used this Simulink STM32 guide to write to an SD card? I am trying to run a simulink model on a Nucleo-F767ZI and write the output to an SD card. I have tried to follow the directions, but it is not working. The model can compile and run on the board, but when I check the SD card, it is still empty. I have tried different clock speeds, 1-bit and 4-bit modes, but nothing seems to work. I scoped the clock signal, and it seems to be at 400 kHz, which is indicative of it being in the initialization stage. Does anyone know what may be wrong? Thanks!
Hi, I need to read 8 channels through the ADC in DMA circular mode, to check the channel status readd I put all channel to GND from nucleo board and two channels (ADC_IN2 on PA2 pin and ADC_IN3 on PA3 pin ) doesn't give me the correct data, you can see in the image all channels to 0 except this two.I try change the wires but isn't the problem.All code is generated from MX tool. Can anyone tell me why these two channels are not working?Attached is the entire project.This is the main file:/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @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
Hi,I'm working on an STM32F303RE project.So far, only the UART and TIM3 are working properly.I successfully configured TIM3 in PWM mode on 3 channels, and everything runs as expected. Project is build only on CMSIS libirary. void clock_config(void) { RCC->CR |= RCC_CR_HSION; while (!(RCC->CR & RCC_CR_HSIRDY)); // RCC->CR |= RCC_CFGR_PLLSRC RCC->APB1ENR |= RCC_APB1ENR_PWREN; RCC->CFGR |= RCC_CFGR_HPRE_DIV1; RCC->CFGR|= RCC_CFGR_PPRE1_DIV2; //PPL SOURCE MUX // RCC->CFGR |= RCC_CFGR_PLLMUL9; RCC->CFGR |= (0x7 << RCC_CFGR_PLLMUL_Pos); RCC->CR |= RCC_CR_PLLON; while (!(RCC->CR & RCC_CR_PLLRDY)); RCC->CFGR |= RCC_CFGR_SW_PLL; while(!(RCC->CFGR & RCC_CFGR_SWS)); RCC -> AHBENR |= RCC_AHBENR_GPIOAEN; RCC -> AHBENR |= RCC_AHBENR_GPIOBEN; } void TIM3_IRQHandler(void) { if (TIM3->SR & TIM_SR_CC1IF) { TIM3->SR &= ~TIM_SR_CC1IF; // Wyczyść flagę GPIOA->ODR ^= GPIO_ODR_6; // Prz
Hey all,I was just reading out the new release of the X-CUBE-Audio-Kit and it says:Configurable latency mode and audio buffer sizes adjustable down to fractions of millisecondsDoes anyone know the lowest latency that can be achieved?I'm looking to possibly replace a codec that is doing my DSP - need to be able to do a a 5 to 8 band EQ, compression and volume control as well as mixing 2 stereo signals, but need it to be less than 0.5ms.Is that achievable with what the X-CUBE-Audio-Kit provides? Are there any low latency examples?
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.